Increasing disk space on VirtualBox

There is not an easy way to do this.

There is a complicated one, though:

http://www.my-guides.net/en/content/view/122/26/

Has a good screenshot-by-screenshot guide. Essentially you're copying your install onto a new virtual-disk file.

Update: As of VirtualBox 4 they added support for expansion.

VBoxManage modifyhd filename.vdi --resize 46080

That will resize a virtual disk image to 45GB.


The Trivial Proof blog has a nice tutorial of the process for VirtualBox versions before and after 4.0. It includes the steps for adjusting the partition on the expanded disk.


This worked perfectly (from Windows 7 and using VirtualBox 4.x).

Do the following:

  1. Open cmd as administrator.
  2. Go to the folder where the VirtualBox is installed so you can use the VBoxManage program.
  3. From there, run the following command:

    VBoxManage modifyhd <file path and name> --resize <size in MB>
    

    e.g.: VBoxManage modifyhd C:\V-MACHINES\SERVER2008\WIN-2008.VDI --resize 26000

  4. You will see a message from 0 to 100% and done.
  5. Start your machine and go to "Computer" (or "My Computer", if applicable), right click and select "Manage", go to "Storage" → "Disk Management", right click on the disk you want to expand, click on "Extend Volume" and resize the disk as you wish.
  6. If necessary restart the VM.

Tags:

Virtualbox