Last week, I was playing around with SQL Server Failover clusters and setup SQL Server Failover clutser using 3 Hyper-V images. I am writing a series of blog posts just to pen down a few notes.
In this first post of the series, I want to talk about the need to sysprep your hyper-v images in case you are cloning your images to setup the nodes.
In case you are preparing a fresh image for every node & DC (that is, you are doing a fresh installation of Windows Server 2008 R2), you do not need to sysprep your image. But suppose you prepare your first image and just made a copy of it (and renamed the computer name, etc), then you need to sysprep the cloned image.
So what exactly is sysprep?
Basically, every installation of Windows operating system has an internal SID (Security Identifier). This SID has to be unique if you are setting up features like clusters, etc. When you clone an image and rename the computer, everything works fine including basic networking between the images, etc, but complex set ups like clustering will fail since the SID is duplicated due to cloning. Renaming a computer does not change the SID.
In order to change the SID, you need to sysprep the cloned image. Sysprep is a utility that comes with Winodows. This is how you can do it.
Start -> Run -> sysprep
This will open Windows Explorer with the directory where you can find sysprep utility.
Double click sysprep. Make sure to select Generalize option, since that will generate the new SID. Click OK.
Sysprep-ing might take sometime depending on what’s installed on the image. When I sysprep-ed an image with only Windows installation, it took less than 30 minutes. When I sysprep-ed an image which had 3 instances of SQL Server, it took about 6 hours.
After the reboot, you have a new SID for the image.
Happy sysprep-ing !