One of the features of Hyper-V that has made courseware development and delivery easier for me is the ability to create Parent (or Base) and Differencing disks. It allowed me to reduce the ‘reset’ time at the end of a course (to prepare for the next delivery) from two hours per machine to one minute per machine. If anyone wants to argue their value with me personally then that is the ratio they will have to argue.
Here’s how they work: I create my virtual machine and configure it to where I will want the users to start – I install the operating system, join it to the domain (or create a domain controller), and install whatever extra software I would need. I then shut down the virtual machine and create my ‘child VHD’ file as a reference (or Differencing) disk to the ‘Parent’ disk. At that point I can literally reset the labs to that point in time by simply resetting the differencing disk.
I have been working with the DPE team at Microsoft Canada delivering IT Boot Camps across the country for over a year. At the end of each class we had an entire set of instructions to reset each set of machines, which essentially involved replacing the VHDX files from our backup. Resetting the computers (22 of them) took upwards of three hours, and often enough the students discovered our Backup repository and made a mess of things, requiring us to restore that too from external media. For our most recent camp, which we are calling Windows Server 2012 v2.0, we have altered things a bit, instead using VM snapshots – we can revert to the base snapshot very quickly – less than 5 minutes per computer, and we are usually done within 30 minutes… a substantial improvement to be sure.
The decision to use this technology instead of Base/Differencing Disks was not wrong; it is just a different way of doing things. Having written and delivered several courses over the past decade (including several on virtualization) it has been my experience that while snapshots work well, there are a few ways that they can go wrong; it is usually human error that causes this, but they go wrong nonetheless.
***
For my course From Virtualization to the Private Cloud I decided to go the other route – Base/Differencing Disks – because I felt that with so much focus on virtualization we might end up using snapshots occasionally, and although Hyper-V definitely supports long trees of snapshots, it is vital that they be properly documented, and it is just as easy to revert to the wrong one.
Within my folder C:\VHDs I have a subdirectory called C:\VHDs\Diff where all of my Differencing Disks are stored. At the end of the course I make sure the students delete all of the snapshots, and then turn off all of the VMs. I specify Turn Off because all of the changes you might make are going to get discarded anyways, including the dirty shutdown. I then go around and delete the AVHD directory, then replace that directory from the backup. In less than a minute my entire environment (9-12 virtual machines) is reset and ready to perform as new the next day.
However Base/Differencing Disks are not exclusively the purview of courseware. Imagine having a test/dev environment where you needed to test different versions of the same set of code against the same master image. Because a single Parent disk can support several Differencing Disks you can install the different versions and compare them to each other side by side.
Imagine a VDI environment where your end users have Pooled VDI machines that needed to be reset at the end of every session. A single Parent Disk could then support all of your VDI clients, and when the shift is over the Diff Disk simply gets reset and the next user to log on has his clean VM based on the master.
As users begin to experiment and discuss Differencing Disks they are going to come up with several cases where they will be really helpful… I look forward to hearing from you what use cases you come up with, and how your experience with them is!
In my next article you will read the Step-By-Step, how-to create, manage, and use Differencing Disks. Stay Tuned!
Leave a Reply