Monday, February 03, 2014

Expanding your Virtual Hard Drive in VirtualBox


I was getting an error saying I was out of Hard Drive Room when I tried to install the LibreOffice onto my VirtualBox Windows 7 install on my Ubuntu 12.04 box.  So I had to expand the Virtual Hard Drive.  To change the size of a dynamically growing virtual drive in VirtualBox 4.3 running on Ubuntu 12.04, run the following two commands in a Terminal Window:

     VBoxManage list hdds


This will display a list of all your Virtual Drives in VirtualBox.  You will need to write down or copy the uuid of the Virtual Drive you want to increase in size.  You will have a Virtual Drive for every Virtual OS you have installed on VirtualBox.  They have names with them so they are easy to differentiate. 

The last command is:

     VBoxManage modifyhd <uuid> --resize <newsize in MB>

When I did mine, my command looked like this (note the double hyphens):

VBoxManage modifyhd d009bb80-64a4-4ac2-a405-3681dff3964e --resize 30000

This increased my Virtual Drive from 14gb to 30gb.

That's all the Terminal Commands we need so close your Terminal Window and start you VirtualBox Windows 7.  Once your Virtual Windows 7 starts we need to tell it that it has more hard drive room.  To achieve this do the following:

In Windows 7, Right Click on COMPUTER and select MANAGE.



Once the Computer Management screen appears, select Disk Management to view new unallocated space (10.74 GB in below picture)



To finish, Right Click on your (C:) Volume (13.57 GB NTFS in the above picture) and select "Extend Volume..." from the menu that pops up. Choose the Unallocated Space when asked (just choose the defaults when the Wizard asks).  This will make your Unallocated Volume go away and your (C:) Volume will now be bigger.  Done!

No comments: