Did you know you can actually maintain your Virtual Machines? I sure didn’t! I have been using Windows Virtual PC / Windows XP Mode for a little while now and never thought remotely about maintenance. It worked, so why concern myself.
That said, over time I noticed that some of my Virtual Machine were bloating in size when I thought of the contents. These Virtual Machines were GB larger than what I thought they should be and thus hogging valuable Hard Drive real estate for no reason. As such, I started nosing around and discovered that you can in fact Compact a Virtual Machine.
Sadly, once again Microsoft has buried something useful under layers of menus. No clue why they chose to hide such a command under the Modify button, but if you dig a little, the option to regain a little hard drive space is indeed there.
Below are the instructions on how to do so.
- Open your Virtual Machine Folder (typically found in %UserProfile%/Virtual Machines/)

- Select the Virtual Machine you would like to compact
- Click on the Settings button in the toolbar immediately above the Virtual Machine Listing (a pop-up dialog will appear)

- Select Hard Disk 1 (right-hand side of the dialog)
- Click on the Modify Button (Left-hand side of the dialog – another pop-up will appear)

- Click on Compact virtual hard disk

- Click on Compact

- Wait for the the Compaction Success Confirmation (this can take more or less time depending on many factors)

- Click Close
Now, I’m not saying you need to do this every week, but after deleting a large amount of data, removing sizeable programs, … from a Virtual Machine, it may be a good idea to perform a quick compaction.