7.3 Editing Templates

Templates can be edited at any time. However, if a template was cloned, you must first detach the clones before you can edit it. For more information, see Section 8.2, Detaching Clones from Templates.

The following steps include information for all possible template fields and pages. Depending on VM type, you might not be able to edit the template or the template might not have all of the fields and pages.

To edit a template, run the Virtual Machine Properties Wizard:

  1. If you want to retain your edits on a VM, click the Virtual Machines view in the VM Client, right-click the VM that you want to edit, then select Shut Down.

  2. Do one of the following in the Templates view to start the wizard:

    • Select a template, then click the Edit Action Button button.

    • Select a template, then click Edit > Edit.

    • Select a template, then press Ctrl+E.

    • Right-click any listed template, then select Edit.

    The following wizard page is displayed:

    Virtual Machine Properties Wizard, Description Page

    If a template currently has cloned VMs associated with it, you cannot edit the template. The following dialog box is displayed when you attempt to edit such a template:

    Information dialog box indicating that you cannot edit the template.

    After noting which VMs are involved, click OK to close the dialog box, then determine whether you want to detach those VMs in order to edit the template. For more information on detaching the clones from the template in the Development Client, see Section 8.2, Detaching Clones from Templates.

  3. Fill in the available fields:

    Description: Note the purpose and any other specifics you might require of the template. These notes apply to all versions of this template.

    Guest Operating System: The clones of the template inherit the operating system of the VM from which this template was created. Therefore, you should only change it if it is incorrect. The following are supported:

    • SUSE Linux Enterprise Server 8
    • SUSE Linux Enterprise Server 9
    • SUSE Linux Enterprise Server 10
    • SUSE Linux Enterprise Server 11
    • SUSE Linux Enterprise Desktop 10
    • SUSE Linux Enterprise Desktop 11
    • openSUSE
    • openSUSE 11
    • Novell Open Enterprise Server 2 (Linux)
    • Novell Open Enterprise Server 2 (NetWare)
    • Novell NetWare 6.5 SP6 and older
    • Red Hat Enterprise Linux 3
    • Red Hat Enterprise Linux 4
    • Red Hat Enterprise Linux 5
    • Solaris 9 and older
    • Solaris 10
    • Microsoft Windows NT
    • Microsoft Windows XP, 2000, 2003
    • Microsoft Windows XP, 2003 (x64)
    • Microsoft Windows Vista
    • Microsoft Windows Vista (x64)
    • Microsoft Windows Server 2008
    • Microsoft Windows Server 2008 (x64)

    There is also an “(other)” option for the following:

    • SUSE
    • Red Hat
    • Microsoft Windows

    Additional Arguments: This field applies only to paravirtual installations. These are Linux install arguments, which are operating system parameters similar to the information entered in a GRUB boot loader when running on bare hardware in SUSE Linux Enterprise Server (SLES) and SUSE Linux Enterprise Desktop (SLED). Additional network installation information can be added here, which is used during the build process to find the installation source for the VM build process.

  4. Click Next to display the following wizard page:

    Virtual Machines Properties Wizard, Hardware Page
  5. Fill in the available fields to define the kind of hardware to be virtualized for the template:

    Processors: The number of virtual processors the template has.

    Memory Size: The amount of virtual RAM the template has, or paravirtualized memory that can be used by the VM if it is paravirtualized.

    Max: The amount of virtual RAM the template has, or paravirtualized memory that can be used by the VM if it is paravirtualized.

    Display Driver: The properties of the VM’s display. If you have chosen paravirtualization for this VM, your only option is Paravirtualized. If you have chosen full virtualization, you can select between VESA or the on-board VGA. If you do not need a display, you can turn off the display on a fully virtualized machine.

    Remote Console Password: The password for remotely controlling the VM. Use the two fields to confirm that the password is typed correctly.

  6. Click Next to display the following wizard page:

    Virtual Machine Properties Wizard, Storage Devices Page

    The example shown is for a template.

    The Storage Devices page is for defining the hard drives and CD or DVD drives that you want to include in the template profile. The first device must always be a hard disk that cannot be removed unless another hard disk has been put into the first slot. This is the only disk (Disk 0) that is stored and version controlled. All other disks are virtual and are created upon launching the VM. You can add any other storage devices you want to the template and move them according to priority in the list.

  7. To fill in the storage device information, select a task from the following table:

    Tasks

    Steps

    Additional Details

    Adding a hard disk to your VM

    1. Click Add Hard Disk.

    2. Fill in the following fields:

      Name: The name is the number in the order the drive appears in its VM image list.

      Type: Select the type of hard disk you want to create on the VM:

      • Hard Disk

      • iSCSI (see Warning)

      • N_Port ID Virtualized Storage (see Warning)

      • Network Attached Storage

      Source: The repository on the hard disk of the VM.

      Size (GB): The VM’s hard drive size, ranging from 0.25 GB (250 MB) to 4 TB. This is the maximum allowable size of the VM.

      Read Only Access: Select this option to give the hard drive Read-Only access. By default, hard drives are writable.

      Fabric ID: (Available only for the N_Port ID virtualized storage). Select or specify a fabric ID that uniquely identifies a SAN repository.

      The Fabric ID drop-down list is populated with fabric IDs of the discovered SAN repositories.

      World Wide Name: (Available only for the N_Port ID virtualized storage). Select or specify a unique World Wide Name.

      The World Wide Name value is automatically assigned for the NPIV disks. You can edit it, if required.

      Target ID: (Available only for the N_Port ID virtualized storage). Specify the target ID of the SAN repository.

      LUN: (Available only for the N_Port ID virtualized storage). Specify a LUN value between 0 and 254.

    3. Click Apply.

    The following restrictions apply per VM:

    • Limit of 4 fully virtualized disks (hda-hdd).

    • Limit of 16 paravirtualized disks (xvda-xvdp).

    WARNING:Do not select iSCSI or NPIV when defining or editing a template. This causes all VMs cloned from the template to use the same iSCSI or NPIV location, thus corrupting the disk.

    While adding an additional NPIV disk to a VM, ensure that the disk values for Fabric ID, World Wide Name, Target ID, and LUN are unique for each NPIV disk of the VM.

    Creation of a block-based VM is not supported for NPIV.

    Adding a CD-ROM or DVD ROM to your VM

    1. Click Add CD-ROM.

    2. Fill in the following fields:

      Name: The name is the number in the order the drive appears in its VM image list.

      Type: Select the type of CD-ROM you want to create on the VM:

      • CD-ROM

      • DVD

      Source: The repository on the hard disk of the VM.

      Size (GB): The size is zero and cannot be changed.

      Read Only Access: These drives can only have Read-Only access.

    3. Click Apply.

    IMPORTANT:If you add a CD-ROM or DVD-ROM, any VMs created from this template can only be moved, migrated, or used to create another template if the CD-ROM’s or DVD-ROM’s ISO or image is accessible through shared storage.

    Rearranging the order in which each storage device is accessed

    1. Select the storage device whose order you want to change.

    2. Click Move Up or Move Down.

    The first storage device in the list must be a hard disk, which is the only one actually stored in the VM image.

    Deleting a storage device

    1. Select the storage device you want to delete.

    2. Click Delete.

    Removes the selected storage device from the table.

    WARNING:If the storage device is based on a disk image, that could also be deleted. To preserve the disk image, manually copy it to another location before deleting the storage device.

  8. Click Next to display the following wizard page:

    Virtual Machine Properties Wizard, Network Page

    The example shown is for a template.

    The network devices are added, deleted, and defined on the Network page, where you add specific information about your network connections or intended network connections for your template. You can define more detailed NIC settings in your auto-install files or when performing a guest installation.

  9. To fill in the NIC information, select a task from the following table:

    Tasks

    Steps

    Adding a NIC to your VM

    1. Click Add NIC.

    2. Fill in the following fields:

      Name: The number, based on the NIC’s order in the list, automatically assigned to the NIC.

      Driver Type: Indicates whether the VM has direct access to the NIC. If the NIC should only interface with the hypervisor, you can select the specific type of full virtualization. You should have a paravirtualized NIC with a paravirtualized VM.

      MAC Address: Unless you have a specific MAC address you want to assign to this VM, leave this set to Default, and Xen assigns it a MAC address when you launch the VM.

      Network: Select the network you want associated with the NIC.

    3. Click Apply.

    Rearranging the order in which the NICs are accessed

    1. Select the storage device whose order you want to change.

    2. Click Move Up or Move Down.

    Deleting a NIC from your VM

    1. Select the NIC you want to remove.

    2. Click Delete NIC.

  10. To complete and close the wizard, click Apply.

    You can click Back to make further changes before applying the edits.

    Applies the wizard configuration changes and saves the template in the Templates view.

    Focus is returned to the Virtual Machines view after you exit the wizard with the edited template selected in the list.

    After editing a template, you can then use it to clone new VMs. For more information, see Section 8.1, Cloning Templates.