01.Blogs :
travisowens  

How to shrink Virtual PC hard disks Rated Excellent [5 out of 5].

While Virtual PC can resize a hard disk image larger as needed, it won't shrink it back down if large files are deleted.  Because of this your hard disk image can easily grow out of control.  After looking through some Microsoft documentation and web chats I found out how to shrink files in VPC2004 (I use SP1, which might be required).

Step 1: flush your temp files, found in:
   C:\Windows\Temp\
   C:\Documents and Settings\<username>\Local Settings\Temp\
   C:\Documents and Settings\<username>\Local Settings\Temporary Internet Files\

Step 2: Boot up the OS, run defrag on the HD and make sure you enable the setting to "put everything at the beginning of the drive"

Step 3: In your VPC session menu choose "CD" > "Capture ISO Image" and choose "Virtual Disk Precompactor.iso" which you can find in "C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\"

Step 4: You should have a new drive available, if not, reboot your OS session

Step 5: Once you double click the ISO mounted as a drive, it will prompt you to compact your HD image.  At this point it will only "prepare" the image for compacting.  This can take awhile (5mins to a couple hours)!

Step 6: Shutdown your OS

Step 7: In VPC choose "Settings" for your image in question, and go to the "Hard Disk 1" section and on the right side you can use the "Virtual Hard Disk Wizard" button.

Step 8: Choose to edit an image and find your target image and choose to "Compact" it.  This can take awhile too
(5mins to a couple hours)!

Done!

If you read my first source, there are some extra tricks to shrink the drive even further but I found this easy method to be very effective and give back the majority of the wasted space.  Obviously you can also use NTFS's built in compression on the .VHD file, but keep in mind compression will slow down the performance of VM session, although considering you are probably running Win95 or 98 on a machine with 2ghz or more and HDs that are faster than they were 7yrs ago, you do have speed to spare.  I will admit, even after using the compacting process I mention above, you will get very good compression when using NTFS compression, many times 1/2 the actual size.

Sources:
http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/en/transcripts/wct032304.asp
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q833138

posted on Tuesday, January 03, 2006 4:24 PM by travisowens

# re: How to shrink Virtual PC hard disks @ Tuesday, January 03, 2006 5:55 PM

Learnt something new today. Good stuff.

Bernard


 
03.UPDATE CALENDAR :
<January 2006>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234

05.MY LINKS :

07.Subscriptions :

Subscriptions


© Copyright 2005 Microsoft Corporation. All Rights Reserved.
Terms of Use | Privacy Statement | Code of Conduct | Hosted by MaximumASP for Microsoft
WHO-BAR