I recently installed a Windows XP virtual machine using Microsoft Virtual PC 2007. After installation, my dynamic virtual hard disk (.vhd) was about 11 GB in size which was obviously more than a freshly installed XP system requires. First off, I deactivated system restore on the virtual XP machine itself which brought the size of C: down to around 4.7 GB. However, the size of my virtual hard disk file did not change.
I tried using the virtual hard disk wizard to fix the problem by compressing the hard disk but that didn’t help. What DID help was using a tool that’s located in the folder “Virtual Machine Additions” in the Virtual PC installation folder. It’s an image called “Virtual Disk Precompactor.iso”. To use it, you need to boot your virtual machine, mount this image with Virtual PC (so your virtual machine can access it like a CD) and run the program on your virtual machine.
Once that’s been done, you can use the hard disk wizard to run the compression again. That should do the trick. It worked for me, anyway.
