Monday, September 08, 2008    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Dec 2007 >>
S M T W T F S
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Search

Categories
 • Acrobat (2) [RSS]
 • Adobe (67) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (22) [RSS]
 • AIR (126) [RSS]
 • Appearances (118) [RSS]
 • Books (68) [RSS]
 • CFEclipse (14) [RSS]
 • ColdFusion (1143) [RSS]
 • Data Services (12) [RSS]
 • Fish Tank (2) [RSS]
 • Flash (103) [RSS]
 • Flex (365) [RSS]
 • Home Automation (3) [RSS]
 • Jobs (93) [RSS]
 • JRun (12) [RSS]
 • Labs (27) [RSS]
 • LiveCycle (21) [RSS]
 • MAX (157) [RSS]
 • Regular Expressions (12) [RSS]
 • RIA (4) [RSS]
 • SQL (37) [RSS]
 • Stuff (503) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (136) [RSS]
 • Wireless (97) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Entry / Main
December 25, 2007

How To Shrink A Virtual PC Virtual Hard Disk

Microsoft Virtual PC uses virtual machine hard drive images as disks. These VHD files are typically dynamic in size, they grow as necessary. And I had one grow on me yesterday to over 40GB in size! Microsoft provides a Virtual Disk Wizard which can be used to compact virtual disks (when the virtual machine is not running). But, running it barely reduced the size at all. The problem? The wizard looks for space that has been zeroed out, so that must be done before running the wizard. It would have been nice if the wizard had spelled this out, and also provided instructions on how to do this. But it doesn't (which is odd, as Microsoft actually provides a mechanism to do this)! So, in case anyone else runs into this one, this is what you need to do:
  1. Power up the virtual machine.
  2. Clean up the drive (empty the Recycle Bin, get rid of temporary files, and so on).
  3. You may even want to defrag the drive.
  4. Then, locate a file named virtual disk precompactor.iso (it should be in c:\program files\microsoft virtual pc\virtual machine additions), and capture the ISO image (right-click on the CCD icon to do this). This will start the precompactor program which zeros out unused space.
  5. Then shut down the virtual machine.
  6. And finally, run the Virtual Disk Wizard which should shrink the virtual disk, removing all zeroed out space.
My virtual disk is now down to a more manageable 6GB, whew!

TrackBacks
There are no trackbacks for this entry.

No trackback URL. Trackbacks are only allowed via interactive form.

Comments
Thanks for this tip. I need more info on Microsoft's virtual pc.
# Posted By Bohol | 12/29/07 8:54 AM
You can even decrease the size by disabling the page-file before running defrag (this will need another reboot to get the setting inot effect) and yes this will slow down the system..
I use this to prepare sysprep VHD images..
# Posted By Albert | 1/9/08 3:13 AM
Hello Ben,

i found you information about "shrinking a VPC-File". I read you instruction, but what did you mean with step 4 "locate the file and capture the iso -file to what do this? do you have more tips for using the vpc?

Thanks for your support and regards from the north of germany (a little village between Bremen and Hamburg).

Regards
Carsten
# Posted By carsten | 1/26/08 11:20 AM
Carsten, there is a file named "virtual disk precompactor.iso" that is installed along with Virtual PC. Locate it. Then in the virtual machine map the CD to that file to use the CD image.

--- Ben
# Posted By Ben Forta | 1/27/08 12:19 PM
I was confused about step 4 too. With the Virtual PC running, you'll have a "CD" menu option on the Virtual PC's main menu. Choose that option, and it will let you capture the file as a CD image. Once you choose that option, you'll be able to browse for that ISO file and it will launch the Pre-Compactor
# Posted By Rob | 2/29/08 4:20 PM

  © Copyright 1997-2008 Ben Forta, All Rights Reserved