Resize An Existing .vdi Virtualbox Image – EASILY!

Written by Gregory Milby | Friday, November 20th, 2009
, , ,

Resize An Existing .vdi Virtualbox Image – EASILY!

Start off by creating a fresh new drive of the size you’re after using the VirtualBox user interface. Then, locate both the your old, smaller HD and the new, larger one and run the following command:

VBoxManage clonehd --existing oldhd.vdi newhd.vdi

After some progress indicators ahve come and gone your HD should have been cloned to the larger one. You now need to use some software to expand your drive partition into the new space. Vista and W7 have this feature built in to Disk Management, or you could use something like GParted. I have never had luck with the integrated windows disk management tools, so I opted to use a free product called EASEUS PARTITION MASTER – home edition:

resizer_toolThis tool was easy to install directly into the new vdi image.  Walked through the wizard after clicking on “Resize” – it rebooted itself and resized the partition without a fuss.

The command line entries for running the VirtualBox commands:

gmilby@gmilby-ubuntu64:~/.VirtualBox/HardDisks$ ls
XP_10GIG.vdi  xp.vdi
gmilby@gmilby-ubuntu64:~/.VirtualBox/HardDisks$ ls -l
total 6042484
-rw——- 1 gmilby gmilby      61952 2009-11-20 08:15 XP_10GIG.vdi
-rw——- 1 gmilby gmilby 6181380608 2009-11-20 07:56 xp.vdi
gmilby@gmilby-ubuntu64:~/.VirtualBox/HardDisks$ VBoxManage clonehd –existing xp.vdi XP_10GIG.vdi
VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone hard disk created in format ‘VDI’. UUID: 1366bb7f-e827-41de-90ce-763e82309f26
gmilby@gmilby-ubuntu64:~/.VirtualBox/HardDisks$

Resized .vdi image:
vdi_resized


Don’t forget to enter the Antispyware Give-away for December 2009!
Two lucky winners have won a free professional license of Superantispyware!



twitter-follow-me-post-150x111

Share and Enjoy:
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon

Related Posts:

  • No Related Posts

One Response to “Resize An Existing .vdi Virtualbox Image – EASILY!”

  1. syrbot (Greg Milby) Says:

    Virtualbox is like having an install of windows inside my linux box! http://www.attackr.com/resize-an-existing-vdi-virtualbox-image-easily/

Leave a Reply