How can I easily add storage to a VirtualBox machine with XP installed?

Edward Tanguay picture Edward Tanguay · Nov 6, 2009 · Viewed 111k times · Source

When I installed Windows XP on a VirtualBox machine, I made the hard drive only 10 GB since and assumed it would expand in size (as do hard drives in VMWare as far as I can remember, isn't this true?).

In any case, I'm trying to install Visual Studio 2010 beta on this Virtual Box XP image and it has run out of disk space.

Googling for an answer, I'm finding complicated tutorials like this which show you how to increase the size of a VirtualBox hard drive "in just a couple hours".

But I can't imagine it would be that hard to either:

  • increase the size of a virtual disk (after all, it is virtual)
  • create a new hard drive of, say, 20 GB and just attach it in the virtual machine as the D: or E: drive

How can I easily add storage space to a VirtualBox machine with XP installed?

Answer

gadildafissh picture gadildafissh · Nov 30, 2011

I found this nugget at the link following. It worked perfect for me and only took 5 seconds.

As of VirtualBox 4 they added support for expansion.

VBoxManage modifyhd filename.vdi --resize 46080

That will resize a virtual disk image to 45GB.

https://superuser.com/questions/172651/increasing-disk-space-on-virtualbox