Tuesday, January 24, 2012

Virtual box hd partition resize

I used the following command to re size a virtual box hard drive partition. It was originally 20gig and increased it to 40gig.

1. Close and quit virtual box
2. Go to the command line (pc or mac)
3. Execute the following command.

VBoxManage modifyhd /VirtualBox/Windows7/Windows7_32bit.vdi --resize 40960

VBoxManage = Virtualbox install this with the program and puts it on the path
modifyhd = is the argument for the command above
Target VDI file = in my case, it was located in /VirtualBox/Windows7/Windows7_32bit.vdi
--resize 40960 = command to resize to 40gig

If your VDI file name has space on the name. It must be as follows:

Windows\ XP\ Hard\ Disk.vdi

4. Launch Disk management with Windows 7 and expand partition.