Sysprep | SQL Server 2012
Pluralsight blog Where devs, IT admins & creative pros go for news, tips, videos and more.
3,500+ tech & creative courses authored by experts - unlimited & online Get it now →
January 28, 2013

Microsoft Releases Sysprep Improvements for SQL Server 2012 Installs

By Computer Engineer

A few years ago, I was going through a lot of testing and I started using Microsoft’s sysprep tool to speed up copying virtual machines and getting a new VM up and running quickly. By avoiding duplicate “SID” entries (Security Identifier) from copied VMs, I wouldn’t have any issues connecting these copies to Microsoft’s Active Directory.

Then I needed to install Microsoft SQL Server on a regular basis. Fortunately, Microsoft provided a feature-rich command-line setup.exe so you could provide a complicated set of arguments on the command-line, pass an INI text file with various keywords or combine both together.

I really liked the option to pass arguments on the command-line, so I took the opportunity to wrap setup.exe into a nice Windows PowerShell script I named Invoke-SqlInstall for some private stuff I was working on.

At the time, I was working with SQL Server 2008 R2, and Aaron Nelson mentioned to me that SQL now had sysprep support built-into SQL Server itself.

I looked at the new sysprep support and played around with it a bit. I was a bit disappointed by a couple of things when I first started looking at this new feature:

  1. Only a few features like the database engine could be “prepared”
  2. Using a prepared image wasn’t much of a time saver versus command-line arguments or an INI configuration file

In an automation type of scenario, whether it took 30 minutes or so to install SQL wasn’t really an issue for me as long as it didn’t require any manual intervention. The fact that the SQL Server management tools couldn’t be included in a “prepared image” seemed like a bummer to me.

Going with centralized management recommendations, such as having management tools on a management station and not the server, isn’t always convenient.

Sysprep Support

Fortunately, Microsoft has improved its support for using sysprep with the release of SQL Server 2012 Service Pack 1 Cumulative Update 2.

Now, one can include just about every SQL Server feature in a prepared image, with the exception of failover clustering.

So what does this expanded support provide us in the real world, and particularly in the private cloud domain? TrainSignal is developing a complete course, System Center 2012: Configuring and Deploying a Private Cloud, on building a Microsoft private cloud led by Elias Khnaser based on Microsoft Windows Server 2012 with Microsoft System Center 2012 SP1.

Eli runs through using Microsoft System Center Virtual Machine Manager 2012 SP1 and goes through the process of talking about SQL sysprep, but in the state it was before SQL Server 2012 SP1 CU2. The course lessons completely cover deploying SQL Server in a private cloud, and now all of these extra features can easily be deployed.

For example, templates could be set up that provide the extra features that are now added such as the management tools, analysis and integration services. Eli walks through the process of creating these templates in the course.

I mentioned the fact that the DVD must also be made available when a prepared image is used. Fortunately, Eli also mentions during the course how one can work with the requirement of needing to have the DVD install available when the VM is provisioned. This is basically done without needing to copy the whole 6GB (or so) SQL DVD to every potential Hyper-V hosts, but the process is to basically share the DVD from a centralized location.

It’s pretty simple to pre-configure your VM template to be able to “bring” the SQL DVD with it, but after the VM is deployed, what about not attaching the DVD to that VM? Although not required, it’s something else that the course provides some guidance for.

Part of Microsoft’s private cloud architecture is System Center Orchestratror. Basically, once a SQL VM is deployed, you could consider creating an Orchestrator “runbook” or workflow that would automatically detach the SQL DVD from the VM.

Now, how cool is that? All through automation.

If you’re into learning about how to deploy Microsoft private clouds, Eli’s course is a must have as it covers System Center 2012 SP1 and all of the important details that relate to private cloud deployments. I think just about everyone that’s looking to learn about deploying Microsoft-based private clouds can learn something from this System Center Private Cloud course.

About the Author

is an IT consultant working in Canada. He has been working in the IT industry for over 12 years. He was awarded the Microsoft MVP award for his contributions to the Windows PowerShell community for 5 consecutive years (2007-2011). He has co-authored a book on Windows PowerShell, contributed to Microsoft Press and Microsoft TechNet magazine, and also contributed chapters for other books such as Microsoft System Center Operations Manager and Microsoft SQL Server. He has spoken at Microsoft TechDays in Canada and at TechMentor in the United States. He currently holds the GIAC GSEC and RHCE certifications, and is actively working on others.


Discussion