VirtualBox: HowTo resize a VDI Container

  • Post published:October 7, 2013

180px-VirtualBox-LogoI recently hit a problem, by setting up a new VirtualBox machine… I set my HDD container to 10Gb and wondered why i was running out of memory :/

So to resize/increase your HDD Container’s memory size you have to:

[MAC/LINUX] Fire up a terminal and type:
sudo vboxmanage modifyhd “PATH TO YOUR *.VDI FILE” –resize “INT AS NEW DISKSPACE SIZE IN MEGABYTES”

e.g. sudo vboxmanage modifyhd /User/xyz/VBMachines/Windummy.vdi –resize 100000
Will resize Windummy.vdi to 100GB diskspace!

[WINDOWS] I suggest to change to VirtualBox Installation-Directory and execute the command
e.g. cd “C:\Program Files\Oracle\VirtualBox\VboxManage” modifyhd —resize 100000 “*.vdi”

Attention: You must boot into your os an resize/expand your partition (Win Viste, 7, 8/Linux/OS X, maybe works not for Win XP)

1. Create larger VDI Container (vboxmanage createhd –filename <xyz.vdi> –size <sie in mb>)
2. Clone old VDI Container to new one (vboxmanage cloned –existing <old.vdi> <new.vdi>)
3. Check ownership (non root) and switch old.vdi with new.vdi in vbox settings
4. Expand the 
partition within your os