Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an easy way to increase virtual hard disk space on VirtualBox?

share|improve this question
up vote 47 down vote accepted

There is not an easy way to do this.

There is a complicated one, though:

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.

share|improve this answer
Regarding the VirtualBox 4 version: after resizing the disk, you have to resize the partition as well which cannot be done when booted from so one has to boot into some sort of gparted livecd as well. – fikovnik Mar 14 '11 at 2:14
@fikovnik- Yes, the partition needs to be resized too. However, on Windows it can be done on the booted disk itself using the diskpart utility tool via the command-line or via the Disk Management GUI without booting from a separate disk. – Ray Vega Jun 8 '11 at 19:35
I don't have a vdi file what is it? I have .vmdk files – chobo2 Aug 2 '12 at 21:45
I provide a link to help with re-partition the ubuntu hard disk, after using VBoxManage…. After re-partition the hard disk, u need to resize the file system using resize2fs command. – Thang Pham Sep 4 '13 at 5:07
@fikovnik I managed to modifyhd to a larger number and I can clearly see it in the virtualbox manager the disk size has increased, however, i cannot see the extra space disk after i booted into gparted, weird. – B.Mr.W. Oct 19 '15 at 4:56

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.

share|improve this answer
That blog site no longer exists. – Barry Brown Aug 15 '11 at 17:52
The link was just broken, @Barry. Fixed now. – Don Kirkby Aug 17 '11 at 3:31
As of 2015, this answer is superior to the one that was accepted by the original questioner. – Michael Currie Sep 6 '15 at 4:04

this worked perfectly (from windows 7 and using vbox 4.x

do the following

  1. open cmd as and administrator
  2. go to the folder where the VBOX is installed so you can use the exe VBoxManage
  3. from there run the following VBoxManage modifyhd --resize eg: 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 you machine and go to my computer, right click and manage, go to storage, right click on the disk you expand, click on extend volume and resize the disk as you wish
  6. if necessary restart the vmachine

Cheers. Mauricio Luca, GT.

share|improve this answer
Yes, and, make sure you do that for snapshotted .vdi's. But note - once I've done all the above steps, my Win7 guest is very unstable. sfc /scannow hangs, even chkdsk hangs. – Greg Bell Jul 12 at 23:13

If you are running Windows Server 2012 and VirtualBox version 4 and above, there are only 4 steps:

  1. run the "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd .vdi --resize
  2. Boot Up Virtual Box
  3. In server managaer -->File And Storage Services --> Volumes --> Disks --> Tasks --> Rescan Storage
  4. Go to server manager -->File And Storage Services --> Volumes --> Right click on volume --> choose expand volume.

Go to file explorer and right click on the drive. You will seethat the volume has increased in size!!

share|improve this answer

Had to search a bit on how to run this command.

Navigate to folder having your-filename.vdi e.g:(cd /Users/binoy/VirtualBox\ VMs/)

Then run the command to increase the space to 25 gb.

VBoxManage modifyhd filename.vdi --resize 25000

You would now have to attach the additional space using resize2fs or Gparted.

share|improve this answer

There's also now a simple GUI too called Clone VDI for Windows users that @Eric Kigathi mentioned here:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .