In vSphere 7.0 and later, you can edit the contents of the VM templates by checking them out, making the necessary changes, and checking them in.
You can track history of changes over time by using the vertical timeline view. The vertical timeline view provides you with detailed information about the different VM template versions, the updates that privileged users have made, and when the last change was made. By using the vertical timeline, you can revert VM templates back to their previous state or delete the previous version of a VM template.
In addition, you can deploy a virtual machine from the latest version of the VM template without any disruptions while it is checked out for update. You can update the virtual machine and check it back in into the same VM template.
Templates in Content Libraries
Templates are primary copies of virtual machines that you can use to deploy virtual machines that are customized and ready for use. Templates promote consistency throughout your vSphere environment. You can use the content library to store and manage templates of virtual machines and vApps. You can use VM templates and vApp templates to deploy virtual machines and vApps to a destination object, such as a host or a cluster.
Content libraries support two types of templates, the OVF Template type and the VM Template type.
In a content library, you can store and manage virtual machine templates as OVF templates or VM templates. vApps are always converted to OVF templates in the content library.
VM Templates in Content Libraries and in the vCenter Server Inventory
A VM template is a template of a virtual machine. You create a VM template by cloning a virtual machine into a template.
A VM template can be managed by vCenter Server or by a content library.
In previous releases of vSphere, you can manage VM templates only through the vCenter Server inventory list. When you cloned a virtual machine or a VM template to a content library template, the resulting content library item was in an OVF format. Starting with vSphere 7.0 Update 1, local content libraries support both OVF templates and VM templates. You choose the type of template when you clone the virtual machine into the content library.
- If you convert the VM template in the vCenter Server inventory to a virtual machine, the corresponding VM template library item is also deleted.
- If you rename the VM template in the vCenter Server, the corresponding VM template library item is also renamed.
- If you rename the VM template library item the associated VM template in the vCenter Server inventory is also renamed.
- If you delete the VM template in the vCenter Server inventory, the corresponding VM template library item is also deleted.
- If you delete the VM template library item, the associated VM template in the vCenter Server inventory is also deleted.
OVF Templates in Content Libraries
In a content library, an OVF template is either a template of a virtual machine, or a template of a vApp. When you clone a virtual machine into a template in a content library, you choose whether to create an OVF template or a VM template. However, if you clone a vApp into a template in a content library, the resulting content library item is always an OVF template. Because the OVF format is actually a set of files, if you export the template, all the files in the OVF template library item (.ovf, .vmdk, .mf) are saved to your local system.
Differencies Between VM Templates and OVF Templates in Content Libraries
You can use both VM templates and OVF templates to deploy new virtual machines in your vSphere environment. However, the two types of templates have different properties and support different deployment options.
Property | VM Templates in Content Library | OVF Templates in Content Library |
---|---|---|
Datastore | VM templates can be stored on any datastore that you have privileges to.
Note: VM templates cannot be stored in a library that uses NFS or SMB storage.
|
OVF templates can only be stored on the datastore that is associated with the content library. |
Footprint | The default one. | Compressed or Thin. |
Host/Datastore Maintenance Mode | When the host becomes inaccessible, VM templates are automatically migrated to another host. |
When either the host or the datastore becomes inaccessible, you must manually migrate the OVF templates to another host or datastore. |
Associated with a Host | Yes. | No. |
Storage DRS | Supported. | Not supported. |
Cross-vendor Compatibility | Not supported. | Supported. |
Software License Agreement | Not supported. | Supported. |
Encryption | Supported. You can create encrypted VM templates. |
Not supported. While OVF templates cannot be encrypted themselves, you can still deploy an encrypted virtual machine from an OVF template. |
Deployment Options | During the deployment of a VM template, hardware customization and guest OS customization are both supported. | During the deployment of an OVF template, only guest OS customization is supported. Hardware customization is not supported. |
The supported operations on a content library template are different depending on the template type. You can edit the settings for both OVF and VM templates. However, you can update, export, and clone a template only if it is an OVF template.
Check Out a Virtual Machine from a Template
In the vSphere Client, you can edit the VM templates and monitor the changes that have been made by other privileged users. You can perform the checkout operation to update a virtual machine from the VM template. During this process, the VM template is not available for checkout from other users, but they can deploy a virtual machine from the VM template without any disruptions.
When you check out a VM template, you cannot convert the virtual machine to a template or migrate the virtual machine to a different vCenter Server inventory.
Prerequisites
- If you want to power on the checked out virtual machine, verify that you have the privilege.
Procedure
Results
The checked out virtual machine appears in the selected location marked with a blue circle icon. You can perform the necessary configuration changes.
What to do next
After you complete the virtual machine updates, you can check in the virtual machine back to the template.
Check In a Virtual Machine to a Template
After you check out a virtual machine from a template and update the virtual machine, you must check the virtual machine back into the VM template. When you check in the virtual machine to a template, you create a new version of the VM template containing the updated state of the virtual machine.
When you check in the virtual machine to the VM template, you allow the deployment of the last changes that you make to the virtual machine.
Prerequisites
Verify that the virtual machine is powered off or suspended. You cannot check in a powered on virtual machine to a VM template.
Procedure
Results
Discard a Checked Out Virtual Machine
If you check out a VM template and make no updates to the virtual machine or perform an update that you do not want to keep, you can discard the checked out virtual machine. Each time you check in the virtual machine back to the template, you create a new version of the VM template. You can discard the checked out virtual machine to avoid creating new versions or to prevent other users from using a faulty version.
Prerequisites
Procedure
Results
You deleted the virtual machine from the inventory and discarded all changes.
Revert to a Previous Version of a Template
If the latest VM template contains changes that you no longer want to keep or you made a mistake during your last checkin, you can revert the VM template to the previous version.
Prerequisites
Procedure
Results
The VM template that you revert to becomes the current VM template.
Delete a Previous Version of a VM Template
Delete a previous version of a VM template if you no longer want to allow the use of the template. Deleting a VM template removes the template and its content from the inventory.