How to create a Windows 2003 Template in ESX 3.x

Author: NetworkAdminKB.com
Created: 2008-09-03
Modified: 2008-11-20

Information:

These are the basic steps to setup a Windows 2003 Template and deploy a new Windows 2003 OS using Sysprep.  However, the same basic principals apply to any Windows OS that uses Sysprep.

 

1)      Download the latest version of sysprep for Windows 2003 from Microsoft

a.       As of September 2008 that was: KB926028

                                                               i.      WindowsServer2003-KB926028-v2-x86-ENU.exe

b.      Extract sysprep from the downloaded file

                                                               i.      At the command prompt and within the same folder as the downloaded file type

1.      WindowsServer2003-KB926028-v2-x86-ENU.exe /x

                                                             ii.      Enter the path to extract the files to.

2)      Copy the extracted sysprep files to the Virtual Center server.

a.       Place the files in this location:

                                                               i.      C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

1.      This location is specific to the 2003 version of Windows.  See “Sysprep for other Windows Operating Systems” below for more information.

3)      Install Windows 2003 as a guest OS in VMWare

a.       Name the machine: Win2003_Ver_SP#_x##

                                                               i.      Ver = Is the version, Std (standard) or Ent (Enterprise)

                                                             ii.      SP# = Service Pack version to be installed (SP2, SP3, etc)

                                                            iii.      x## = used to indicated x32 bit or x64 bit of OS

                                                           iv.      Example: Win2003_Std_SP2_x32

b.      Below are best practices for templates

                                                               i.      Apply latest Service Pack

                                                             ii.      Install latest updates from Microsoft

                                                            iii.      Install VMWare Tools

1.      Custom install

2.      Install all VMware Device Drivers

3.      Do not install Share Folders

4.      Do no install Wyse Multimedia Support

                                                           iv.      Use DHCP to obtain IP Address

                                                             v.      Disable Windows Time service

1.      Configure VMWare Tools to synchronize time.

2.      Assumes ESX host is configured with NTP time servers.

3.      See ‘Timekeeping in VMWare and Virtual Machines” for more information

4.      Note: Running DCPromo will automatically enable the time service, since all DC’s are time servers for the domain.

                                                           vi.      Delete all ServicePack and Hotfix uninstall directories from %systemroot%.

1.      The are usually $NTUnistallxxxxxx$ and $NTServicePackUninstall$

                                                          vii.      Defrag all the drives and schedule a defrag weekly.

c.       Below are common tasks you should consider performing for the template

                                                               i.      Enable Remote Desktop for administration

                                                             ii.      Disable WinHTTP Proxy Service

                                                            iii.      Remove IE Security Enhancements

                                                           iv.      Install and configure SNMP, WMI SNMP, and WMI Installer

d.      Below are common Desktop applications that you may consider installing.

                                                               i.      Adobe Reader

                                                             ii.      WinZip

                                                            iii.      Anti-Virus Software

1.      Depends on the ability of the software to handle a computer name change, test first.

e.       Tasks that cannot be done because of Sysprep

                                                               i.      The follow items have been found to be undone by sysprep

                                                             ii.      Changing drive letters for CDRom, secondary HD, etc

                                                            iii.      Renaming or customizing Network Connections

4)      Clone the Virtual Machine to a Template

a.       Choose clone so the original is always available.

b.      Shutdown the Guest OS of the target virtual machine.

c.       Open the VI Client

d.      Select the Virtual Machine

                                                               i.      Right click and select “Clone to Template…”

                                                             ii.      Template Name: Win2k3_Ver_SP#_x##

1.      Ver = Is the version, Std (standard) or Ent (Enterprise)

2.      SP# = Service Pack version to be installed (SP2, SP3, etc)

3.      x## = used to indicated x32 bit or x64 bit of OS

4.      Example: Win2k3_Std_SP2_x32

5.      Note:  this is different from the actual VM name that starts “Win2003_”

                                                            iii.      Select the Template Inventory Location

1.      Click Next

                                                           iv.      Select the Host or Cluster to assign the template to

1.      Click Next

                                                             v.      Select the data store to hold the Template

1.      Click Next

                                                           vi.      Select the format to store the Template in.

1.      Because we are Cloning, we can select Compact to save space

2.      Otherwise select Normal

3.      Click Next

                                                          vii.      Review selections

1.      Click Finish

5)      Deploy a new Virtual Machine and create the Customization Settings

a.       Open the VI Client

b.      Click the Inventory Button drop down

                                                               i.      Select the “Virtual Machines and Templates”

