Increasing the Size of a Virtual Hard Drive in VirtualBox

Chris Kankiewicz
Nov 16, 2011 · 1 min read
Image for post
Image for post

I work in Linux primarily but run a Windows 7 virtual machine in VirtualBox so I can use Photoshop and do some necessary testing. Today my VM ran out of space. Silly me thought 20GB would be enough, but after installing service pack 1, dozens of Windows updates and a few programs I had less than 1GB of space left. After a little searching I found an easy way to increase the size of a virtual disk.

First, shut down your VM then run the following command from your host PC:

$ VBoxManage modifyhd /path/to/guest.vdi --resize <size_in_mb>

Once completed, boot into your VM and (for Windows) open up Control Panel -> Administrative Tools -> Computer Management. In Computer Management navigate to Storage -> Disk Management then, in the right pane, right click your disk and select “Extend Volume” and follow the prompts to resize your disk. And that’s it! Your disk will now be resized.

This also works from a Windows host, you just have to locate and use VBoxManage.exe

Note: This method only allows you to INCREASE the size of a virtual disk. You cannot shrink one with this method.

Chris Kankiewicz

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store