Thursday, June 14, 2012

Resize VirtualBox Disk (VMDK, VDI)

VBoxManage is the command-line interface to VirtualBox. With it, you can completely control VirtualBox from the command line of your host operating system. VBoxManage supports all the features that the graphical user interface gives you access to, but it supports a lot more than that. It exposes really all the features of the virtualization engine, even those that cannot (yet) be accessed from the GUI.

Resize a VDI disk:
VBoxManage modifyhd disk.vdi --resize [SIZE_IN_MB]
In case you try to convert a VMDK disk you'll see something similar to:
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
You can work around this issue by converting the VMDK disk to a VDI disk format before trying to resize it. It could be necessary to boot the converted image before doing a resize!

Convert format of virtual hard disk:
VBoxManage clonehd disk.vmdk disk.vdi --format VDI
and then Resize a VDI disk:
VBoxManage modifyhd disk.vdi --resize [SIZE_IN_MB]

No comments:

Post a Comment