Friday, May 06, 2011

virtualbox memory management

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 supported on Mac OS X hosts.


To change on the fly:

#VBoxManage controlvm "VM name" guestmemoryballoon


where "VM name" is the name or UUID of the virtual machine in question and is the amount of memory to allocate from the guest in megabytes.

To set a default balloon that will automatically be requested from the VM every time after it has started up:

#VBoxManage modifyvm "VM name" --guestmemoryballoon


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).


To enable Page Fusion for a VM, use the following command:

#VBoxManage modifyvm "VM name" --pagefusion on



Above content directly quote from virtualvox manual

VBoxManage Matricx

Thursday, May 05, 2011

virtualbox 4.0.6 change vdi uuid

Here is command to use to change uuid of vdi in ubuntu:

#VBoxManage internalcommands sethduuid [filehame.vdi] [uuid]

change filename.vdi and uuid to reflect correct vid name and uuid.