Virtualization, Cloud, Infrastructure and all that stuff in-between

My ramblings on the stuff that holds it all together

Deploying a Virtual Machine from a Template with Virtual Center 2.5

(Apologies to fellow Brits for the spelling of “center/centre”, it bugs me too! but that’s the product name, spelling and all – plus it helps our worldwide friends who are coming in via Google)

Just incase you are interested here are the steps to do so.

I have a Windows 2003 Enterprise Edition “Gold” VM image that I’ve used for years (see this page for some more good ideas on that) and I’ve ported it all the way from VM Workstation 4.x, through 5.x, VMware Server 1.x, 2.x and now ESX 3.5.

I just clone it periodically and I keep updating and sysrep’ing the master image with the latest updates (SP2, current VM Tools, iSCSI initiator, BGInfo, etc.)

I used the VMWare P2V Convertor (which yes I slated earlier.. but it works in this instance) to convert from Workstation 6.x format for my new ESX server and manage it as a template via Virtual Centre.

1st off, Right click on the template and choose to deploy (hint: if you want to make a template right click on a VM you prepared earlier and clone/convert to template.)

clip_image001

Choose where you want to run the VM – this is a list of your VC data centres

image

Choose the ESX host where you want to run it – I only have 1 which is my desktop ESX server (https://vinf.net/2008/01/14/vmware-esx-v35-on-cheap-pc-hardware/)

image

I get this warning message, but this is because I’ve ported my VM across so many different versions of VMWare, and the template VM still has a virtual USB port – must get round to removing it!

image

Choose the datastore – this is my 500Gb SATA drive inside the PC

image

and you can pick a template to customise the VM, this essentially lets you choose (or not) to automatically run a SysPrep once the VM has booted – the “customization specification” is essentially a sysprep.inf file that you pre-created using the customization specification wizard (below).

The customization wizard does seem to add some bells and whistles as you can choose the VM machine name based on what you’ve called it in Virtual Center or spawn out to an external application/script which is a nice feature that I don’t believe you can do with standard Sysprep

image image

Anyway, back to the VM deployment..

Choose from your set of templates, I have just one at this stage that incudes the product key, regional settings and create the server name based on the VM name, note you can also break out to the customization wizard to make one time adjustments to the specification you’ve chosen.

image

You are then shown a summary of the VM you are going to create and given options to power it on once the clone is finished, or edit the virtual hardware (add more CPUs, disks, RAM, etc.) – not sure why edit hardware is (experimental) would think it would just spring up the normal UI for doing this within VC.

image

Interesting to note the warning image umm, this is deploying from a pre-built image – but I guess VC doesn’t know that for sure.

You’ll se a job submitted to Virtual Center’s queue

image

It took 9mins to deploy – and this was on my cheap ESX desktop PC so not the most high-performance disk subsystem – but more than acceptable, whenever I’ve had to do this in the past on a physical PC it usually takes at least this long to find the correct CD πŸ™‚

Proof here πŸ™‚ image

The VM is now booting and doing it’s sysprep/minisetup wizard without any hands-on required – it’s totally automated via the customization specification/template setup.

 image

OS Starting, installing VM Tools in the background

 image

VM Reboots automatically.. (but I wasn’t quick enough to get a screen cap of that..)

 image

Built & Ready to go! (my customization template makes the administrator account auto logon on 1st boot)

 image

Start to finish, a ready to use OS with all it’s service packs and any software I require in 11mins, and that’s on cheap hardware.. all the timestamp’s are in the screen shots if you need proof πŸ˜‰

Advertisements

11 responses to “Deploying a Virtual Machine from a Template with Virtual Center 2.5

  1. Justin January 29, 2008 at 7:00 pm

    I am having troubles with this step, I have a working master image but no matter what I try I cannot get the customization steps to work I have put all of the sysprep files where they belong. When I get to that step the options are greyed out. If you could email me and please let me know how you got the sysprep tools on your VC 2.5 install that would be great.

  2. vinf January 31, 2008 at 12:03 am

    I followed the steps in the sysprep section of this doc
    http://www.vmware.com/pdf/vc_2_templates_usage_best_practices_wp.pdf

    make sure you download the correct version of sysprep for your OS. I just extracted it from the Win2003SP2 CD and extracted the files to the appropriate location.

    there are sub-folders for each OS 1.1,2k,svr2003, svr2003-64,xp,xp-64.

    for reference I expanded the files from the deploy.cab file into the svr2003 folder.

    VC must know what OS you have based on your choices when creating the master VM config and looks in the appropriate path.

  3. Greg McLean January 31, 2008 at 2:43 am

    Wow! I really like your article. Screenshots are great, don’t you agree? We don’t use the sysprep, but maybe we should. I cannot make modifications during the deploying of the template to a VM. The customization buttons are greyed out! When I complete the deployment, I cannot change the name of the server!!! It states that the “account already exists”! This ia a real pain! I can rename it to any other name besides the one I named it during the deployment, where I’m asked to name the VM (not the server, but the VM). Any ideas??? Regards, Greg McLean Systems Analyst, County of Santa Cruz, CA. 831-454-2081.

  4. Simon Alexander September 12, 2008 at 6:21 am

    This is a great step-by-step article. I wonder if you’ve ever come across the issue I am having. I had the sysprep customisations working beautifully in VC2.0, but since upgrading to VC2.5, when deploying from a template I can run through the customisation wizard, and I see from the logs that the sysprep files are prepared and copied to the VM, but when the VM powers up it does not go through the sysprep/minisetup wizard. It comes up as a direct clone of the template. The sysprep files are sitting in C:\sysprep, and I’ve left it running for 10 minutes and nothing happens. I then have to manually run newsid. All the posts I’ve found talk about getting the wizard to run, but that works for me. It’s just this last step that’s frustrating me!!!

  5. Pingback: How to Deploy a Windows 2008 Server From a Template with vSphere « Virtualization, Windows, Infrastructure and all that “stuff” in-between

  6. Mike Maliska December 18, 2009 at 6:46 pm

    Thanks for the article has been a big help. I do however need to take this a step further. I have mastered the steps in the article and I have deployed and redeployed over 500 machines now. What I am looking for is a way to automate this process. Let’s say I make a new template and I want all the machine that were made with the old template to redeploy. I have to spend a lot of time doing this. Basically I am looking for a command line or API way of doing these steps.

    Thanks for your help.

    Mike

    • vinf December 18, 2009 at 7:48 pm

      There are loads of script type options – it’s not really my area of expertise but I’m sure Mr Renouf will have something on his site – http://www.virtu-al.net/

  7. Pingback: Location of Sysprep Files When you Install vCenter on a Windows 2008 Server « Virtualization, Windows, Infrastructure and all that “stuff” in-between

  8. Soham August 31, 2010 at 1:21 pm

    Hi
    The article is crystal clear, but I am having big problems with this task.
    Till ‘OS Starting VM tools installing’ everything is perfect, and then the Os goes into a reboot loop from which it never recovers.
    Please help ?

    • vinf.net September 2, 2010 at 10:50 pm

      What os? Maybe check vmtools is current

  9. vishnu May 9, 2011 at 6:49 am

    Hi,

    How can we deploy multiple VM’s using TEMPLATE………………

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: