Mar 092009
 

It is a tool that allows you to resize a VHD (Virtual Hard Disk). VHD is Microsoft’s format for virtual disks, and is used by Virtual PC, Virtual Server, and Hyper-V. VHD Resizer can be used to enlarge or shrink virtual disks of all three virtualization solutions. Windows Vista and Windows 7’s system backup tools also use this format. However, it doesn’t make much sense to enlarge a backup image. There are also third party virtualization tools, such as VirtualBox, that support the VHD format.

VHD Resizer changes the size of the VHD, but not the size of the NTFS partition. Thus, if you access the VHD through a virtual machine, you just see a larger disk with additional unpartioned space. You have to use a partition management tool, like diskpart, to extend the partition. Only then can you make use of the full capacity of the virtual disk. Diskpart is a Windows command line tool.

Extending a partition with diskpart is very simple:

Launch diskpart on a command prompt.
Type “list volume.” This gives you the number of the volume that you want to extend.
Type “select volume volume-number.“
Type “extend.”

Download VHD Resizer from here

Screenshot

vhdresizer

Incoming search terms:

  5 Responses to “VHD Resizer – Resize Microsoft’s VHD (Hyper-V) files”

  1. VHD Resizer can’t be used to shrink virtual disks.
    It works only for enlarging!!!

    You can see the Min is already set as the size of
    source in the picture above.
    If you make the new size smaller than the Min,
    resize button will be disabled.

    This is not Resizer!! but Expander!!!

  2. Slow Joni, it is actually Resize. Inside VHD, if ntfs partition is for example occupying half space of all vhd capacity then you would be able to compress your VHD. in order to compress the size, first try the shrink operation from inside the VM then use Resize utility

  3. If you had an option to resize the partitions, I think you’d have a better solution. For instance if you create a VHD whose dynamic partition is larger than 124gb, you can never boot it in Virtual PC. You can’t resize it because VHD resizer changes the free space of the disk, not the size of the partition. Thus you have no way of ever booting the machine.

  4. However, as an alternative for partition resizing you can use Windows 7 Professional. From disk management, mount the VHD and resize the volume smaller than 127GB. One the partition is resized, dismount it and use VHD Resizer to create a new VHD that’s smaller.

    So it’s a 2 step process that requires you have Win7 Pro, but that is a workaround.

  5. There are two prerequisites for shrinking disks
    - there must be unallocated space within the VHD file itself (ie no partition created for the space). This is easily done by starting the virtual machine, opening Disk Management and selecting “Shrink” on the partition(s) within the VHD.
    - there can be no snapshots. You must delete the snapshots, shut the virtual machine down and wait for the merge to complete (view the progress in Hyper-V manager).
    After these two are satisfied, you should be able to shrink the VHD using VHD Resizer.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>