If you find your virtual disk file growing exponentially with Windows XP mode under Windows 7 (Pro, Ultimate and Enterprise) this might be related to the fact that the virtual disk file used in XP mode is a “differencing” disk. A differencing disk is linked to a dynamically expanding or fixed disk and only saves the changes relative to the base disk. This protects the base pre-configured Windows XP install but a side effect of this is that the differencing disk only grows in size and never shrinks.
This shows the location of the differencing VHD and the Parent disk (From the settings screen in Virtual PC)
Recovering this space is a simple process but needs to be preformed offline and not while XP mode is hibernated. The process of “compacting” reduces the size the disk by removing unused space on the virtual hard disk.
First shutdown the XP mode virtual machine. Click Start then Windows Security within the virtual machine
Select Shutdown then Shutdown then OK
By default the differencing .vhd is located in…
C:\Users\<PROFILE NAME>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines
(Size is 3GB)
From the parent Windows 7 machine select Start then “All Programs” then Windows Virtual PC
Right click on the Windows XP Mode virtual machine and select Settings
Select Hard Disk 1 and select Modify from the right side.
Select Modify then Compact virtual hard disk
Post compacting my install I recovered 50% of disk space.
Size is 1.5GB
Blog, Virtualization, Windows