Resizing Oracle VirtualBox drives

by Greg Thu, June 09 2011 13:54

It is not uncommon to undersize your virtual drives while experimenting with various virtual machines.  This can be a problem when a test machine suddenly becomes production and you find yourself with a critically undersized C: drive.

This is not a problem in VirtualBox.  In version 4.0.0.8 (possibly earlier) a command line tool will let you import a VDI file from one image to another.  Simply follow these steps, especially for Windows 7/Vista/2003/2008 images:

  1. Create a new hard disk image with the sizes and parameters the way you like.
  2. Run the following command from a command prompt in the VirtualBox application directory. 

C:\Program Files\Oracle\VirtualBox>vboxmanage clonehd --existing
[full path to source image] [full path to newly created image]

  1. Change the appliance settings to use the new larger drive, discarding the smaller.
  2. Once booted into the VM, use Windows Disk Management Service to expand the volume and you have a more space.

image

Tags: ,

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading