From: bobfnospam on
Bo Berglund wrote:
> Is there anyone reading this thread that has a suggestion for how one
> can shrink a VHD image that was created by disk2vhd from a drive that
> was> 130 Gb but contains less data than 130 Gb?
>
> I have checked ways that do *not* work:
>
> 1) Use Acronis in a VPC2007 guest to clone the big disk onto a smaller
> one. Does not work since the VPC2007 BIOS does not recognize the big
> VHD drive at its true size. And Acronis is not smarter than BIOS....
>
> 2) Make an Acronis backup on the source PC and use this to restore
> onto a smaller VHD in a guest. Does not work because now the HAL
> adjustments are not made so the VHD is not bootable without
> bluescreening (I don't have Universal Restore). And it is not handling
> a disk2vhd image anyway.
>
> 3) Use VHDResizer from VMToolkit to reduce the size of the disk. Does
> not work because it does not offer the option of *reducing* the size,
> only to increase it.
>
> What I have not tried yet is:
>
> 4) Use a VirtualServer 2005 guest and attach the big VHD as a SCSI
> drive that does not have size limitations. Then use PartitionManager
> or similar to reduce the partition size below 128 Gb.
> Then when that is done use Acronis to clone the partition onto a new
> VHD disk smaller than 128 Gb.
> I guess this would work, but involves multiple time-consuming steps as
> well as obtaining a commercial software package (PartitionMagic) just
> for this single job.
> But can the VHD be attached to a VS2005 guest as a SCSI drive in the
> first place?
>
> Is there some other method that can be used in situations like this?

VHDResizer will shrink a VHD (under the right conditions) -- I used it
for that a few weeks ago. I used disk2vhd just to copy the 32GB system
partition which is located at the start of my large disk, which is over
500GB. VHDResizer got it under 128 GB. I could attach to Virtual PC
(as provided for Windows 7), but could not successfully boot. I booted
a Windows XP retail kit, did repairs, and still was not successful. (It
took some guessing how to boot from a CD image when there was an
apparently bootable hard drive. The boot order needs to be changed in
the BIOS, and getting to the BIOS is non-obvious.)

Bob