Pages

Sunday, August 3, 2014

Resize VirtualBox Disk(VDI) Image file

Using Windows as a Host

Open the command prompt and enter:

# <Path to VirtualBox installation>\VboxManage.exe modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MBEx:# C:\Program Files\Oracle\VirtualBox\VboxManage.exe modifyhd Windows.vdi --resize 20480

 

Using Mac as a Host

Open a Terminal and type:

# /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

 

Using Linux as a Host

Open a Terminal and type:

# VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

SIZE_IN_MB should be 20480 for 20GB

If you get an error mentioning the VirtualBox COM server, start the VirtualBox Dashboard and make sure you have Administrator rights (command prompt as Administrator / not sure about Mac / sudo in Linux), then try again.