I'm having trouble emulating a Windows VM with memory ballooning on QEMU. My investigation has led to two questions.
Just to describe my test setup:
I installed virtio ballooning driver and the ballooning service on a windows family OS and then spawned a QEMU process with 8GB RAM with the ballooning device option activated on my localhost:
I observed that all of the assigned RAM had been allocated to the VM from the host (the entire 8G is allocated). However, the guest OS is using much less memory; around 1.5GB.
Whenever I emulate a Linux-Based VM with the same QEMU options (with the same amount of RAM), at any moment in time the Linux-Based guest OS only consumes what it currently needs which is much less than 8GB.
To make sure that the ballooning driver is not broken, I managed to connect to the memory ballooning subsystem of the windows machine via
I uploaded the windows image file on Proxmox and launched it via the panel; I saw automatic memory ballooning is working perfectly. Memory consumed via QEMU process on the host was equal to the amount of memory being consumed in the task manager of the guest OS.
My first question: how different is pve-qemu vs qemu-systemi when it comes to memory ballooning? is different from the real one or not? And how dynamic memory ballooning is handled via proxmox VE?
Second question: With what options does pve-qemu emulate a typical Windows machine?
I'm pretty sure the guest OS side configuration is OK; I'm not certain though. I think my QEMU invocation is the source of the mismatch.
My host OS is Debian 11 and the version of QEMU that I'm working is
Just to describe my test setup:
I installed virtio ballooning driver and the ballooning service on a windows family OS and then spawned a QEMU process with 8GB RAM with the ballooning device option activated on my localhost:
-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x8
I observed that all of the assigned RAM had been allocated to the VM from the host (the entire 8G is allocated). However, the guest OS is using much less memory; around 1.5GB.
Whenever I emulate a Linux-Based VM with the same QEMU options (with the same amount of RAM), at any moment in time the Linux-Based guest OS only consumes what it currently needs which is much less than 8GB.
To make sure that the ballooning driver is not broken, I managed to connect to the memory ballooning subsystem of the windows machine via
qmp
.I uploaded the windows image file on Proxmox and launched it via the panel; I saw automatic memory ballooning is working perfectly. Memory consumed via QEMU process on the host was equal to the amount of memory being consumed in the task manager of the guest OS.
My first question: how different is pve-qemu vs qemu-systemi when it comes to memory ballooning? is different from the real one or not? And how dynamic memory ballooning is handled via proxmox VE?
Second question: With what options does pve-qemu emulate a typical Windows machine?
I'm pretty sure the guest OS side configuration is OK; I'm not certain though. I think my QEMU invocation is the source of the mismatch.
My host OS is Debian 11 and the version of QEMU that I'm working is
5.2.0
. Any help is much appreciated.Attachments
Last edited: