I was going sysprep a base image of Windows Server 2008 this morning and followed my own instructions on sysprepping Windows.
I went to the installation DVD and couldn’t find sysprep. A quick
google later and a bit of poking around revealed that sysprep is now
installed by default on Windwos Server 2008. You can find it at:
c:\Windows\System32\sysprep\sysprep.exe
The experience is also streamlined considerably. Simply run sysprep.exe above and you are presented with:
Check the “Generalize” checkbox (regenerates system SID), change the Shutdown Options to “Shutdown”, and click OK. The system will go through the sysprep process and shut itself down. You can now create cloned servers to your heart’s content simply by creating linked servers and booting the clone as originally documented here.
UPDATE: Benjamin Chau noticed that SIDs weren’t being regenerated. Turns out that you need to check the Generalize checkbox to make that happen.
c:\Windows\System32\sysprep\sysprep.exe
The experience is also streamlined considerably. Simply run sysprep.exe above and you are presented with:
Check the “Generalize” checkbox (regenerates system SID), change the Shutdown Options to “Shutdown”, and click OK. The system will go through the sysprep process and shut itself down. You can now create cloned servers to your heart’s content simply by creating linked servers and booting the clone as originally documented here.
UPDATE: Benjamin Chau noticed that SIDs weren’t being regenerated. Turns out that you need to check the Generalize checkbox to make that happen.
##################################################
Every time I need to set up a bunch of virtual machines, I have to go back and look up where to find the Sysprep tool and how to use it. Here are the details so I can find it in the future…
In case you haven’t encountered Sysprep before, it is a tool that allows you to create a base OS image (including Windows, Office, Visual Studio, or whatever other applications you want) and then re-package it. You can then create cloned disks (or just copy the whole thing) and when you boot the new disk, it is like booting Windows for the first time, except with all your software installed. You get to choose a new computer name, SIDs are regenerated, etc.
Each version of Windows requires the correct version of Sysprep. Where do you find the correct version of Sysprep? On your install disks in <DVD>:\Support\Tools\Deploy.cab. Although System Preparation tool for Windows Server 2003 Service Pack 2 Deployment claims to install the Sysprep tool, I’ve never been able to make it work on my system. So don’t bother wasting your time. Go to your original install media and grab the file from there.
Creating the Sysprep Image
- Open <DVD>:\Support\Tools\Deploy.cab and extract setupcl.exe, setupmgr.exe, and sysprep.exe to C:\Sysprep. (N.B. C: is your system drive. If you installed Windows to another drive letter, use that drive letter rather than C:.)
- Run setupmgr.exe from C:\Sysprep.
- The Setup Manager wizard starts. Click Next…
- Create new… Next…
- Select “Sysprep setup”. Next…
- Select the correct OS version… Next…
- Select “No, do not fully automate the installation”… Next…
- Enter Name and Organization, Time Zone, Product Key, and Workgroup or Domain. The other settings can remain defaulted. Note that you don’t want to specify the computer name since you will be creating multiple computers from the base image and you don’t want to specify the admin password, even encrypted. If the sysprep program can extract the password from the answer file, so can any hacker worth their salt. Click Next… through to the end.
- Finish… Save to C:\Sysprep\sysprep.inf. OK…
- Wait while Setup Manager finishes. Cancel… (Yes, odd way to exit a program that has completed successfully.)
- Run sysprep.exe.
- Click OK.
- Ensure that “Don’t regenerate security identifiers” is UNCHECKED. You want to regenerate the SIDs when each new clone boots.
- Click Reseal, OK to confirm that you want to regenerate SIDs, and wait for the system to shut down.
Creating a Cloned Server
- If you’re using VMWare Workstation, create a linked clone of your Sysprepped server. (You can also create a new linked disk using VirtualPC using File… Virtual Disk Wizard and then creating a new VM using the linked disk.)
- Change any VM settings such as memory. DO NOT change number of processors from 1 to 2 as the HAL (hardware abstraction layer) for uni-processor vs. multi-processor Windows is different. Your system will blue screen if you do this.
- Boot the cloned server.
- The Windows Setup wizard will appear. Next…
- Accept the license agreement. Next…
- Enter a new computer name and administrator password. Next…
- Windows will boot and you can log in with the administrator password you just entered.
- When prompted, click “Yes” to update your product activation.
- Select “Yes, let’s activate Windows over the Internet now”. Next…
- Select “No, I don’t want to register now; let’s just activate Windows”. Next…
- OK…
- Update this server… to go to Microsoft Update.
- Once you’re ensured that your patches are up-to-date, you can close the browser and click Finish… then Yes… on the dialog to start using Windows.
No comments:
Post a Comment