Online memory management is a new feature of Virtuozzo 7, based on memory hotplugging and ballooning, that allows increasing or reducing VM memory on the fly, without rebooting the VM. OOM enables the following scenarios:
- Pay-As-You-Grow (PAYG), customers can scale VM vertically according to workload;
- Changing billing plans without reboot.
The feature can only be enabled for stopped virtual machines with at least 1GB of RAM. To enable online memory management, run:
# prlctl stop myvm # prlctl set myvm --mem-hotplug on # prlctl start myvm
To check that the feature works:
-
Wait until VM is fully booted and the balloon driver is loaded, then run:
# virsh dominfo myvmUsed Memory should be 1GB while Max Memory should be 5GB. The balloon size should be about 7GB now.
-
Now increase memory size to 1.5GB:
# prlctl set myvm --memsize 1536 -
Check the VM memory:
# virsh dominfo myvmUsed Memory should be 1.5GB.
-
Reduce the amount of VM memory to 1GB:
# prlctl set myvm --memsize 1024 -
Check the VM memory again:
# virsh dominfo myvm