Pages

SYSPREP for 2k3

When working with Virtual Machines, Sysprep is a real timesaver. You can, on a virtual machine, install several configurations of servers (SMS 2003, SQL or SCCM or vNext, etc), sysprep the images, and then have these pre-configured images ready to deploy to a VPC or any Vcenter  installation when needed, by just copying the appropriate VHD file over and associating it with a new VM.

In order to run Sysprep, you first need to install it. You can get a hold of Sysprep in two ways: it is on the \Support\Tools\Deploy.cab file on the Windows Server installation media, or you can download it from here. Once you get a hold of the Deploy.cab file, you should extract the contents to a directory on your HD, for example c:\Deploy.

SYSPREP1

This directory contains several useful tools, and you should definitely read the deploy.chm file for instructions and details on the process. There are two files that are of particular importance to the process: sysprep.exe and setupmgr.exe.

For sysprep to work completely automated, it requires an answer file, called sysprep.inf. This answer file contains the “answers” to all the questions asked by the Windows installer during the setup process. The answer file can be created manually with any text editor, but fortunately there is a nice wizard-like tool that can help you generate this file. This tool is the setupmgr.exe program:

SYSPREP2

This program allows you to generate the sysprep.inf file by presenting you the options and letting you enter the default answer. In order to fully automate an installation, follow these steps on the Setup Manager:

  1. Click Next on the Welcome screen
  2. Select “Create new” and click “Next”
  3. Select “Sysprep setup” and click “Next”:
    SYSPREP2a
  4. Select the type of system you’re going to sysprep, and click “Next”
  5. Select “Yes, fully automate the installation” and click “Next”
  6. Now you need to fill in all the information required to complete the process:
    SYSPREP2b

Once you complete the execution of the Setup Manager, it creates a new directory in the root of the system drive called sysprep. This directory contains all the information necessary for the Sysprep tool to execute.

SYSPREP4

Now you need to execute the Sysprep tool, sysprep.exe:

In this tool:

  1. Click “OK” on the warning dialog that appears when running the tool.
  2. Select “Don’t reset grace period for activation”
  3. Set the “Shutdown mode” to “Shut down”
  4. Click on Reseal. That will leave the image ready for copying.

Once the image is copied, you can just configure a new virtual machine with the new image, and start it up. The last portion of the Windows setup process will execute:
SYSPREP5

After a little while (<10min), the machine will reboot, and the process will be completed. You now have a brand new sysprep’d and cloned server up and running!!

 

for more info http://technet.microsoft.com/en-us/library/cc765993(WS.10).aspx

 

For Windows XP SP3 :-

 

Step #1

The first step is to download the Sysprep App which is included in the CAB file for Windows XP Service Pack 3 Deployment Tools. (Download Sysprep Tool)

Step #2

Next go to the PC you are going to be sysprepping and create a folder on the root of the C: drive called sysprep.

Step #3

Next you will need to extract the contents of the deploy.cab file you downloaded in Step #1 to the sysprep folder on the root of the C: drive.

Step #4

Now we are going to run the sysprep Setup Manager. Double click on setupmgr.exe.

Sysprep Setup Manager

Sysprep Setup Manager

Step #5

Click Next and it is going to ask you whether you want to modify an existing Answer File or create a new one. We are wanting to create a new one, so again click next.

Sysprep - New or Existing Answer File

Sysprep - New or Existing Answer File

Step #6

You now have three options: Unattended Setup, Sysprep Setup, or Remote Installation Services (RIS). In this example we are going to select the Sysprep setup option and then click next. (This creates a sysprep.inf file)

Sysprep - Sysprep.inf File

Sysprep - Sysprep.inf File

Step #7

Select Windows XP Professional and click next. (This will also work on Windows XP Home, Windows Server 2003 Standard, Web, and Enterprise.)

Sysprep - Windows XP Professional

Sysprep - Windows XP Professional

Step #8

In this step it is asking you if you want to fully automate the installation. That is up to you, either way works fine. In this example I will be using the “No, do not fully automate the installation.”

Sysprep - Fully Automate or Not?

Sysprep - Fully Automate or Not?

Step #9

Now we are at the configuration page. There is a lot in here so I am not going to go into detail. In fact, you don’t even need to input anything here for the sysprep to just work. However, everything you input in here will save you time and help shape your image.

Sysprep - Configuration Page

Sysprep - Configuration Page

Step #10

Once you are all done, you should be at the bottom and selected on “Identification String”; click Finish and it is going to prompt you for a location to create and save the sysprep.inf file. The default location is fine, as it will need to be within that sysprep folder on your C: drive. Once you hit ok you will then need to click “Cancel”. There is no close button.

Sysprep - Saving the Sysprep.inf File

Sysprep - Saving the Sysprep.inf File

Step #11

Now you should verify the sysprep.inf file by double clicking on it and opening it up with Notepad.

Sysprep - Verifying the Sysprep.inf File

Sysprep - Verifying the Sysprep.inf File

Step #12

There were a few changes with Windows XP Service Pack 3 and sysprep. The administrator’s profile is no longer copied over to the default profile. You will need to add a line within the sysprep.inf file to regain this important function. Under the InstallFilesPath section add this:

UpdateServerProfileDirectory=1

Once done, hit save.

Sysprep - Adding line to sysprep.inf so the administrator profile will copy over to default profile

Sysprep - Adding line to sysprep.inf so the administrator profile will copy over to default profile

Step #13

Now you are ready to start the sysprep, reboot, and capture your sysprepped image. Double click on the sysprep.exe and then select the following three options in order: Use Mini-Setup, Shutdown Mode: Reboot, and click Reseal. Make sure you have your media ready to capture your image. If you reboot fully without booting to your capturing software it will ruin the sysprep and you will have to redo the sysprep.

Sysprep - Preparation Tool 2.0

Sysprep - Preparation Tool 2.0

  • Sysprep will now get rid of any machine specific identifiers and shutdown the computer.
  • The hard disk is now ready to be imaged.  You can at this stage use tools such as Ghost or boot using your WinPE CD and capture the image to a WIM file.
  • Deploy your image to a computer and restart it.
  • If you start the new computer using the newly deployed image, sysprep will now setup Windows according to the settings in sysprep.inf.
    Image-0273
  •  

    For Windows Vista / 7 / 2008

     

    Type this command with administrative privileges in command prompt

     

    c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /shutdown /oobe

    c:\Windows\System32\sysprep\sysprep.exe

    The experience is also streamlined considerably. Simply run sysprep.exe above and you are presented with:

    image

    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.

     

    Using Your SysPrep’d Image to Create a New Virtual Machine

    Now, creating a new virtual machine will only take just a couple minutes.

    1. First, you need to copy your SysPrep’d image to a new name and to a new location where you will use this new virtual machine.  Copy your SysPrep’d image files (.vmc & .vhd) to a new location where you want your new virtual machine file to reside.
    2. Rename them to a new, appropriate name.  For example, if you are going to create a SharePoint server you might name them something like:
      1. MySharePoint2007.vmc
      2. MySharePoint2007.vhd
    3. Add this new virtual machine to you Virtual PC or Virtual Server; which ever you are using;
    4. Edit the configuration and make sure the virtual hard drive (VHD) is pointing to your new .vhd file.  In this example, the MySharePoint2007.vhd file.
    5. Configure any other items such as memory allocation and network cards as necessary.
    6. Start the virtual machine.
    7. You will receive a few prompts such as the name for you new machine.
    8. If you wish, you can now join you virtual machine to a domain.

    SysPrep is a must have time-saving tool for anyone who uses Virtual PC and/or Virtual Server.

    0 comments:

    Post a Comment