How to ReSize of the Virtual Disc Drive for VirtualBox Running on Mac

When I first installed VirtualBox on Macbook Pro it was with the intention of running a single piece of Windows only software – SportTracks by Zonefive Software, the definitive athletes training log. I have to confess that I’ve struggled in this task and after failing off and on for the last couple of years I finally got it sorted this weekend but only after I fathomed out how to expand the size of the VirtualBox virtual hard drive.

[GARD align=”center”]

This post won’t explain how to set up and install VirtualBox, I’m assuming that’s done and you have Windows installed as well. I’m using Windows XP.

During the installation of VirtualBox I think it defaults to a virtual harddisk size of 10Gb which seemed plenty for one piece of software but as the years went by the storage was consumed and this weekend I found I could no longer download anything as C:/ was full.

Then I discovered the confusion of expanding the VirtualBox drive. Following some experimentation I found it to be quite simple so I thought I’d jot down my notes to aid complete beginners.

Resizing the VirtualBox Hard Disk using Mac Terminal

Step 1 Open Terminal

This bit stumped me. There are loads of tutorials explaining how to expand a VirtualBox hard drive but they talk about the VBManage Tool which I couldn’t find and show illustrations of code that I didn’t know where to write.

The trick is to stick it all in the Mac Terminal (I think of it as the DOS prompt for old PC users).

To open Terminal navigate to Applications / Utilities and then double click the Terminal.

Mine opens into my user folder which proved to be fine and dandy and required no changing of directories which might have stumped me.

Step 2 Find the Path to Your Virtual Box Hard Drive

This just means opening up VirtualBox, navigating to Settings / Storage then selecting the vdi harddrive and then hovering over its location to reveal all. You can right click and then copy this for ease.

Step 3 Clone your Virtual Hard Drive for Backup

This is a precautionary measure and requires you to enter the following instruction into the Terminal window.

The bit before the $ sign is populated automatically when I open Terminal and I presume yours will open in a similar directory but be specific to your set up. Just type the following (items in bold are to type, items in bracketed italics are instructions):

VBoxManage clonehd (then you need to enter the path to your VirtualBox drive, right click and paste if you’ve already copied it)

/Users/warriorwoman/Library/VirtualBox/HardDisks/WinXP.vdi (then a space and then renter the path to your hard drive but change the name to your cloned version) /Users/warriorwoman/Library/VirtualBox/HardDisks/WinXPcloned.vdi

Should look like this, then hit enter:

Step 4 – Resize your VirtualBox Harddrive

Type the following:

VBoxManage modifyhd (then again paste or tpye out the location to your original VirtualBox drive) /Users/warriorwoman/Library/VirtualBox/HardDisks/WinXP.vdi (then type two – – and the size of your desired disk) –40960 (will give me a 40GB drive)

Should look like this, then hit enter:

Step 5 – Expand the Disk Size on the Guest Operating System

When you open VirtualBox you should see the expanded disk size. As I’ve already done mine the first screen shot shows my virtual size to be 40Gb. Unfortunately the guest operating system still needs to be updated.

Open Windows and navigate to the Disk Management tool:

Start > My Computer > Admin Tools > Computer Management and then the disk management option.

You should now see your existing 10Gb partition and a new 30Gb Unallocated Partition. What you want to do is right click the existing partition and select the Expand option.

Now before you panic, that didn’t exist for me and I don’t think it works in WinXP but should be ok if you are using a later version of Windows such as Vista. For the WinXP users we have one final hurdle and need to download another disk management tool.

I used Mini Tool Partition Wizard which was free a doddle to use. Load it up, click on C: then right click to select extend. It will ask you if you wish to use the Unallocated area to extend into and then ask you how much. I selected 100% and then applied. The software needed to restart the machine to work but actioned the change during Boot.

No problems – job done.

Thanks to Gubatron who got me most of the way with this task.

You may also like

  • cd16

    Thank you so much for this walk-through. I have been struggling with the task of increasing my hard disk space for several days now. A couple of things that stumped me was the proper syntax for the location of my .vdi file. If there are spaces in the folder name then they MUST be put in double quotes. For example, one of my folders is named VirtualBox VMs:

    /”VirtualBox VMs”/”Windows 8″/ etc

    Also after the path of the .vdi file I had to use the word “resize”:

    …vdi –resize 102400

    Lastly, in Step 5 expanding the disk for Windows 8 good luck trying to find the Disk Management Tool. I hovered over the bottom left corner and the Windows Start Menu came up. Then I right clicked on it and a menu appears with a list, including the Disk Management. Very simple once you know how.

    Now I can go back to actually using my software again and running my company. 🙂

  • Thanks for a really helpful response.
    It’s practically a tutorial in its own right.
    Good luck with getting on with the job.

  • Peebee

    Thanks to both of you! At last it’s done. The information from cd16 were crucial to my success.

    It took me a while to get to Disk Management (step 5) since I had to not only figure out Windows 8 but I had to translate for my french system… 🙂

  • Ritch

    I think that is supposed to be GB. MB is about one million bytes. GB is about one billion bytes.

  • Thanks Ritch – you are right. My instructions are for 40960 Mb = 40 Gb. I’ve just amended my post to change my descriptions to read Gb as I don’t want to leave that confusion standing. Thanks for letting me know.