Creating a SysPrep Image for VM

When you want to have a machine with fresh OS, then go ahead with a SysPrep Image. This save a lot of time. What exactly does a SysPrep Image do to an existing VM. Nothing much, but it does strip off all the machine information. So when you create a new SysPrep Image from an existing VM and if you try to launch the SysPrep Image, then while starting up it asks for machine name, Network Connections etc.. etc.. and other settings.

Assumption : You have your base VM in a good working condition. It is up and running.
Let’s see Step by Step process on how to SysPrep the base VM:
Pre-Requisites :
1. Make sure, you are logged into your VPC and the Virtual Machine is running. Here my VM has XP SP2 Operating System and I am logged in as local Administrator.
2. The XP SP2 Operating System CD is inserted and you should be able to access it.
Procedure:
1.Go to the XP SP2 CD contents. Go to Support -> Tools folder. Here copy Deploy.cab file to your local machine.

clip_image002

2.Now create a folder named Deploy anywhere on the local machine and place the Deploy.cab(that you have just now copied) in the folder. (Suppose that I have created my Deploy folder under C: Drive)
3.Once done, extract the content of Deploy.Cab into Deploy folder that you have created.

clip_image004

4.Now go to Start-> Run and type in type C:\Deploy\Setupmgr.exe and click OK to start Setup Manager.

clip_image006

Click on Next Button, and proceed further. Here it asks for creation of a new Answer file or if you want to modify the existing file. This is important as it stores all the required information which is needed for setup to run.

clip_image008

Select Create New and click on Next button. Select Sysprep Setup.

clip_image010

Here in this screen, you need to select the OS for which you are creating the Answer file. In my case, its Windows XP Professional. So I have selected it.

clip_image012

After the selection is made, click on Next to see the screen which talks about manual or automation of the setup.

clip_image014

Select Fully Automate and click on Next button. Here comes lots and lots of setup options that are required while you are actually installing the OS.

A Brief overview of what each node talks about :

clip_image016

Coming to each and every one node, we need to provide information on Name,Display Timings,Time Zone, Product Key, Various Network Settings and other Advanced Settings. After you fill one setting and click on Next will take you to the next setting. Once all are completed, click on Next button.

clip_image018

This is asking for the sysprep.inf file to be saved. Once the path is specified, click on OK.

The completing manager shows up with the entire summary and click on Cancel to finish.

clip_image020

This marks the completion of Setup Manager Wizard.

In addition to saving your answer file sysprep.inf in C:\Deploy\, the wizard also creates a C:\Sysprep folder and saves a copy of your sysprep.inf file in there also. Copy the files Sysprep.exe and Setupcl.exe from your C:\Deploy folder to C:\Sysprep so that your C:\Sysprep folder

clip_image022


Go to Start-> Run and type C:\Sysprep\sysprep.exe and click OK to begin sysprep. A dialog box appears and then click on OK.

clip_image024

In the System Preparation Tool 2.0 screen, select “Don’t reset grace period for activation” and click on Reseal.

clip_image026

Now click the Reseal button, click OK when asked whether you want to regenerate SIDs, and your VM will be sysprepped and will automatically be shut down.

Since the base VM is now sysprepped, it will now no longer be used as VM. So we need to delete the associated .vmc file. Select the base VM (In my case it is newxpsp2) and just click on Remove button.

clip_image028

It asks for confirmation. Say Yes.

clip_image030

After that, now go to the place where the newxpsp2 VHD is placed. Make a copy of it in the same folder. (You can make as many copies of this .VHD file as you need).

clip_image032

Once you’ve made your copies, set the Read Only attribute on the properties of the Base VM’s .vhd file so it can’t be accidentally deleted or used by Virtual PC.

Now we are ready to use these Cloned VHD’s. Lets see how this can be done.

Go to Start->Programs->Microsoft Virtual PC and click on New Button.

clip_image034

Click on Next button and select the options as shown in the screenshot :

clip_image036

Now click on Next and give a new .VMC Name

clip_image038

Click on Next and select the required OS.

clip_image040

Adjust required RAM here and go to next screen.

clip_image042

Click on Existing Virtual Hard Disk and click on Next (Here we will be giving the path of the newly copied VHD)

clip_image044

Give the path of the VHD and then Check “Enable Undo Disks” checkbox.

clip_image046

Click on Next and click on Finish button to see the VM in Virtual PC Console.

clip_image048

Just select the New VMC that we created (SysPrep) and click on Start button.Now the Sysprep process will generate new SIDs for your new XP machine. Once XP starts up you’ll be presented with a few quick prompts for information specific to your new computer, and then the Welcome screen will appear followed by your desktop. Repeat this procedure with each new XP VM you want to create (and repeat everything above with Windows Server 2003) and then use your new VMs in your Virtual PC environment.

Thanks for reading the post. Happy sysprepping… Have a great day. Please post your comments here or write us at anyhelpinit@gmail.com

No comments: