How to increase the size of a VirtualBox Disk Image

virtualbox

I had created a Windows XP image disk. It is of 5 GB, but I would like to know if there is any simple way to increase the size to 20 GB.

Best Answer

As of VirtualBox 4.0.0, the VBoxManage command line tool offers a simple resize option:

VBoxManage modifyhd /path/to/vdi --resize <mbytes>

After the virtual disk container resize, boot into the VM and resize the partitions to make use of the extra space.

See also: VirtualBox manual, Chapter 8. VBoxManage: modifyhd