How to Resize a VirtualBox VDI or VHD File on Mac OS X

Hostnbit
  • Shutdown the VM and quit VirtualBox
  • Open the Terminal app and use the following command to navigate to the VirtualBox app directory:
cd /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS/
  • Now in the proper directory, you’re ready to run the resize command with the following syntax:
VBoxManage modifyhd --resize [new size in MB] [/path/to/vdi]

For example, let’s say there’s a Mac OS  VDI file located at /Users/ziauddin/VirtualBox VMs/Ubuntu Test Server/Ubuntu Test Server.vdi and we want it to grow from 15GB to 50GB, the syntax would be:

VBoxManage modifyhd --resize 50000 /Users/ziauddin/VirtualBox VMs/Ubuntu Test Server/Ubuntu Test Server.vdi
  • If desired, verify the change has taken place with the showhdinfo command:
VBoxManage showmediuminfo "/Users/ziauddin/VirtualBox VMs/Ubuntu Test Server/Ubuntu Test Server.vdi"

Relaunch VirtualBox and boot your newly resized guest OS

Hostnbit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu Title
Scroll to Top