Who says you can't expand VHDS?

17. August 2006 12:36 by Csaborio in General  //  Tags:   //   Comments (0)
It is a well known fact that dynamic VHDs that reach their limit cannot be made any bigger when running in Virtual Server.  I recently stumbled onto this problem when creating a differentiating disk from a base install of a dynamic disk of Win2K3 with 2 GB tops space.  I had two choices at this point:

  1. Create a new VHD and install everything I had done
  2. Try to find a way to expand the VHD with whatever hack came to my mind.
Being the stubborn person that I am, I decided to follow the latter.

The good news is that i t can be done - the bad news is that it may be a bit of an overkill!  Anyhow, here is what you need:

  1. A BartPE ISO that has some kind of imaging utility (ours has Ghost and TrueImage - amazing programs!)
  2. A fixed empty VHD that will fit the image of the disk you are trying to expand
  3. Lots of patience
Step 1: Image the Image

  1. Add the BartPE.iso as an additional CD-ROM Drive
  2. Add the empty VHD (let's call it images.vhd) as an additional VHD
  3. Boot your PC, it should boot from the CD and Bart-PE should start
  4. Format images.vhd into an NTFS drive using whatever you want
  5. Create an image of your source disk (the one you are trying to expand) and place it on the images drive
Step 2: Restore the Image

  1. Create a new VM configuration with a new VHD that will hold the new size (format it as NTFS with any utility you like)
  2. Add the BartPE.iso as an additional CD-ROM Drive
  3. Add the images VHD as an additional VHD
  4. Boot your PC, it should boot from the CD and Bart-PE should start
  5. Use Ghost or whatever you want to restore from the Image from the Images.vhd
Reboot.  Enjoy!