how tolinuxOracleunix

Expanding VM disk in Virtual Box

I have been using VirtualBox for couple of weeks now and I find it pretty stable.  VirtualBox is a free VM engine from Oracle.  It can run pretty much any OS you want as a guest with Windows, Linux , Solaris and OS X as the host.  I have Windows 8 and Ubuntu as a guest running on my OS X.  But last night I ran out of space in my virtual environment. What I found is unlike VMWare , there is no native GUI app to expand the disk. Either you have to download something like Gpart or use the command line. So I thought I will type up something quick to show how to expand  resize the virtual disk.

First of all shutdown the guest OS (virtual image).
Then open a command windows or a terminal window with admin access
Type:  vBoxManage modifyhd <‘full path/vmimage.ext’> –resize <size in MB>
It will take a few seconds to minute to complete.
You should now see the new size on the Oracle VM VirtualBox Manager

In this example, I am resizing the image to 35 GB

virtualbox