Increasing VirtualBox VDI storage capacity on Mac OS X

akshaygoyal174 profile image Akshay Goyal ・3 min read

Originally published on Medium

Resizing you Virtual Box storage is as simple as resizing this image, not really<br>

I use a VirtualBox setup on my Mac for running Ubuntu as a Guest OS. This setup helps me mock the production environment on my local dev machine. VirtualBox is a pretty handy software for anyone trying to run a guest OS. Though there is an initial learning curve while setting it up, but it’s fun. I have been using this setup for over a year now and it has served my well. Well, well until today…

Today, while working on a legendary(read as legacy) piece of software which was no cakewalk navigating through, required me to download the latest DB dumps. So, like any good programmer I tried to download the dumps, only to realise that I couldn’t do so because… my VM was out of space. I suddenly remembered the time when I allocated 20Gigs of space to the VDI, thinking that I’d never need more space than that. Haha.. was I wrong!!. Following the lazy dev protocol, I tried quickest solution; cleared up the logs and removed most unwanted files, but to no avail. Finally the time had come for me to get my hands dirty. A few search results later…

Steps to follow

  • Take backup of your VDI

  • Fetch path to VDI
    Save this path, we’ll use it in the next steps
    Right click on VM -> Click Settings-> Storage -> Select your VDI on the Storage Tree on the left -> Location would have the path to your .vdi

Path to the VDI is highlighted<br>

  • Shutdown the VM and quit VirtualBox
  • Navigate to VBoxManage utility folder Open the Terminal app and type the following command
cd /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS/
  • Modify the size allocated to the VDI Use the VDI path from above and use it in the below command
VBoxManage modifyhd — resize [new size in MB] [/path/to/vdi]

Is it over yet?

Tip: Notice the ‘\’ before the space. This is used to escape the space character in path.

  • Verify if the desired changes were successful
VBoxManage showhdinfo [/path/to/vdi]


  • Launch the VirtualBox and VM

Tip: You may need to reallocate the partition to use the new space.

Note: I am using VirtualBox version 5.1.14. You may want to use modifymedium instead of modifyhd if you are on a newer version, though modifyhd is still supported.

A few search results later…

… I was happily downloading the DB dump on my VM and completing this blog post in the meanwhile. :)

If you like this post, feel free to follow me on Twitter. You can also visit my Github page to checkout some interesting projects, and contribute to them.


Posted on by:

akshaygoyal174 profile

Akshay Goyal


I am a Software Developer, working at a startup in India. I am looking for new challenges that excite me.


markdown guide