Hi
I remember that Dynamic Memory was not supported with Linux in the earlier days but I decided that I might give it a go on Debian 9 (based on kernel 4.9) and the upcoming 10 (based on 4.19) on our Hyper-V hosts that are running 2012 R2.
As of writing I don't think that the memory ballooning works as it should out of the box, and I couldn't others who have seen the following behaviour:
- Linux VM boots
- hv_balloon gets registered
- A couple of seconds after bootup is finished, dmesg shows a message from hv_balloon how much the maximum RAM size is.
- At some point Hyper-V always show that the Linux VM has low memory, hence it will give more RAM to the Linux VM even if tools like free, top or htop show that the VM is perfectly happy with the memory it has and that Linux doesn't see the extra memory Hyper-V has given the VM
- Worse even: If the startup memory becomes to low, the VM starts swapping instead of enabling the extra memory Hyper-V has granted the VM
- The memory size never shrinks, even if the VM doesn't have any need for it.
Is this a known behaviour specific to Debian or Hyper-V with Server 2012 R2?
We do intend upgrading to 2019 in the foreseeable future, not only but also since Secure Boot will be supported in Debian 10 with a Microsoft-signed shim loader. But Server 2012 R2 didn't support enabling the Microsoft third party UEFI CA but only the UEFI
CA that allows Windows guests to do secure boot, this only became possible with Server 2016.