In the first part we will create an sysprep’ed image with SQL 2008 R2 on Windows Server 2008 R2. This will be used as a base for our deployment. I am not going to go into details to slipstream service packs of SQL server into the installer. There is a great article already published on SQL Server Setup blog.
Ok, lets get to work.
First, lets deploy Windows server. Since I have already built Sysprep’ed image of Windows Server, I will deploy a new VM using template. I will share Sysprep steps here which can be used to sysprep Windows Server too. To Deploy a new VM which will become our SQL server:
I will leave other settings up to you, pretty straightforward.
Once the new VM is ready: Copy the sql installation to a directory (do not forget the name of this directory, we will need it). The source could possibly be on a network share but your deployed VM/service need to be able to access it.
Run setup in this directory and install the required components (.NET Framework):
Then select “Image Preparation of a stand-alone instance of SQL Server”:
Couple next’s and then accept license, next, install required files, next…
Then, select the features you intend to use in the image (you can typically select all to use one image for SQL deployments, it is up to you)
Take a note of Instance ID. This will be needed later. This is not an instance name.
Next, and confirm and Click prepare
After it completes, I will go ahead and also install SQL management studio (SSMS) before sysprepping. The process is similar.
After the installation completes, close all SQL setup files. Now, need to sysprep the image:
After Running Sysprep, select OOBE, Generalize, and Shutdown as seen below:
The image is now ready to use.