SQL Server Failover Cluster – sysprep your cloned images

Hi Friends,

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

1_SQL_Server_Failover_Cluster_sysprep_your_cloned_images

   

This will open Windows Explorer with the directory where you can find sysprep utility.

2_SQL_Server_Failover_Cluster_sysprep_your_cloned_images

Double click sysprep. Make sure to select Generalize option, since that will generate the new SID. Click OK.

3_SQL_Server_Failover_Cluster_sysprep_your_cloned_images

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 !

 

 

   

About Amit Bansal

Amit Bansal is always brainstorming around SQL Server. Despite working with SQL since 1997, he is amazed that he keeps learning new things every single day. SQL Server is AB's first love, and his wife does not mind that. He tries to share as much and spreads the SQL goodness. Internals and Performance Tuning excites him, and also gives him sleepless nights at times, simply because he is not a genius, but quite a hard worker and does not give up. It has been a long and exciting journey since 1997, you can read here: http://sqlmaestros.com/amit-bansal/ He is on Twitter: https://www.twitter.com/A_Bansal

View all posts by Amit Bansal →

3 Comments on “SQL Server Failover Cluster – sysprep your cloned images”

  1. Good thought Amit to start this series from these very basic steps, just to add to the above topic:

    Sysprep is replacement of an earlier Utility NewSID which was awesome. Now you must be wondering why i am rating NewSID over sysprep.. While using the earlier utility you did not need to activate your windows again but in SYSPREP you need to. Sealed …. ok now stop searching or asking about this earlier software because that software is discontinued and even if you get it from somewhere(you can get it from me also, incase you want) it won’t work on Windows 2008. Need not to mention why microsoft discontinued that software Money mouthbecause everybody was using this quick & small utility to create a new virtual image without licensing\activation…Money mouth. Cool

    Sarab

  2. I want to mention one more thing, it is very obvious but for those who are Beginners:

    It doesn’t matter which virtual technology you are using be it Hyper-V, Virtual Server or VMWare you’ll be able to use SYSPREP since this is a windows utility embedded within windows binaries.

Leave a Reply

Your email address will not be published.