You can populate a content library with VM templates and OVF templates that you can use to provision new virtual machines. You can also add other files to a content library, such as ISO images, scripts, and text files.

You can populate a library with items in several ways.

Import Items to a Content Library

You can add items to a local content library by importing files from your local machine or from a Web server. You can import OVF and OVA templates and other types of files, such as ISO images, certificates, and so on. You can keep the items in the library and share them with other users across multiple vCenter Server instances. You can also use the templates in the content library to deploy new virtual machines and vApps.

Prerequisites

Required privilege: Content library.Add library item and Content library.Update files on the library.

Procedure

  1. Navigate to the Content Libraries list.
  2. Right-click a local content library and select Import Item.
    The Import Library Item dialog box opens.
  3. In the Source section, choose the source of the item.
    Option Description
    Import from a URL Enter the path to the Web server where the item is.
    Note: You can import either an .ovf or .ova file. The resulting content library item is of the OVF Template type.
    Import from a Local File Click Browse to navigate to the file that you want to import from your local system. You can use the drop-down menu to filter files in your local system.
    Note: You can import either an .ovf or .ova file. When you import an OVF template, first select the OVF descriptor file ( .ovf). Next, you are prompted to select the other files in the OVF template, for example the .vmdk file. The resulting content library item is of the OVF Template type.
    vCenter Server reads and validates the manifest and certificate files in the OVF package during importing. A warning is displayed in the Import Library Item wizard, if certificate issues exist, for example if vCenter Server detects an expired certificate.
    Note: vCenter Server does not read signed content, if the OVF package is imported from an .ovf file from your local machine.
  4. In the Destination section, enter a name and a description for the item.
  5. Click Import.

Results

In the Recent Tasks pane you see two tasks, one about creating a new item in the library, and the second about uploading the contents of the item to the library. After the task is complete, the item appears on the Templates tab or on the Other Types tab.

Clone a vApp to a Template in a Content Library

You can clone existing vApps to vApp templates in a content library. You can use the vApp templates later to provision new vApps on a cluster or a host in your vSphere inventory. The vApp is exported to a content library in the OVF format.

Procedure

  1. In the vSphere Client, select Menu > VMs and Templates.
  2. Right-click a vApp and select Clone > Clone to Template in Library.
    The Clone to Template in Content Library wizard opens.
  3. On the Basic information page, configure the content library template and click Next.
    1. Select the New template radio button.
    2. Enter a name and, optionally, a description for the template.
    3. (Optional) Select the Preserve MAC-addresses on network adapters check box to preserve the MAC addresses of the network adapters.
    4. (Optional) Select Include extra configuration to include vApp-related configuration in the template that you clone.
  4. On the Location page, select a content library to clone the vApp to.
  5. On the Review page, review the configuration details and click Finish

Results

A new task for cloning to OVF package appears in the Recent Tasks pane. After the task finishes, the vApp template appears on the Templates tab for the content library.

What to do next

Use the template to provision vApps on a host or a cluster in your vSphere inventory. See Create New vApp From a Template in a Content Library.

Clone a Virtual Machine or a Virtual Machine Template to a Template in a Content Library

You can add new templates to a content library by cloning virtual machines or virtual machine templates from your vCenter Server inventory to templates in the content library. You can use the content library items later to provision virtual machines on a cluster or a host. You can also update an existing template in the content library by cloning a virtual machine or virtual machine template from the vCenter Server inventory.

Templates are primary copies of virtual machines that you can use to create virtual machines that are ready for use. You can change the template, such as installing additional software in the guest operating system, while preserving the state of the original template.

When you clone a virtual machine from the vCenter Server inventory as a template to the content library, you can choose what type of content library item to create. You can choose to create a library item of either the VM Template type or OVF Template type.
Important: If you choose to create a VM Template library item, an identical VM template is created in the vCenter Server inventory.

For more information, see Templates in Content Libraries.

Procedure

  1. Navigate to the virtual machine or template that you want to clone.
  2. Select your task.
    Option Description
    Clone a virtual machine
    1. Right-click the virtual machine and select Clone > Clone as Template in Library.

      The Clone Virtual Machine To Template wizard opens.

    2. On the Basic information page, enter a name and description for the template, select the template type, and select an inventory folder for the template.

      You can create an OVF Template or VM Template in the content library.

    3. On the Location page, select a local content library in which you want to add the template.
    4. On the Select a compute resource page, select the compute resource for the template.
    5. On the Select storage page, select the storage for the template disk and configuration files.
    6. On the Review page, review the details and click Finish to complete the cloning task.
    Clone a virtual machine template
    1. Right-click the virtual machine template and select Clone to Library.

      The Clone to Template in Library dialog box opens.

    2. Select the Clone as option.

      You can create a template or you can choose an existing template to update.

    3. From the content libraries list, select the library in which you want to add the template.
    4. Enter a name and description for the template.
    5. (Optional) Select the configuration data that you want to include in the template.

      You can select to preserve the MAC-addresses on the network adapters and include extra configuration.

    6. Click OK.

Results

A new task for cloning appears in the Recent Tasks pane. After the task is complete, the template appears in the Templates tab for the content library. You can view the type of template in the Type column.

What to do next

Use the template to create virtual machines on hosts or clusters in the vSphere inventory.

Clone Library Items from One Library to Another Library

You can clone a template from one content library to another in the same vCenter Server instance. The cloned template is an exact copy of the original template.

When cloning a template between libraries, you can select the source library to also be a destination library in the clone wizard.

A subscribed library can be the source of an item you want to clone, but you cannot clone items to a subscribed library. The subscribed libraries are filtered out from the list with destination libraries in the Clone Library Item dialog box. When the source library of an item you want to clone is a subscribed library with the setting to download items only when needed, the item is first downloaded to the source subscribed library and then cloned to the destination library.

Procedure

  1. Navigate to the Content Libraries list.
  2. Click a content library and click the Templates tab.
  3. Right-click a template and select Clone Item.
    The Clone Library Item dialog box opens.
  4. (Optional) Change the name and notes for the item you clone.
  5. From the list of content libraries, select the library in which you want to clone the template and click OK.
    You can select the destination library to be the same as the source library if you want to have identical copy of the template in the same library.

Results

A new task for cloning the template appears in the Recent Tasks pane. After the task is complete, a clone of the template appears on the Templates tab of the destination content library.

What to do next

Deploy a virtual machine from template on a host or a cluster in your vSphere inventory.