Category Archives: Windows 7

How to create a differencing VHD that refers to a parent VHD that is on a network share from Windows 7

I love the fact that Windows 7 can attach VHD disks as if they were local hard disks. This allows me to pull off some very interesting stuff that I will blog about later but one pain point has been that through the UI with only Windows 7 I cannot create a differencing VHD from a parent VHD that is stored at a UNC path on the network.

The solution to this is to install the latest version of Microsoft Virtual PC which can be downloaded form the Windows XP Mode website. After installing this you are now able to create differencing disks based on parent VHDs that are stored on your network at a UNC path as shown below:

$vpc=new-object -com VirtualPC.Application
$vpc.CreateDifferencingVirtualHardDisk("\\devnas\Data_Backups\SQLCluster1\NAV 2010.08.20 Differencing.vhd","\\devnas\Data_Backups\SQLCluster1\NAV 2010.08.20 Full.vhd")

Note: If you still have the parent VHD attached to a machine this command will silently fail. Make sure that the parent is not being used and is not attached to any machine before running this.

In a future post I will talk about some of the use cases for this technique that make it invaluable.

Hint: Multiple 300GB+ database development from a laptop with only an 120 GB hard drive as if all DBs were local