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?

Thanks

link|improve this question
feedback

5 Answers

up vote 2 down vote accepted

You can use VBoxManage.

You can see details here.

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

For ext3 partition you can follow these steps.

link|improve this answer
1  
It would be nice to include the essential parts of the answer here, and provide the link only for future reference. – slhck Jan 13 at 20:47
Yes. I was hoping there was a way through the vbox gui but this does the trick. – stefgosselin Jan 13 at 21:37
feedback

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

link|improve this answer
feedback

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
link|improve this answer
feedback

There is an article about this: http://coderjournal.com/2011/07/reducing-the-size-of-a-virtualbox-hard-drive/

Short but sufficient. In short:

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

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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