Dynamic memory broken on Hyper-V

After following the instruction at Clear Linux* OS on Microsoft Hyper-V, the VM is running. However, I have noticed the dynamic memory is partially broken. The VM is able to reduce down the memory, but, it is not able to expand beyond the initial starting memory.

For example, the setting I have is:
RAM: 4096 (initial starting memory)
Minimum RAM: 1024
Maximum RAM: 16384

I can see the memory properly reduce (from Hyper-V Manager) to lower value. However, it fails to increase the memory.

The host is running Windows Server 2019. The error message I see from journalctl is:
kernel: hv_balloon: Memory hot add failed

I have tried this with the following images:

I also manually install the kernel-hyperv-lts which is running 4.19.108-249. I have also tried with and without the os-cloudguest-azure.

I do see based on the /usr/lib/kernel/config-*.hyperv, the kernel is configured with:


The current workaround to the problem is start the VM with Maximum memory. However, this is not how dynamic memory should work and this will run into issue when multiple VM starts simultaneously.

Did this work in earlier releases? I doubt we have any significant kernel patches for this feature - this might be a pure upstream bug. I would recommend reporting the issue upstream, therefore.

I have tried these 2 releases:

I have also tried CentOS 7, Ubuntu 18.04 LTS, with various kernel versions (3.10, 4.19, 5.0), all of them work properly. Given kernel-hyperv-lts is also 4.19 and didn’t work, it may point to ClearLinux?