If you build virtual machines running Windows operating systems and aren’t using SYSPREP you are costing yourself untold amounts of time. This post will explain be a brief explanation as to why.
Over the past few weeks I’ve been rebuilding about a dozen of my virtual machines (VMs) due to getting a new work laptop and finally having the hardware to run 3+ of them at once. The last time I went through a rebuild of VMs like this I started to dig into using SYSPREP so reduce the amount of time. For those unfamiliar, SYSPREP is a Microsoft utility that allows you to create a single base VM using the operating system (OS) of your choice and then clone that VM as much as you want. By itself that may not sound like much but in addition to cloning the OS you also carry over any of the system updates applied, applications installed, and most other configurations you perform. This will be a very important point to keep in mind.
Why Use SYSPREP
- Windows Updates – If you’ve ever installed a fresh Windows operating system and then gone into Windows Update you’re probably familiar with being greeted by a double digit (sometimes even triple digit) list of updates to apply. SYSPREP allows you to install those updates just once on the base image and then all cloned VMs will already have them installed. In my situations dozens of hours of Windows Updates are reduced to just an hour or two.
- Reduce install time of OS and applications – To a certain degree there is no install time. When you SYSPREP a machine you can choose an option to generalize the install. This means stripping out the SID and other personalization, so that when it reboots you can treat it like an entirely new machine with only minor configurations needed to get started. Applications that you install on the base image are also carried over to cloned VMs. There’s nothing like trying to sort out and remember all of the various 3rd party installs that you put onto your VMs.
- Quickly expand server farm – Most of the applications I work with (SharePoint specifically) are deployed to a server farm. With my new hardware I am able to run multiple web front end servers (WFEs), additional “client” machines, and other configurations that were previously not possible. If I want to spin up a fresh WFE I can clone the base image, join it to the farm, and be rolling in 30 minutes instead of hours it would take to create a fresh VM.
- Consistency – Consistency may not sound like a big deal, but when you are dealing with complex applications like SharePoint one less variable can mean far fewer headaches. When you know that all of your VMs come from a base starting point that reduces overall variance.
All said and done I can honestly say I’ve saved myself days (literally) of effort by using SYSPREP. I keep a copy of Windows 7, Server ‘03 R2, Server ‘08, and Server ‘08 R2 in the before, during, and after stages of SYSPREP. The before stage is important so that in a few months when more updates are released I can just apply them to that image and create a new base image to use instead of starting all over from scratch. Hopefully after reading this post I’ve convinced you to at least look into SYSPREP if you’re not using it already.