

It didn’t work for me then I thought, probably needs a sudo before the commands but that didn’t seem to work either. You run the following command, turn off the VM and then run the Compact virtual hard disk function.Ĭat /dev/zero > zero.dat sync sleep 1 sync rm zero.dat I thought I’d found a solution in Ben Armstrong’s MSDN Blog, Compacting the virtual hard disk of a Linux virtual machine. For Windows guest OS’s Microsoft provides a Precompactor tool that zeroes out the unused space so that compaction works. This is because the compact routine only compacts disk area that is filled with zeros. When you compact a Linux dynamic virtual disk in Windows Virtual PC you’ll find that almost no space is saved.
