VCP 5 – Objective 4.3 – Manage Virtual Machine Clones and Templates

Identify the vCenter Server managed ESXi hosts and Virtual Machine maximums

Doesn't really make much sense for me to just copy all the config maximums down here.  Check out the document here.
Identify Cloning and Template options
A clone is a copy of a VM whereas a template is a master copy of a VM used to create many clones.
Cloning allows you to create a copy of the entire VM including its hardware, settings, installed software, etc.  This can certainly save you time if you need to duplicate a VM.  If this needs to be done frequently, its probably a the best idea to turn it into a template.  This way the VM stays protected as templates cannot be powered on or edited.  By converting to a template you proved  a more secure way of preserving a VM config that you would like to deploy many times.
The settings when cloning are essentially the same as when creating a VM with the exception of the guest OS customization which include the following settings and configurations.
  • OS customization is used to help prevent conflicts between VMs having identical settings.
  • You can chose to either create a new customization or select a preconfigured one.
  • Must have VMware tools installed on the source machine.
  • Guest OS must be installed on SCSI Node 0:0
  • Sysprep tools must be installed on the vCenter machine.
  • ESX host must be running 3.5 or later.
  • Linux guest must have Perl installed.
  • Options to customize include
    • Name – Name of the VM.  Can append a numeric character for uniqueness.  Can also use the Virtual Machine Name as well.  Also, you can have the vSphere client prompt you for a name after the cloning or generate a name using a custom application configured within vCenter Server
    • Configure the licenses
    • Configure admin password and time zone settings
    • Can specify a script to RunOnce
    • Configure network settings
      • Typical (DHCP)
      • Custom (assign an IP for each interface attached to the VM).
      • Also, select whether the clone will be in a workgroup or domain.
    • Generate a new SID.
Clone an existing virtual machine
The process of cloning a VM is as follows
  1. Right Click the VM and select clone
  2. Enter a name a host, cluster, or cluster and host to run the newly created VM
  3. Select a resource pool
  4. Select a datastore and disk format.
  5. Select a customization option.
  6. Review options and here you can also configure
    • Power on the VM after its created
    • Edit the virtual hardware
    • Show all storage recommendations – This option only appears when the VM is stored on a SDRS cluster.  It lists the datastores that recommended for the VM.
    • Edit SDRS rules – Allows you to edit the rules that SDRS applies to this VM.
Create a template from an existing virtual machine
This process is very easy, right click a powered off VM and select Template  and one of the following options 
  • Clone to Template – Clones the VM and creates the template.  Leaves the original VM intact.  Allows you to specify the options listed above for cloning.
  • Convert to template – Marks the VM as a template.
Deploy a virtual machine from a template
Deploying a VM from a template is exactly the same process as cloning.
Update existing virtual machine templates
In order to update an existing template you need to convert the template to a VM.  Power on the VM, make your changes and updates, power down the VM and convert back to template.  Updating the template does not update the VMs that have been deployed from it.
Deploy virtual appliances and/or vApps from an OVF template
The process to deploy OVF templates is again relatively easy, so i will focus mainly on what an OVF is.  Essentially, an OVF is a file format that allows for exchange of virtual appliances across products and platforms.  OVFs offer the following advantages
  • The files are compressed, which allow for a faster download
  • The client will validate an ovf before importing it to ensure that it is compatible. 
  • Encapsulates multi-tierd applications or more than one VM.

OVFs can be deployed either from a local path of the client or from a URL or webserver.

Import and/or Export an OVF template
Importing an OVF
  1. Select File->Deploy OVF Template
  2. Specify your source location (URL, File)
  3. Accept license agreements.
  4. Edit the name and select folder locations
  5. Select a deployment configuration which includes memory settings, number of CPUs and reservations.
  6. Select host/cluster/resource pool
  7. Apply a VM storage profile if applicable
  8. Select a datastore and disk type.
  9. Configure IP allocations and vService dependencies (explained in vApp section).
  10. Done.

Exporting an OVF

This process was explained in the previous vApp section of the blueprint.

Determine the appropriate deployment methodology for a given virtual machine application
Once again you have to know your environment to do this.  Here are a few examples…
  • If you have an application that you need a duplicate of for short term testing, a clone operation might be best
  • If you have a web application that you consistently deploy new web servers for, it might make sense to convert this and deploy from a template.
  • If you have multi-tiered application that you need to duplicate somewhere else, a vApp or an OVF template will be the best way to package it up and distribute it.

Leave a Reply

Your email address will not be published. Required fields are marked *