Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resizing a VHD or VDI
#1
If like me you created a Windows VM on VirtualBox and misjudged how much space you actually needed or perhaps need more after the event, you will quickly discover that unlike some other VM's there is no method to change it in Oracles VM GUI.

Credit where credit is due, I did a quick search and came across a really good article here dracata.net

Not wishing to quote the site verbatim but here is the step-by-step instructions for Mac VirtualBox users. Please note that this process will only work on VDI or VHD files that were Dynamically allocated storage. Your kinda stuffed it you used a fixed size.

Step By Step
- Shut down the VM first.
- Open a terminal
- Navigate to /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS
- Run the command VBoxManage modifyhd [myvm.vdi] –resize [size in MB]

Obviously change the [myvm.vdi] to the actual full path of your virtual hard drive. Also insert a size in MB so as an example50GB would be (50 * 1024 = 51200)

What is a pain is that your VDI like mine is probably in a folder with spaces which can be a nightmare to get right in Terminal. The easy solution is to open Finder, locate your file and drag it into the Terminal window where it's full path will be entered.

The whole process took seconds on a solid state but I would imagine it would take slightly longer on a normal disk.

- Finally, restart your VM, right click on My Computer and select manage, select disk management and expand your volume to its new size.

Hope that helps
Reply


Messages In This Thread
Resizing a VHD or VDI - by wightsupport - 08-08-2014, 02:36 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)