How to increase VirtualBox disk size in 5 minutes?

A few days ago, I realized that my VirtualBox instance's hard drive was almost full. I looked at the UI of VirtualBox management console but I could not find an easy way to expand the size of the hard disk. After a quick Google search, I found out that you can increase the size of the hard drive of your virtual pc with a console command.

Step 1. 

Turn off your virtual pc. Make sure you copy your .vmi file somewhere else for backup just in case.

Step 2.

Go to your console/terminal and run the following command.
> VBoxManage modifyhd --resize

For instance, in order to expand your .vmi to 128GB,  use the following.
> VBoxManage modifyhd "/Volumes/Dev Ext/VirtualBox VMs/windows/windows.vdi" --resize 128000

Step 3.

First step completes pretty fast but your virtual windows pc will not be able to see the extended hard drive as primary drive (in most cases C:\).  Therefore, you need to open "Computer Management > Disk Management" and then extend your drive by right clicking on your primary drive (in my case it is C:\) and clicking on "Extend Volume...". Following screenshot displays the UI after successful extension.

Voila! In less than 5 minutes, you have increased your hard drive of your VirtualBox instance! Use this method at your own risk and enjoy...


Popular posts from this blog

Space Character Problem on IE 6, 7, and 8

Does Netflix work on iOS 5 Beta 4?

Configure hosts File in Android