Sunday, October 5, 2008

How to compact Virtual hard drives?

When we develop in our virtualized dev environment, the virtual hard disk will expand dynamically in size. The problem is they don't compact automatically when we clean-up the VHD's. steps to reduce the VHD in size

1. Remove all unwanted files in temp locations or use CCleaner to remove all unwanted files.
2. Uninstall all programs which are unused in the dev environment.
3. Defrag the disk by using the system defragmenter.
4. select Capture ISO Image from CD menu and browse to the Virtual PC additions
5. Location is %ProgramFiles%\Microsoft Virtual PC\Virtual Machine Additions by default.
6. Mount Virtual Disk Precompactor.iso. The precompactor will start automatically.
7. Once it's done , shut down the Virtual Hard disk.
8. Select the VPC from the Virtual PC console. Click on the settings button and select the Harddisk1 from the left pane.
9. Click over the "Virtual Disk Wizard" button and click next in the wizard.
10. select Edit existing disk, next choose the compact option - this can take a while to complete

For more info KB888760 How to prepare a Virtual Server 2005 virtual hard disk file to send to Microsoft Product Support Services

No comments: