8.1 Cloning Templates

Templates provide a method for quickly creating of a new VM. To create new VMs from a template, you first clone the template to create a new VM, then you edit the cloned VM’s configuration as needed.

A clone of a template is actually a file that contains just the differences between the template and the clone. The template’s file contains the bulk of the VM information. One benefit of this arrangement is in disk sharing. Another benefit is in being able to perform batch operations from the Development Client.

Because clones are so closely related to their parent template, you cannot perform actions against a template without directly affecting its clones. So, in order to edit, delete, or move a template using the VM Client, you must first detach or delete its clones. The detaching process creates a complete VM image for the clone, which is then no longer considered to be a clone in the VM Client.

IMPORTANT:If a CD-ROM or DVD-ROM is configured for the template that you want to clone, it will be included only if its ISO or image is accessible through shared storage. If it is not accessible, the VM cloned from this template cannot start. In that case, you must remove the CD-ROM or DVD-ROM definition from the template’s properties before cloning the template.

To create a clone:

  1. In the VM Client, click the Templates view, then select a template.

  2. Do one of the following to clone the template:

    • Click the Clone Action Button button.

    • Click Edit > Clone.

    • In the Templates view, right-click the selected template, then select Clone.

    The following dialog box opens:

    Clone Virtual Machine Dialog Box
  3. Specify a name for the template clone in the New VM Name field.

    This name must be unique. It cannot already exist in either the Virtual Machines or Templates lists.

    The name cannot be longer than 100 characters and cannot start with the letters “xen.”

  4. To select a repository for the new template clone, simply click the repository.

    This enables the Clone button.

    The default repository that is displayed is the location where the template being cloned resides.

  5. Click Clone.

    A cloning job is started. You can view its progress in any of the following ways:

    • Double-click the template being cloned, click the Event Log tab, then double-click the entry related to the cloning process that has the Information Icon icon next to it. The Event Log Details dialog box is displayed and is automatically updated as events occur.

    • Observe messages at the bottom of the VM Client interface.

    • Click View > Show Progress View to open the Progress window.

    • View its progress in the Jobs tab of the Development Client.

    When the cloning process is complete, the VM Client’s job status is displayed in a pop-up message, as well as in the Event Log Details dialog box. It is also listed in the Development Client as Completed.

    The cloned template is now listed with the other VMs in the Virtual Machines view.

    Except for the name that you entered in Step 3, and the UUID and MAC address that are automatically generated, the new template is identical to the template that you started with in Step 1.

  6. (Optional) Right-click the cloned template, then select Edit to modify it as necessary.