VMware Explore happening NOW!

How Do You Prepare Your Templates?

Template VM’s are specialized VM’s. They’re designed to allow you to rapidly re-deploy preconfigured virtual machines, with little to no fuss. Often, however, that is not the case. I mean, who doesn’t just right click and “Convert to Template…”

What that action does, is simply mark a file letting vCenter and ESX both know it’s now a template. Clever? Sure. Useful? Almost. When you do this you better make sure your template is ready to be deployed from. Here is a quick checklist to run down for Windows VM’s (is there another kind?) that you can use:

  • Set a strong admin password & document it. The resulting VM’s will be no good if you can’t log back in.
  • Make sure your configured apps are not bound to the VM’s IP address. When deploying the next hundred, this will be a pain to fix.
  • Defrag, for good measure. This one is debatable in VM’s, but is a good practice, and will help keep the template image file smaller.
  • Zero out – From Mr. Epping @ Yellow-Bricks, this will save you “a lot” of space as well.
  • Run sysprep. – This strips out the identity of the virtual machine, it’s SID’s and it’s computer name. This also allows you the opportunity to create an answer file to be used when redeploying the VM to make on lining it that much faster.

Have any extra steps? Have a procedure you use? Have a process for Linux VM’s, Solaris? I’d love to hear about it. Post in the comments or hit me up on Twitter @cody_bunch

20 thoughts on “How Do You Prepare Your Templates?

  • Hi Cody,

    How about aligning the OS patition. …for Windows Server 2003 anyway …for Windows Server 2008, I believe this wouldn't be necessary because Windows Server 2008 automatically set the offset to 1024KB. Any thoughts on this?

  • I always set my templates to DHCP and workgroup (usually VMClones) and then change the IP and domain membership though vCenter's Sysprep intergration at deployment.

  • Hi Cody, why would you need to sysprep your templates? When you deploy a VM from a Template the customization wizard will prepare the VM for you with sysprep, why the extra step?

  • One does not always use the customization wizard to deploy from template. Any one of VMware’s automation toolkits can be used to deploy tens or hundreds of VM’s from templates.

    Doing this before hand simplifies this (tho I suppose the parameters for the customization can be passed to the API as well).

  • Or better yet, copy SYSPREP to your vCenter Server in the designated folder and then use the customization options in VC to create your VM's. I was able to setup a template that asks for the computer name and IP address within VC and then deploy the server. Very easy to use, VMware did a great job with all of that.

  • Pingback: Webmaster Crap » Blog Archive » Professional VMware » Blog Archive » How Do You Prepare Your …
  • The VIC should align your VMFS, but not the partition within your guest OS. This probably isn't the greatest performance increase, but figure why pay any sort of penalty when you can align the partiion once on a template and be done with it. …at least that is my thoughts on it

    Another one might be to disable commonly unused services.

    Thanks,
    Pete

  • Or better yet, copy SYSPREP to your vCenter Server in the designated folder and then use the customization options in VC to create your VM's. I was able to setup a template that asks for the computer name and IP address within VC and then deploy the server. Very easy to use, VMware did a great job with all of that.

  • The VIC should align your VMFS, but not the partition within your guest OS. This probably isn't the greatest performance increase, but figure why pay any sort of penalty when you can align the partiion once on a template and be done with it. …at least that is my thoughts on it

    Another one might be to disable commonly unused services.

    Thanks,
    Pete

Comments are closed.