Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

5 Answers 5

up vote 39 down vote accepted

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.

share|improve this answer
7  
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
1  
@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 connection.rnascimento.com/2011/01/25/…. After re-partition the hard disk, u need to resize the file system using resize2fs command. –  Thang Pham Sep 4 '13 at 5:07

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

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

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

There's also now a simple GUI too called Clone VDI for Windows users that @Eric Kigathi mentioned here: http://stackoverflow.com/a/5987875/1024735

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.