1.      Allows you to view Templates on the left pane of the VI Client

c.       Right Click the Template from the list in the left pane of the VI Client.

d.      Select “Deploy Virtual Machine from this Template”

                                                               i.      Select Name and Location page

1.      Name: Enter the VM name

2.      Inventory Location: select the location

3.      Click Next

                                                             ii.      Select the Host or Cluster page

1.      Select the Host/Cluster

2.      Click Next

                                                            iii.      Choose a Datastore Page

1.      Select the appropriate Datastore

2.      Click Next

                                                           iv.      Guest Customization Page

1.      Select “Customize using the Customization Wizard”

2.      Click Next

                                                             v.      Customization Wizard Appears

1.      Registration Inforamtion

a.       Name: type the name of the registered owner

b.      Organization: type the organization of the registered owner

2.      Computer Name Page

a.       Select “Prompt the User for a name in the Deploy Wizard”

b.      Click Next

3.      Windows License

a.       Product ID: enter a valid Windows Product ID for the OS

b.      Server License Mode:

                                                                                                                                       i.      Select the appropriate mode for your organization

c.       Click Next

4.      Administrator Password Page

a.       Enter the default Administrator password for this template

5.      Time Zone Page

a.       Select the appropriate time zone

b.      Click Next

6.      Run Once

a.       Use this to run any special commands or scripts to further customize the OS

b.      Click Next

7.      Network Setting Page

a.       Select “Typical Settings”

b.      Click Next

8.      Workgroup Or Domain Page

a.       Select Workgroup

b.      Enter a default workgroup name.

c.       Note: To prevent issues manually add to the domain afterwards.

d.      Click Next

9.      Operating System Options

a.       Check “Generate New Security ID (SID)”

b.      Click Next

10.  Save Specification

a.       Check “Save this customization specification for later use”

b.      Name: enter appropriate name

c.       Description: enter appropriate description

d.      Click Next

11.  Ready to Complete

a.       Review Summary

b.      Click Finish

                                                           vi.      User Settings Page (the customization specification you just completed)

1.      Computer Name: enter the computer name you wish to assign to the virtual machine

2.      Click Next

                                                          vii.      Summary Page

1.      Review Summary

2.      Click Finish

6)      Deploy a new Virtual Machine using existing Customization Specification

a.       Using the same steps as above do the following changes.

b.      In step “5.d.iv” above select “Customize using an existing customization specification”

                                                               i.      Select the Customization Specification you wish to use.

                                                             ii.      Click Next

c.       Skip all of “5.d.v”

 

Notes:

Windows 2003 R2: Use the same customization specification for this OS as your regular Windows 2003.  Do not use the Windows 2003 R2 license key in the customization specification.

 

More Information:

Virtual Center: Template Usage and Best Practices

Timekeeping in VMWare and Virtual Machines

 

 

Sysprep for other Windows Operating Systems

The Basic System Administration guide for Virtual Center 2.5 requires that the sysprep files be extracted to the VirtualCenter server for guest customization to be available when creating a virtual machine from a template. Below is general information on the sysprep specific versions needed.

 

Sysprep 1.1 files

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1

Download: Sysprep Update version 1.1 Q257813_W2K_spl_X86_EN.exe

Instructions: Extract the EXE, then copy the contents of the tools folder to the 1.1 folder.

 

Windows 2000

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\2k

Download: Windows 2000 SP4DepoyTools.exe

Instructions: Extract the EXE, then extract this file: i386\deploy.cab. Copy the contents of the file to the 2k folder.

 

Windows 2003

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

Download: WindowsServer2003-KB926028-v2-x86-ENU.exe

Instructions: Extract the EXE, then copy the contents to the svr2003 folder.

 

Windows 2003 x64

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003-64

Download: WindowsServer2003.WindowsXP-KB926028-v3-x64-ENU.exe

Instructions: Extract the EXE, then extract the file SP2QFE\deploy.cab. Copy the contents to the svr2003-64 folder.

 

Windows XP

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

Download: WindowsXP-KB838080-SP2-DeployTools-ENU.cab

Instructions: Extract CAB file, then copy the contents to the xp folder.

 

Windows XP x64

Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp-64

Download: WindowsServer2003.WindowsXP-KB926028-v3-x64-ENU.exe

Instructions: Extract the EXE, then extract the file SP2QFE\deploy.cab. Copy the contents to the xp-64 folder.

Article ID: 97, Created On: 9/17/2011, Modified: 9/17/2011