Use > Virtualization management > Virtual machine and VM template life cycle

Virtual machine and VM template life cycle

The information in this section does not apply to an OpenStack environment in HPE SA Release 10.1.

By setting up a well-defined process of deploying, managing and deleting VMs and VM templates, you can control VM sprawl and VM compliance drift. This section describes and recommends processes for creating, managing, and deleting VMs and VM templates.

This section assumes you have added your Virtualization Service (VS) into SA and are managing your VS from SA, typically the SA Client. For more information, see Add a virtualization service.

The following figure summarizes the VM template and VM life cycle.

The following sections describe each part of the VM life cycle.

Creating VM templates

This section explains how to create VM templates. VM templates ensure your users deploy standard VMs that you can monitor, keep in compliance, and destroy efficiently so they do not waste your IT resources.

Create a limited number of VM templates. The fewer different templates you have to manage, the easier it will be to manage them and the VMs your users deploy from them.

The following figure summarizes the process of creating a VM template.

  1. Determine the basic types of VMs your users will be deploying.

    Each type of VM consists of the operating system, software applications, software and system configurations, patches to be installed, and audit rules that must be followed for compliance.

    For example, you might have the following four basic types of VMs:

    • Windows machine for administrative and managerial users.
    • Windows machine for financial users.
    • Linux machine for software developers and testers.
    • Linux machine for production systems.

    You could create two VM templates, one for the Windows servers and one for the Linux servers, and customize the VMs after deploying them from the templates. Or you could create four separate VM templates. Either method can work, but each has different trade-offs, benefits, and drawbacks. The following table lists some of the benefits and drawbacks of each strategy:

    Comparing two and four VM templates

     BenefitsDrawbacks

    2 VM Templates -
    One for all Windows servers and one for all Linux servers

    Fewer VM templates to maintain.

    You must customize each VM for the intended user (administrative user or financial user for Windows, developer or production user for Linux) after deploying it.

    4 VM Templates -
    Two for Windows servers and two for Linux Servers

    No customization of VMs required after deploying them.

    More VM templates to maintain.

  2. For each type of VM your users will be deploying, create that VM as a “golden,” or baseline, VM:
    1. Create the VM. The simplest way to do this is to clone an existing VM that represents the VM or is close to the VM, or deploy a VM from a VM template that is close to the desired VM.
    2. Unless already done, install the operating system using an OS Build Plan. See the "Provisioning" section in the SA 10.60 Administer section..
    3. Create a patch policy for the VM that includes all the patches required by the VM. Attach the patch policy to the VM. See Server patching.
    4. Create a software policy for the software required for the VM. Attach the software policy to the VM. See Software management.
    5. Create application configurations for the VM. Attach the application configurations to the VM. See the "Application Configuration" in the the SA 10.60 Developer section.
    6. Create an audit policy for the VM. Attach the audit policy to the VM. See Audit and compliance.
    7. Remediate the VM to incorporate all policies into the golden VM.
  3. From each golden VM, convert the VM to a VM template. For more information, see Convert a VM to a VM template - vCenter .

    When you convert a VM to a VM template, the VM no longer exists. If you want to keep the VM, clone the VM first, then convert the VM to a VM template. Or deploy a VM from the VM template immediately after creating the VM template.

  4. Instruct your users to deploy VMs from your VM templates. These VMs will conform to your standard policies and be maintained by your standard processes for managed servers.

Deploying VMs from VM templates

Ensure your users use your VM templates whenever they deploy VMs so they create standard VMs that you can manage. For instructions on deploying VMs from VM templates, see Deploy a VM from a VM template - vCenter .

Maintaining VMs in compliance

To keep your VMs in compliance, perform regular compliance checks and audits to determine which VMs are out of compliance with the attached policies. Remediate noncompliant VMs to bring them back into compliance.

This is the same process you use for keeping physical servers in compliance. For more information, see Server patching, Software management, and Audit and compliance. For details about performing actions on a group of related VMs and VM templates, see Genealogy of virtualization.