- 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