Extending the size of your VirtualBox Hard Drive

Took me awhile to find this but I thought I'd post it here for anyone who is also looking about for the same thing.

I needed to extend the size of a VirtualBox Hard Disk (VDI file) in order to install some new software on it - being a tightwad I'd only given the drive 25GB initially and needed at least another 10gb.

To do it, open Terminal on your Mac and navigate to wherever the VDI file for your VirtualBox machine is located, and then type in the following and hit enter:

VBoxManage modifyhd NAME_OF_YOUR_HARD_DISK.vdi --resize NEW_SIZE

Where the name of your hard drive and new size are valid values, such as the example below. Note the size parameter is in MB, so 40,000MB = 40 gigabytes (approx). Make sure you also escape any filenames with spaces in them - even easier is to start typing the first word of the filename in terminal and press "Tab" - this will fill out the rest of the filename for you.

VBoxManage modifyhd Windows\ XP\ Hard\ Disk.vdi --resize 40960

 

Once you have done that, start your VirtualBox machine and once it loads, go into Control Panel -> System & Security -> Administrative Tools -> Create and Format Hard Disk Partitions. You will see a section called "Unformatted Disk Space" usually next to Disk 0 (which would be your C:\). You can then right-click on the C:\ and extend the partition size utilizing the new, extra drive space you just created.




Write a comment

  • Required fields are marked with *.


If you have trouble reading the code, click on the code itself to generate a new random code.