I have seen a suspicious behavior of my GPU-passthrough VM (Linux) for quite some time. That is no matter how small the actual memory usage is (even when the ballooning is enabled), upon starting the VM, it will "try" to allocate the full memory (as configured). This doesn't mean that ballooning doesn't work though, it does work but it happens afterward. To this end, I need to have that the maximum amount of free memory at the time of startup.
However, I can verify that this behavior is not at all "normal" to all my other VMs. Others only require bare-minimum memory for starting up. I tried to replicate the configuration as close to the GPU-passthrough one as possible. I found if I comment the line "hostpci0: 01:00,x-vga=on,pcie=1,romfile=vbios.bin" the behavior vanishes. That is if GPU is not passed-through, the memory usage remains minimal. This seems odd enough. What does GPU passthrough have to do with memory management? Is this really an intended behavior? It is not automatically clear for me though.
However, I can verify that this behavior is not at all "normal" to all my other VMs. Others only require bare-minimum memory for starting up. I tried to replicate the configuration as close to the GPU-passthrough one as possible. I found if I comment the line "hostpci0: 01:00,x-vga=on,pcie=1,romfile=vbios.bin" the behavior vanishes. That is if GPU is not passed-through, the memory usage remains minimal. This seems odd enough. What does GPU passthrough have to do with memory management? Is this really an intended behavior? It is not automatically clear for me though.