Windows 7 XP mode differencing disk blowout? Try compacting your VHD.

3. January 2010

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)

image

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

image

Select Shutdown then Shutdown then OK

image 

image

By default the differencing .vhd is located in…
C:\Users\<PROFILE NAME>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines

image (Size is 3GB)

From the parent Windows 7 machine select Start then “All Programs” then Windows Virtual PC

 

image

Right click on the Windows XP Mode virtual machine and select Settings

image

Select Hard Disk 1 and select Modify from the right side.

image

Select Modify then Compact virtual hard disk

 image

Select Compact

image

Done!

Post compacting my install I recovered 50% of disk space.

image Size is 1.5GB

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Blog, Virtualization, Windows , , ,