4 Guest Additions 4.8.1 Memory ballooning Starting with version 3.2, the Guest Additions of VirtualBox can change the amount of host memory that a VM uses while the machine is running. Because of how this is implemented, this feature is called “memory ballooning”. Note: VirtualBox supports memory ballooning only on 64-bit hosts, and it is not sup- ported on Mac OS X hosts. Normally, to change the amount of memory allocated to a virtual machine, one has to shut down the virtual machine entirely and modify its settings. With memory ballooning, memory that was allocated for a virtual machine can be given to another virtual machine without having to shut the machine down. When memory ballooning is requested, the VirtualBox Guest Additions (which run inside the guest) allocate physical memory from the guest operating system on the kernel level and lock this memory down in the guest. This ensures that the guest will not use that memory any longer: no guest applications can allocate it, and the guest kernel will not use it either. VirtualBox can then re-use this memory and give it to another virtual machine. The memory made available through the ballooning mechanism is only available for re-use by VirtualBox. It is not returned as free memory to the host. Requesting balloon memory from a running guest will therefore not increase the amount of free, unallocated memory on the host. Effectively, memory ballooning is therefore a memory overcommitment mechanism for multiple virtual machines while they are running. This can be useful to temporarily start another machine, or in more complicated environments, for sophisticated memory management of many virtual machines that may be running in parallel depending on how memory is used by the guests. At this time, memory ballooning is only supported through VBoxManage. Use the follow- ing command to increase or decrease the size of the memory balloon within a running virtual machine that has Guest Additions installed: VBoxManage controlvm "VM name" guestmemoryballoon n where "VM name" is the name or UUID of the virtual machine in question and n is the amount of memory to allocate from the guest in megabytes. See chapter 8.11, VBoxManage controlvm, page 117 for more information. You can also set a default balloon that will automatically be requested from the VM every time after it has started up with the following command: VBoxManage modifyvm "VM name" --guestmemoryballoon n By default, no balloon memory is allocated. This is a VM setting, like other modifyvm settings, and therefore can only be set while the machine is shut down see chapter 8.7, VBoxManage modifyvm, page 109. 4.8.2 Page Fusion Whereas memory ballooning simply reduces the amount of RAM that is available to a VM, Page Fusion works differently: it avoids memory duplication between several similar running VMs. In a server environment running several similar VMs (e.g. with identical operating systems) on the same host, lots of memory pages are identical. VirtualBox’s Page Fusion technology, introduced with VirtualBox 3.2, is a novel technique to efficiently identify these identical memory pages and share them between multiple VMs. Note: VirtualBox supports Page Fusion only on 64-bit hosts, and it is not supported on Mac OS X hosts. Page Fusion currently works only with Windows guests (2000 and later). 69
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com