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 a way to resize a VM hard drive? I am using virtualbox and I have a VM that has run out of space, looked into the settings but it seems I may have to create another partition. I thought there might be an easier way, anyone have an idea?


share|improve this question
up vote 8 down vote accepted

You can use the VBoxManage command.

You can see details here.


"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\Users\busey\VirtualBox VMs\ubuntu10.10\ubuntu10.10.vdi" --resize 20480

After resizing hard disk , you will have to resize partition(s).

For ext3 partition you can follow these steps.

share|improve this answer
It would be nice to include the essential parts of the answer here, and provide the link only for future reference. – slhck Jan 13 '12 at 20:47
Yes. I was hoping there was a way through the vbox gui but this does the trick. – stefgosselin Jan 13 '12 at 21:37
Can you actually include the steps in this answer, instead of simply posting a couple of relevant links? The links may become broken at some time in the future, and then the essential information will be gone (if the steps aren't posted here as well.) – Anderson Green Nov 15 '12 at 0:15
Do not open command line "as administrator" because you'll get Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available). Run it as a normal user. – Michał Powaga May 22 '13 at 21:46

This worked on a VHD with a bootable image of Win7:

  1. VirtualBox -> Virtual Media Manager -> Copy

  2. C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "c:\VirtualMachines\Windows 7 Large.vhd" --resize 2000000

  3. VirtualBox -> VM -> Settings -> release current VHD and mount new VHD

  4. Boot VM into Windows

  5. Use Computer Management -> Disk Manager -> right-click on partition -> Extend

share|improve this answer
What is the host OS in this example? Do these steps apply to any host operating system, or just one specific host operating system? – Anderson Green Nov 15 '12 at 0:18
Host was Win7 64-bit. Haven't tried it on other hosts. – Brian Low Nov 15 '12 at 4:59
Works also on Win8 64-bit with an image of Win8 64-bit – Robar Aug 22 '13 at 14:36

For a vdi this worked, the host being Windows 7.

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "C:\Users\busey\VirtualBox VMs\ubuntu10.10\ubuntu10.10.vdi" --resize 20480
share|improve this answer

CloneVDI can help do this. You can create a clone of an existing VDI and increase the disk size at the same time. Used this without any problems for a couple of years.

share|improve this answer

There is an article about this:

Short but sufficient. In short:

  • delete temp files (obvious)
  • defragment (assuming your guest filesystem can be defragmented)
  • use VBoxManage, as other users suggest
share|improve this answer

You must log in to answer this question.

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