So I'm experimenting with my VM's. All of which are Ubuntu Servers. And I'm trying/experimenting with ways to trim away on hard allocated RAM. My understanding here was that setting Memory Size along with Minimum Memory Size. Would allow for dynamic memory allocation between these two values, depending on the Guests needs.
Guest VM settings/specs:
Memory Size: 12GiB
Minimum Memory Size: 1GiB
Boot Method: UEFI
GuestOS: Ubunutu Server 22.04.3, 6.2.0-33-generic #33~22.04.1-Ubuntu (Fully updated)
qemu-guest-agent: installed and up to date
If my assumption is correct, then the guest should be allocated 1GiB *fixed* memory on the host. And the remaining 11GiB would be available to the guest, but wouldn't be allocated host-side before actual needed. The GuestOS would still *see* it as 12GiB total RAM.
However. What I'm seeing is the following on my test-server when doing 'free -h' is
Leaving the Minimum value empty, allocates all of the intended RAM to the Guest as expected.
Ideas and/or corrections? I'm more than happy to be wrong, as long as I learn in the mean time.
Host: Check signature for Server specMinimum Memory Size
When not specified, guest system is given fixed amount of memory specified above. When minimum memory is specified, guest system is given memory within range between minimum and fixed as needed.
Guest VM settings/specs:
Memory Size: 12GiB
Minimum Memory Size: 1GiB
Boot Method: UEFI
GuestOS: Ubunutu Server 22.04.3, 6.2.0-33-generic #33~22.04.1-Ubuntu (Fully updated)
qemu-guest-agent: installed and up to date
If my assumption is correct, then the guest should be allocated 1GiB *fixed* memory on the host. And the remaining 11GiB would be available to the guest, but wouldn't be allocated host-side before actual needed. The GuestOS would still *see* it as 12GiB total RAM.
However. What I'm seeing is the following on my test-server when doing 'free -h' is
total used free shared buff/cache available
Mem: 675Mi 387Mi 141Mi 0.0Ki 146Mi 62Mi
Swap: 2.0Gi 206Mi 1.8Gi
Leaving the Minimum value empty, allocates all of the intended RAM to the Guest as expected.
Ideas and/or corrections? I'm more than happy to be wrong, as long as I learn in the mean time.
Last edited: