Shrinking VPC Hard Drive Sizes

For those that have used Virtual PC before, you know how the vhd size can get pretty big in size.  I had one development image that we almost 8 gigs in size and it made it hard for remote developers to download the image.  You have been able to compact the virtual hard disk for sometime now but until the sp1 release, it did not shrink the vhd very far.  With the sp1 release, Microsoft included a precompact command line program.  Using the instructions below, I was able to shrink an XP development image from 7.7 gigs to 4.7 gigs.  One thing I did not do which may shrink it even more is to defrag the vpc hard drive before running precompat.

Instructions:

  • To use the precompact command line, you need to install the virtual machine additions first. 
  • Once that is done, you will need to capture the precompact iso (Virtual Disk Precompactor.iso) so that the precompat iso is mount to the cd drive.  The iso is located in c:\C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions. 
  • The precompact application runs inside of the vpc.  The run it, open a command line, navigate to the cd-rom drive (d:) and type precompact to compact all of the vhd files. 
  • After this is done, you will need to run the vpc virtual disk wizard,  select edit an existing virtual hard disk, then select compact it.

 


Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

November 21. 2008 06:43 PM