Of recent there has been some discussion (both internally at work, on the web, and in the general community) on building Virtual Machine templates.  So I thought I’d jam out a quick (but sizable) blog entry on what works for me.

Anyway, I have two libraries I maintain:  “Sterile Golden Masters” and “Working Templates“.  My descriptions of each aren’t entirely accurate, but it works for me.  But before I get too much further, think of the Templates as copies of the Golden Master - but tweaked.

The Sterile Golden Masters

  • Each VM is built from slipstreamed media, using a manual, next, next finish install.
  • I use IDE drives within the VM for compatibility with VPC
  • There are 16 VMs in the library covering every OS/Service pack combo from NT4 to 2003R2 (and now Vista)
  • Each VM includes a copy of the i386 folder copied locally
  • Each VM includes a copy of all my favourite stand alone Utitities and Sysinternals Tools (Key point is all tools are stand alone EXEs and do not need to be installed, eg: robocopy)
  • Each VM includes a change log with all the settings to install the OS
  • Each VM does not have patches installed
  • The Virtual Machine Additions are not installed

I rarely use a copy of these images for testing (except under extreme circumstances with difficult vendors), they are rather a base for templates I build on top of.  Each Golden Master is a clean, sterile, reproducible build with no software or patches installed of any kind.  I zip each of the images up and burn them all to a double layer DVD.  I go back to them maybe once or twice a year.

So what are the Working Templates

  • Are copies of the Golden Masters
  • They all have the lastest production Virtual Machine Additions installed
  • Each VM has auto-login enabled, BGinfo configured, and assorted shell tweaks for convenience
  • Defragmented filesystem and pagefile
  • Each template includes a change log with all the settings, changes and tweaks applied
  • The Sysprep folder is pre-packed ready to go, but not applied (it’s there, just in case)
  • Compacted with the precompactor iso

These guys are the templates that I take copies of and use everyday for testing and documenting “stuff”.  Although NT4 and 2000 support has officially ended, I still find myself using these templates every few months for something.  So I guess I’ll continue to use them until the need disappears.

My Lab-on-a-DVD

I’ve taken copies of the 2003 R2 Enterprise VM and created 4 new templates, DC, Exchange, SQL2000 and SQL2005 - all are members of LAB.VIRTUAL domain.  This combined set of 4 images are perhaps the templates I use the most.  The domain has some basic group policies, 1200 user accounts (half have mail boxes).  Zipped up this fits nicely on a DVD - but I prefer to keep copies extracted on my External USB drive for convenience.

So there we have it.  This is what I use for my day-to-day needs.  During the month I might find myself building/documenting/testing several projects.  This means a new environments with different requirements for each project — each new project I take a copy of the VMs I need, and typically I’m ready to go in under 10 minutes.  About the same time required to get a coffee :)

Well, that’s what works for me, and my needs are portability.  Fairly straight forward, could be more elegant, but brutally functional!  Any questions, drop me a comment :)