Resizing your VirtualBox hard disk

I've blogged about upgrading the size of your virtual machines disk before. Back then I was using VmWare but I've switched camps to VirtualBox so thought I would share how you resize your hard disk using this software.

Resizing your VirtualBox hard disk is fairly easy. In fact it's very easy. Just navigate to the folder where VirtualBox is installed, normally "C:\Program Files\Oracle\VirtualBox". Now run the following

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd c:\VirtualMachines\VMFolder\VmHardDisk.vdi --resize 81920

This resizes the hard disk to 80GB. The size is specified in MB so simply adjust the 81920 to your desired disk size (x * 1024).

You will still need to follow the steps in my previous post to resize the partition on your hard disk if it's your primary drive and your running Windows.

If you followed my previous blog post to move from VMWare Player to VirtualBox you will probably have a vmdk hard disk file which you'll have to convert to a vdi file. Fortunately again this is very simple to do. Again from the virtual box directory simply run the following.

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd c:\VirtualMachines\VMFolder\VmHardDisk.vmdk c:\VirtualMachines\VMFolder\VmHardDisk.vdi --format vdi

Once converted then simply run the resize command as above.