Prior to using Hyper-V as part of my daily development and test efforts I wasted man weeks every year. I lost days at a time configuring machines and recovering from updated NDP builds. I wasted hours every week repeating the same steps over and over.
I will be bold enough to say that Hyper-V allows me to get at least 15% more work done each week on less than a third of the hardware I had before and I never have long downtimes due to my machine being down. Even a total machine failure is not going to put me offline for longer than it takes to reinstall Windows and Office.
So how did I setup my environment?
The overall hardware investment is about $1300 (and that’s retail pricing that anyone can get).
To create my development environment I do the following (applying the latest patches at every step and CA eTrust is installed on every machine [physical and virtual])
My goal with the dev box is to optimize for quick resets when we take new builds of Visual Studio or the CLR. Since I work on the VS team I take new builds every few weeks. To do this I pre-install a lot of stuff, create some baseline snapshots and then mount the physical disk for my source enlistment. Mounting physical disk is REALLY IMPORTANT. You do NOT want your source code on a virtual drive because when you revert to an older snapshot you will lose it’s contents and that will both screw up your workspace contents (requiring a force sync) and may result in losing data (files that were added/edited but not checked in). Also the physical drive means build performance is not impacted by a virtualized drive. The virtual drives in Hyper-V (even the expandable ones) have great performance – but moving the build to a physical drive really helps keep things rolling.
One caveat – you cannot take snapshots with a physical drive mounted so you do not get live snapshots and you must unmount whenever you apply a previous snapshot (this is trivial, but for some reason the Apply operation won’t do it for you behind the scenes).
I can recover from an VS/NDP update in about 2 hours with this model. On physical hardware it would mean formatting and starting over – costing about a day.
When I take a new VS I will revert to step 12 and start over (I do export my configuration settings to make configuring VS easier).
My goal with the test boxes is, like the dev box, to be able to quickly recover from NDP updates but also to have a stable SQL and IIS environment to start from. I will create multiple identical test boxes that differ only in OS (2003 or 2008) and data width (32 or 64).
I can recover from an NDP update in about 30 minutes with this model. On physical hardware this would also be about a day.
The machine is now ready for testing. Did you notice that WSS was not installed? If I ever want it to be persistently installed I will create a new branch off the snapshot “NDP4 XXXXX installed (LIVE)” with WSS installed. Typically I will either install TFS choosing to let it install WSS or I will have it not configure WSS.
Yeah – I know a lot of you are reading this going “Well … DUH! I’ve been using VMWare/Xen/Whatever to do that for years …” I’m not saying this is new. What I’m saying is that for me, as someone who didn’t have the option to use those before, this is a game-changing way of development.
I will never go back to piles of boxes under my desk.
Credit is due to James Manning for pointing out several of the configuration choices I’ve described above.