As the title suggests, I work in Microsoft Consulting Services as a field guy.  This usually means that I work out of a backpack – have trusty laptop, will work anywhere.  Most anywhere, that is.

Doing messaging and infrastructure projects, I often have a need for a test environment that I can use, abuse, and abuse again.  My customers generally have test environments available, but more often than not, they’re not what you might consider a development lab more than they are a pre-production lab – an environment that should mimic production as closely as possible to test changes and final code builds.  When you’re writing code, performance invasive configuration changes, testing out build processes, etc, you need a lab environment that you can abuse and rebuild as you please.

This is where Windows Server 2008 Hyper-V comes in.  My Microsoft standard issue laptop sports a decent dual-core processor that supports virtualization, and runs Intel’s Santa Rosa chipset, so I can scale up to 8 GB of RAM in it (which I have.)

Having the laptop that supports Hyper-V has provided me with a way to stand up a development lab for script development, build testing, etc that won’t (can’t) affect anything else in the world.

Hyper-V allows me to set up a number of virtual machines with a combination of virtual networks so I can do a lot of cluster set up, tear down, install, uninstall, etc – all without clobbering the network or an established Active Directory environment.  Being virtual also lets me roll back or very quickly set up another system if I need it.

So, in my current engagement – I am currently running 8 virtual machines: 1 domain controller, two CCR mailbox nodes, an SCR mailbox node, a client access server, a hub transport, and a pair of public folder servers.

The CCR and SCR mailbox servers each have 9 virtual disks – 1 for the system, then 8 more to simulate the LUN design that we’re going with (for testing database creation scripts).  The hub transport has a couple of additional virtual disks as well for message tracking and logging.

Networks wise, I have three of them:

  • “External” – an external network bound to the physical NIC in the ThinkPad.  This enables me to use a VM to go off-host and get to Microsoft Update or TechNet if I need to.  I have a couple of non-Exchange-lab VMs that use this NIC as well, but for my day-to-day purposes, this virtual network goes unused.
  • “Internal Network” – an internal-only network that is available to the host system as well as the VMs.  This network is the primary network that is used by the virtual machines, and is on a non-routable private IP range (10.0.0.0/8) that isn’t used by my customer (in case I fat-finger a VM and put it on the external network I mentioned above).  Since this is exposed to the host, I can map a drive to my domain controller and copy up my scripts and other bits for distribution to the VMs.
  • “CCR Cluster Network” – a private network (available only to the VMs) that is used for cluster heartbeat.  Since there won’t be “real” traffic on this network, I don’t care that I can’t get to it from the host, and helps simulate a real heartbeat/management network that might be used in production.

Hyper-V allows me to very easily change configuration settings, swap networks, rollback, set up a new machine – all things that would be very expensive, time-consuming or even impossible to do in a physical lab environment.

As an example, just this morning… “turned off” the two CCR nodes, flattened their system disks (which consists of deleting two files), recreated their system disks (copy two files), and reinstalled Windows Server 2003 on them.  Reformatted their data virtual disks just the same way – copied some template disks I keep around and had their names match the old ones.  Voila!  Two brand “new” mailbox servers that are going to be victims of my next build of the install scripts.

If you do any kind of personal development and need a test platform that can very easily adapt to your requirements and your work style, I’d strongly suggest checking out Hyper-V and see if it’ll work for you.  Particularly with the release of Microsoft Hyper-V Server, this stuff just gets easy and inexpensive to do.