Tuesday, April 01, 2008

How to expand a fixed VHD

There are times that I wish the virtual hard drive that I created could be bigger. Here is how to do it:

  1. download the VhdResizer from here: http://vmtoolkit.com/files/folders/converters/entry87.aspx
  2. select the old VHD as source and name your new VHD (make sure that your new VHD name is different from the source VHD name.), then hit resize buttom.
  3. after the VhdResizer finished running, you'll notice that the size of the new VHD is increased.

Wish it was this simple. Here is the steps you have to follow in order to expand the extra spaces you just allocated to the new VHD. (if you run the new VHD right now, you will notice that it's still have the same space. But if you go to Computer Management, you will see the extra space is unallocated).

Here are the steps to make the extra space available to your new VHD:
  1. attach the new VHD as data disk to your old VHD. (old VHD will be your C: and new VHD will be D:) (again, make sure the new VHD name is different from the old VHD name before you attach the new VHD to the old. Otherwise, you won't be able to extend the partition.).
  2. run the old VHD.
  3. open Command Prompt and type "diskpart".
  4. type "list disk". it will list all the disk avaiable on your VHD.
  5. type "select disk [disk index #].
  6. type "list partition".
  7. type "select partition [partition #].
  8. type "extend".

This should do it. Good luck.

No comments: