0

Created a VHD from a machine using disk2vhd.

File created is 61GB, partition on the VHD is set to 149GB.

Virtual PC won't let me use the VHD (as the partition is too large, has to be below 127GB).

Disk Management mounts the VHD, all accessible but won't 'Shrink Volume' (hangs).

DISKPART mounts the volume and using shrink querymax gives me the option to shrink the volume, but when shrinking it doesn't seem to complete (or show any errors why) leaving the VHD volume set to 149GB.

enter image description here

Tracked down some hard to find software called 'VHD Resizer' but it only seems to give me an option to 'shrink' the 61GB file to 149GB!

What have I missed, or any other tips? Do I need to look at repairing this VHD some how?

5
  • VHD Resizer is pretty much it. Have you tried another VM software that might allow you to boot up the VM and modify the partition while its booted?
    – Ramhound
    Commented Apr 26, 2013 at 11:41
  • 1
    Not yet as don't have anything handy (ie big download for VirtualBox and I'm on a slow connection). It would be quicker to edit the partition on the machine then rerun disk2vhd, especially as I might have something wrong with the .VHD file?
    – HaydnWVN
    Commented Apr 26, 2013 at 13:01
  • Duplicate of problem from: superuser.com/q/357055/102661 (with no answers or solutions)
    – HaydnWVN
    Commented Apr 26, 2013 at 13:33
  • I've used VhdResizer to increase VHD size, but never the opposite. I too think it might be best to resize the original partition and run disk2vhd again. Otherwise is it possible to create a VHD from a partition in another VHD? If so, perhaps you can split the primary partition in the VHD to 125GB + 24GB and then create another VHD from the first partition...
    – Karan
    Commented Apr 26, 2013 at 18:46
  • I've tried resizing the volume when booting in VirtualBox, along with damaging the Windows install that no repair install seems to resolve it has totally screwed up the partition tables. GParted seems unable to resize or repair the partition within the VM, although it finds many things wrong with it.
    – HaydnWVN
    Commented Apr 30, 2013 at 11:15

0