2009.Dec.17
Filed under: Programming — jon @ 17:51

Since most of what I found on the web was either wrong or more complicated than needed, here is what worked for me. (My drive image file was old.vdi and I wanted a new copy of that disk, new.vdi, which was 24 gigabytes (give or take).

  1. cd ~/.VirtualBox/HardDisks
  2. vboxmanage createhd –filename new.vdi –size 24000
  3. vboxmanage clonehd old.vdi new.vdi –existing
  4. Open VirtualBox, select the virtual machine, and click on Hard Disks.
  5. In the Attachments section, click on the existing image file name (old.vdi) and click the Select Hard Disk button to its right. This will open the Virtual Media Manager dialog.
  6. Select the old image file and click Release. Remove the old image file (old.vdi).
  7. Click Add and browse to the new image file (new.vdi). It will now appear in the Hard Disks list.
  8. Click the Select button at the bottom of the Virtual Media Manager dialog.
  9. Go download a gparted LiveCD .iso file. Click on the virtual machine’s CD/DVD-ROM settings. Make sure “Mount CD/DVD Drive” is checked, pick “ISO Image File”, and browse to the gparted ISO file you just downloaded.
  10. Click the OK button at the bottom of the Settings dialog to close it.
  11. Start up your virtual machine. Click in the window and press F12 to bring up the boot devices menu. Pick “c” for CD/DVD-ROM.
  12. Run gparted, click on your partition, and resize it to occupy the whole disk.
  13. Shut down gparted, reboot, and wait for Windows to check your new hard disk.
  14. Celebrate!

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

  • dreamhost.com logo
    Happily hosted by dreamhost.com
  • This site is green.
  • Bike Month
    miles biked47.50
    gallons saved1.36
    dollars saved$5.22
    pounds CO2 saved26.60
    calories burned1677