How to Build an Effective Virtual Machine Template
 

 

Use of the Microsoft Sysprep Utility

 

Microsoft sysprep utility is a great tool to help you roll out multiple operating systems.  Microsoft's detailed explanation can be found here http://technet.microsoft.com/en-us/library/cc783215.aspx

 

Sysprep works for Windows XP, Windows XP 64 bit edition, Windows 2000,  Windows 2003 and Windows 2003 64 bit edition, though each has its own specific version that you must use.

 

Windows Vista and Windows 2008 use a different toolset to accomplish the same task.  That is a book unto itself, and if you are looking into to it, search for "windows aik".  Just to be clear,  that subject is beyond the scope of this paper.

 

So for Windows XP, let us get specific about how to do this Sysprep thing.  We need to connect the Windows XP ISO file to our Virtual Machine.

 

For VMware Workstation, go to the VM pull down menu, and select Removable Devices, then select CD/DVD (IDE), and choose settings.  Click on the radio button for 'Use ISO image file', and select the ISO file for Windows XP.  Click OK.

Use ISO image file

 

For Fusion, go to the Virtual Machine pull down menu, select CD/DVD, and then choose CD/DVD settings.  Choose the appropriate ISO file for Windows XP.  Close the window to get back to the Virtual Machine.

CDs and DVDs

 

For both Workstation and Fusion, make sure that the connected checkbox is selected, so that the media is presented to the Virtual Machine.  If autoplay is enabled in the Virtual Machine, go ahead and close the Welcome To Microsoft Windows XP welcome screen.

 

Make a folder on the Virtual Machine, C:\sysprep

We will be copying files to this folder.

 

Navigate tot he D:\support\tools folder (this is the CD of the Virtual Machine).   You should see the following.

Tools Folder

 

Double click on Deploy.cab.

Deploy.cab

 

Select all the files here, and go to File pull down menu, and select 'Extract.'

Extract

 

You will be prompted to Select a Destination.  Remember the folder you made a few minutes ago...C:\sysprep?   We will extract to that folder.  Click Extract.

Select a Destination

 

Now we need to create a file.  The file needs to be called sysprep.inf

 

Depending on how you Windows Explorer is set to view files, when you create a new text file, you may call it sysprep.inf, but its real name will be sysprep.inf.txt.  The BEST way to verify that it is name correctly is from the DOS prompt.  If it is name incorrectly, the sysprep process will not work correctly.

 

I have selected the view that causes the most problems in Windows XP.

 

If you have created the file correctly, it's icon and description will look like the icon in the next screenshot.

 

So let's add some text to this file.  The text I've added allows you, during the boot of a newly deployed Virtual Machine, to name the computer, set the Administrator password, set the TCP/IP information, and determine workgroup/domain membership, with minimal input required by you.  See the xxxxx-xxxxx-xxxxxx-xxxxx-xxxxx?  Change that to be your 25 digit Windows XP license key.

 

Time zones.....
I know for a fact that EST is time zone 035, and that Phoenix is 015.  Other than that, you must research your own time zone settings.

Time zone settings

 

Save the sysprep.inf file, and run sysprep.exe.  Now close the Windows Explorer view (it will prevent you from seeing an error each time you boot your newly deployed template Virtual Machine).  You will see the following dialogue box, and can click OK to continue.

Windows System Preparation Tools

 

You will want to put a check into the box for Mini-Setup, and then click Reseal.

System Preparation Tool

 

You will be presented with the following dialogue box, and can click OK to finish.

System Preparation Tool

 

Your Windows XP image is going to clean itself up, and be ready to use as a template which can be easily and rapidly deployed by you in the future.

 

Before we go ahead and do our deployments, let's tweak our Virtual Machine configuration in the next section.