Ramblings From The Litter Tray of Life

How to Create a Template in ESX without Virtual Centre

Posted by graycat on 2 October 2008

One of the great things about using ESX server (or any other virtual server host really) is that you can deploy new servers really quickly and easily. In the VMWare offering you have to buy the Virtual Centre add-on which is aimed at managing multiple virutal host servers. Unfortunately if you’re in the situation where you don’t have or can’t get this and are stuck with the “basic” ESX licence then you could be a bit stuck when it comes to cloning or creating template machines.

Fear not though! Here is a handy little guide on how to achieve that same objective using only ESX and the p2v converter.

Step 1 – Create a Template in ESX without Virtual Centre

  • Obtain a copy of windows 2003/2008 (Please note: In order for ESX to run 64 bit guess O/S the hosts
  • Hardware bios cpu setting must be set to use Virtualization Technology.) See below
  • Launch Vmware Infrastructure client and connect over to the ESX server
  • Right click the ESX server and chose to create new virtual machine
  • Select Typical under virtual machine creation
  • Call the Virtual machine WIN2K3-TEMPLATE
  • Select a local vmfs partition if one has been setup, or chose a vmfs partition on external storage.
  • Select the appropriate Guest Operating System, either 2003 or 2008 etc..
  • Select 1 cpu (This can be changed in the future)
  • Select 256 for memory (This can be increased in the future)
  • Select no nics (This can be increased in the future)
  • Set the virtual disk size to 10 gig

Step 2 – Creating Client Virtual Server Image

  • Right click the server and choose edit settings
  • Select CD/DVD to use either client device, host device or data store iso, remember to select connected and connect at power on. Insert OS cd into ESX host, local client pc that you have connected to ESX from, or point CD drive to OS iso.
  • Click on Ok
  • Power on the virtual machine and install Windows
  • Customise Windows as per clients builds, please do not install any applications such as SQL or Exchange.
  • Install clients Anti Virus software (If mcafee don’t load epo agent, but load virus scan)
  • Install vmtools and enable hardware acceleration.
  • Load latest Microsoft Patches and Anti Virus definitions.
  • Install BGinfo (This displays server information on the server’s desktop.
  • Open Notepad and type in “.LOG” without quotation marks, save this file as MOD.LOG and place in the all users startup folder. This file will open each time an administrator logs onto the server and stamp the date and time. Should be use for admin to note down changes made to the server (Change Control). Remember to select save as type “all files” otherwise will stamp the file MOD.LOG.TXT
  • Enable Remote Desktop
  • Rename the administrator account to admin_local or to the clients preferred local admin name
  • Change the admin_local password
  • Run a disk defrag
  • Create a folder on the servers C: drive called “Sysprep”
  • Download sysprep and extract the contents to the Sysprep folder on the C: drive
  • Run Setupmgr.exe
  • Select create new
  • Select Sysprep setup
  • Select windows version
  • Select No, do not fully automate the installation
  • Type in Organisation name
  • Display leave at default
  • Select correct time zone
  • Enter product key
  • Leave the “use the following computer name” box blank
  • Select prompt the end user for password
  • Select typical Networking components
  • Select workgroup and leave name as workgroup
  • Click next on Telephony
  • Specify regional settings (Chose UK) and tick customise the default regional setting and click on custom and select UK
  • Click next to languages
  • Click next to network printers
  • Click next to run once
  • Click next to additional commands
  • Please enter a Identification string “Virtual Tech Solutions Ltd, Build %date% Gold Server Image Version 2.1” please replace with clients details
  • Click finish
  • Check that a file in C:\Sysprep\sysprep.inf has been created
  • Double click on sysprep.exe in the C:\Sysprep folder and select shutdown mode as Shutdown and click reseal. The Virtual Server will now switch off. PLEASE DO NOT POWER ON THIS VIRTUAL SERVER!!!!

Step 3 – Use Vmconverter to Copy the Template to a new Virtual Server

  • Launch Vmconverter
  • Select Convert Virtual Machine
  • Select Vmware Infrastructure Virtual Machine
  • type in the ESX servers IP address where the template resides
  • Enter username and password
  • Click next
  • Select the template server and click next
  • Select convert all disks and maintain size and click next
  • Select destination type as Vmware Infrastructure Virtual Machine
  • type in the ESX servers IP address where the template resides
  • Enter username and password
  • Click next
  • Type in the new servers name, click next
  • Select the target ESX server again, click next
  • Select the target VMFS partition to create the new virtual server from template on, click next
  • Select 1 nic and correct network
  • Don’t customise the guest, click next
  • Select power on new virtual machine after creation and select finish.
  • Check conversion process and once finished log onto the ESX server and access the new servers console and complete the setup wizard.

In case you’re using HP Servers, you may need to enable Virtualisation on them like this:

  • Restart server
  • enter to RBSU and
  • select F9 to enter the ROM-Based Setup Utility (RBSU).
  • Select Advanced Options > Processor Options.
  • Enable Intel Virtualization Technology

And that’s how it’s done. I know it’s a bit of a long post but once you’ve set the template server up it really is very easy to create a new server from it. On average it takes about 15 mins from start to finish to deploy a new server using this method. Not bad considering it’s free, huh? 🙂

One Response to “How to Create a Template in ESX without Virtual Centre”

  1. […] https://graycat.wordpress.com/2008/10/02/how-to-create-a-template-in-esx-without-virtual-centre/ […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: