Maintaining your Virtual Machines – Windows XP Mode

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.

  1. Open your Virtual Machine Folder (typically found in %UserProfile%/Virtual Machines/)
    Virtual Machines
  2. Select the Virtual Machine you would like to compact
  3. Click on the Settings button in the toolbar immediately above the Virtual Machine Listing (a pop-up dialog will appear)
    Windows Virtual PC Settings
  4. Select Hard Disk 1 (right-hand side of the dialog)
  5. Click on the Modify Button (Left-hand side of the dialog – another pop-up will appear)
    Modify Virtual Hard Disk
  6. Click on Compact virtual hard disk
    Compact Virtual Hard Disk
  7. Click on Compact
    Compacting Virtual Hard Disk
  8. Wait for the the Compaction Success Confirmation (this can take more or less time depending on many factors)
    Virtual Hard Disk Compaction Successful
  9. 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.