- Virtual Disk Precompactor Download
- Virtual Disk Precompactor.iso
- Virtual Disk Precompactor.iso Download
- Virtual Disk Precompactor
- Virtual Disk Precompactor Iso Download
One of my machines is set up with a small virtual BizTalk environment - a domain controller, an SQL server and a BizTalk server - running under Virtual PC. Works like a dream - I love drag-and-drop to the virtual machine (Virtual Server, are you listening?) - but the hard disk is only 37GB. I say 'only' but it was fine a few years ago before the use of virtual machines really kicked off. Now, with three virtual machines running, I'm starting to find they won't save state - instead I have to close them down so no extra state file is created.
- X64: C: Program Files (x86) Microsoft Virtual PC Virtual Machine Additions Virtual Disk Precompactor.iso; Run the Precompactor Go to My Computer and double click on the mounted disk. It will begin to run the precompactor software which will essentially zero out all the free space on the disk, making it available for elimination from the file.
- Select CD --> Capture ISO Image --> browse to C:/Program Files/Microsoft Virtual PC/Virtual Machine Additions/ --> select Virtual Disk Precompactor.iso --> OK --> Yes Once pre-compacting is complete, select CD --> Release ISO Image, and then shut down your VM.
- If you want to precompact virtual hard disk files from within a virtual machine, once you capture the precompact.iso to the virtual machine CD or DVD drive, you can double-click on the drive to launch the Virtual Disk Precompactor.
Looking around, I found that Compaction is the key. There are a number of Knowledgebase articles and Blog posts detailing the steps:
It is an ISO image that you can mount in the virtual machine and can be found in the Virtual Machine Additons directory. After running the Virtual Disk Precompactor you can let Virtual PC compact the VHD.
- (KB 888760) How to prepare a Virtual Server 2005 virtual hard disk file to send to Microsoft Product Support Services
- (KB 833138) A virtual hard disk file is larger than the used disk space that the guest operating system reports
- (Blog) Tips of the Day on .NET - How to compact my virtual disk?
- (Blog) Shared Points for SharePoint... - How to compact a Virtual PC image
What I've done below is compile a list of the best approaches from these articles. Don't forget Step 0...
Virtual Disk Precompactor Download
Step 0 - Backup the VHD
- No, really. Copy the VHD to another disk or machine.
Step 1 - Clean up disk space within the virtual machine
- Disable hibernation
- In Windows XP, open Power Options in Control Panel, select the Hibernate tab and clear the checkbox for enabling hibernation.
- In Windows Vista, run 'powercfg -h off' from an Administrator's command prompt.
- Disable the pagefile
- Open System in Control Panel, select the Advanced tab, click the Settings button for Performance, select the Advanced tab, click the Change button and choose 'No paging file'.
- Disable prefetching
- Disabling Prefetch (EnablePrefetcher=0)
- Disable System Restore
- Empty Windows Update folder
- %ProgramFiles%WindowsUpdate
- Empty the Drivers Cache folder
- %windir%Driver Cachei386
- Empty the Service Packs folder
- %windir%ServicePackFiles
Delete all patch/service pack installation filesThis is everything from the %windir% folder beginning with $NtServicePack.. and $NtUninstall.. but NOT $hf_mig- Run the Service Pack Clean-up tool (with SP2 for Windows Vista/2008)
- Delete files and folders inside %windir%SoftwareDistributionDownload (and only Download)
- Delete all *.LOG files
- run 'Del *.log /s' from a command prompt after changing directory to the root of the drive.
- Minimise the DLLCache
- run 'sfc.exe /cachesize=1', reboot and then run 'sfc.exe /purgecache'
- Run 'Disk Cleanup'
- Click the button on the General tab of the properties page for the drive in Windows Explorer
- Choose all options; this will purge the Temp folder, Temporary Internet files and the Wastebasket, amongst others.
- If running SQL Server...
- Reduce SQL logs
- Remove unwanted SQL database
Step 2 - Defragment the virtual disk within the virtual machine
Step 3 - Run the PreCompact Tool within the virtual machine
Virtual Disk Precompactor.iso
- Capture the PreCompact tool ISO-image
- %ProgramFiles%Microsoft Virtual PCVirtual Machine AdditionsVirtual Disk Precompactor.iso
- Run the PreCompact tool.
- This can take anywhere from 5 mins upwards to complete. Time for a coffee break.
- Shut down the virtual machine.
From the Virtual PC 2004 SP 1 readme file:
SP1 includes Virtual Disk Precompactor, a utility that is designed to 'zero out'—that is, overwrite with zeros—any available blank space on a virtual hard disk.
We recommend that you use Virtual Disk Precompactor before you compact a dynamically expanding virtual hard disk. Using Virtual Disk Precompactor should result in a smaller compacted virtual hard disk. After you install SP1, Virtual Disk Precompactor.iso is located in the folder: Program FilesMicrosoft Virtual PCVirtual Machine Additions.
To use Virtual Disk Precompactor, you must first capture Virtual Disk Precompactor.iso. To do so, use the standard procedure for capturing .iso files. For more information about this procedure, see 'To capture or release a CD or DVD' in the Virtual PC Help.
Virtual Disk Precompactor.iso Download
After you capture Virtual Disk Precompactor.iso, you can run Virtual Disk Precompactor by going to the CD drive of the virtual machine. To view Help for Virtual Disk Precompactor, type precompact -help. To run Virtual Disk Precompactor, type precompact.
Virtual Disk Precompactor
Step 4 - Compact the VHD
Virtual Disk Precompactor Iso Download
- Run the Virtual Disk Wizard from the VPC console
- Select 'Edit an existing disk', locate the VHD file you want and select 'Compact it'
- If you have the disk space, don't replace the existing file justb in case something goes wrong. You do already have a backup but you don't want to have to go through the cleanup process again.
- Wait for several minutes until the process is finished and the file size is reduced.
- Start the virtual machine.