Sysprep a Windows Server 2003 SP2 VPC
Overview
Sysprep is a tool to prepare a system for system cloning. One of the common use is to clone a base VPC for testing/development. The benefit of sysprep is that it make every newly cloned VPC to have unique SID and/or computer name, so that SID conflict will not happen after the cloning process.
After a system is sysprepped and restart, it will prompt users for many configuration settings (e.g. product key, locale, computer name, administrator password etc.). Indeed these settings can be preset and stored in an answer file, to minimize user input)
Reference
1. System Preparation tool for Windows Server 2003 Service Pack 2 Deployment
2. Force Sysprep to Prompt for a Computer Name During Mini-Setup in Windows XP
3. How to Build a Sysprep Answer File for Imaging
Steps
Configure the base system
In this post I am using Windows Server 2003 R2 Enterprise Version with SP2. Finish all configuration and install all softwares you want before sysprepping the base system, once sysprepped the system is “seal”.
However, sysprep is not compatible with some Softwares / Server Roles, so you should verified them before sysprepping.
Install System Preparation tool
For Windows Server 2k3 SP2, please download the “System Preparation tool” from reference 1
After installing the preparation tool, extract files in C:\WINDOWS\system32\deploy.cab to C:\sysprep. There are two utilities that we will be using:
- setupmgr.exe – Setup Manager
- sysprep.exe – Sysprep main program
Make sysprep answer file (sysprep.inf)
You can use the “Setup Manager” to create the answer file. To do this:
- Run “setupmgr.exe” and click “Next >” in “Setup Manager”
- Select “Create new” and click “Next”
- Select “Sysprep setup” and click “Next”
- Select the corrrect Windows product (mine is “Windows Server 2003, Enterprise Edition”) and click “Next”
- At this step, I select “No” as I would like to left some information for user to input.
- Here you can enter the preset configuration values and proceed
- The “Computer Name” part, if you want system setup configuration to prompt user for Computer Name, you will have to select “Automatically generate computer name” in this step, and modify the created answer file according. I will later show you how to modify the created answer file.
- After you finish, setup manager will prompt you for the location to save the “sysprep.ini” file. Indeed the location of this file is not quite important as setup manager will also save the “sysprep.ini” file to C:\sysprep folder. This folder is for containing settings for sysprep and will be deleted after the system is sysprepped and reboot.
Please note that if you provide Product Key in the “sysprep.ini”, the key will be stored in plain text, so beware of any “sysprep.ini” file outside C:\sysprep folder, as they will not be deleted after reboot.
Sysprep the system
Run “sysprep.exe” to sysprep the system, click “OK” for the notification.
This default settings is what we need, so click “Reseal” and sysprep will start working and shutdown the system.
That’s it!
Discussion
What do you think? Leave a comment. Alternatively, write a post on your own weblog; this blog accepts trackbacks [trackback url].