Fotolia

Get started Bring yourself up to speed with our introductory content.

Master VMware templates for VM creation and management

Admins who use vSphere and VM templates can improve VM operations and increase data center efficiency through configuration and management best practices.

VMware templates, also known as golden images, help admins to create an exact copy of a virtual machine for cloning, converting and deploying. Not only do templates speed up the VM deployment process, they also simplify configuration operations and ensure standardization of VMs throughout a system.

There are various ways to use these templates, such as taking advantage of the VMware content library to ensure proper storing of VM template files and using PowerCLI to further ease management of VMs created from VMware templates.

Manage VMs at scale with VMware vSphere templates

VMware vSphere templates, which are accessible through the Content Libraries feature, enable admins to quickly deploy configured VMs. The Content Libraries' wizard walks admins through configuration steps such as publishing and optimizing templates.

The Content Libraries feature is critical for admins who must manage vSphere templates in larger systems because it designates roles and privileges that admins can assign to users and support required policies.

Admins who build and manage their VMware templates can reduce friction within the system, which further eases VM deployment operations. Admins can achieve this with the latest VMware hardware version, so long as it works across the entire system. Admins can also check that the VMware tools version is up to date.

Admins who ensure their VMware templates are up to date and managed regularly can save time and effort down the line.

Use a VMware content library

Content libraries help admins store any and all files and resources they use to deploy VMs. For example, ISO files for quest OSes aren't tied to VMs, but they require organization and management. Admins can store these resource files in a VMware content library, which minimizes system clutter. Here are a few ways to create, use and manage a VMware content library.

Create a VMware content library. The vSphere Web Client's New Content Library wizard can help admins set up a VMware content library. This wizard leads admins through three steps: assign a name to the new library, choose between a local or subscribed content library, and provide storage to the library using a file system or data store.

Populate a VMware content library. Once admins create a content library, they can populate it through the vSphere Web Client. There, admins should select the Home tab and click on the Content Libraries icon. Then, admins should right-click on the content library and select Import Item, where they will see two sections: Source and Destination. Admins can select Source to select any files they decide to import into the library, or Destination to enter the name and description of an item.

Create a VM from a template. To create a VM from a VMware content library template, admins should select the Templates tab within the content library wizard. Then, they can right-click the VM template they decide to use to create a new VM. From there, they should select the New VM From This Template option, which opens the New Virtual Machine from Content Library wizard and provides the necessary steps to continue.

Use PowerCLI to deploy a VM from a VMware template

Admins who use VMware templates with PowerCLI can deploy a VM quicker and easier than the installation media approach. To create a VM template with PowerCLI, admins must install and configure the OS. Then, admins can use the New-Template cmdlet in PowerCLI.

Once admins run the New-Template cmdlet, they can create an OS customization specification in PowerCLI. This helps admins adjust specific settings, such as organization name, security identifier and Active Directory domain within the VM to make it unique.

Packer eases VM template creation

PowerCLI and Packer often go hand-in-hand for VM template creation and deployment. Packer is an open source image builder that automates vSphere template creation and management and uses multiple builders optimized for VMware Fusion, Workstation and Workstation Player.

Admins who use Packer with Windows and vSphere for VM template creation work with two file types: a JavaScript Object Notation (JSON) file and an autounattend file that automates Windows installation on a VM.

JSON makes up the template and helps admins to use commands to carry out tasks, such as VM-to-template conversion at the end of a build without a processor. The autounattend file automates the Windows setup and admins can then modify the file as needed.

VMware template best practices

Admins who ensure their VMware templates are up to date and managed regularly can save time and effort down the line. There are several best practices and techniques admins can use to do so.

Remove unnecessary devices and use snapshots. Snapshots let admins confirm any changes made during template maintenance are reversable. Removing unnecessary devices, such as floppy drives, can also ease template management because it removes these devices from templates' configurations.

Adopt the latest virtual compatibility mode. Keeping virtual compatibility modes up to date enable admins to use new maximums and features in the latest ESXi version. But it's important that admins ensure the latest compatibility mode is right for their organization before adoption.

Use valid VM configuration options. VMware automatically disables the CPU Hot-Add and Memory Hot-Plug are two VM configuration options. If admins require these configurations, they should enable them with the template prior to VM creation. These configuration options cannot be adjusted unless the VM is powered off.

Pay attention to storage. If systems capacity is an issue, admins should use vSphere's thin provisioning feature. Thin provisioning ensures that each template only consumes as much data store space available within the virtual machine disk. Admins should also consider storing their templates on their own data stores.

Patch the OS and applications. There's nothing worse than attempting to deploy a VM from a template, only to have to perform Windows updates before continuing. Admins should check for available updates and patches for OSes and applications to avoid unneeded downtime.

Dig Deeper on VMware virtualization

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchVMware

SearchWindowsServer

SearchCloudComputing

SearchVirtualDesktop

SearchDataCenter

Close