Perform this task to create a VM template from an existing VM in the system or import a local VM template to the system. A VM template can be used for fast VM deployment.
You can create a VM template by using the following methods:
Import a VM template—Imports a VM template compressed package (in .tar.gz format). You can import only the VM template files downloaded from the system.
Clone as template—Creates a template copy of a VM, while leaving the original VM in place.
Convert to template—Converts a VM in shutdown state to a template. The converted VM can be used only as a template and is removed from the navigation pane.
For a successful upload of a VM template, do not close the browser or the window for importing the VM template during the upload process.
To avoid template import failure because of login timeout, do not stay at the port profile configuration page for a long time.
On the top navigation bar, click Resources.
From the left navigation pane, select VM Templates.
Click Import VM Template.
Select a host, and then click Next.
Click in the dashed box to select a VM template file, or drag a VM template file to the dashed box.
Click Start to start uploading.
Select an owner for the VM.
Click OK.
For a VM that has mounted GPU/vCPU devices, you can create a VM template from the VM only when the VM is offline. VMs deployed by using this template do not contain GPU devices.
Before you clone or convert a Linux VM, delete the /etc/udev/rules.d/70-persistent-net.rules file from the Linux OS. If you do not delete this file, VMs deployed using the template cannot find the eth0 NIC.
To ensure successful OS configuration for a VM deployed through a VM template, do not use the /usr directory as an independent partition when cloning or converting a VM installed with a Linux OS to a template.
To prevent source VM static IP from being kept on the NIC of a VM deployed through the VM template, change the IP addressing mode to automatic before cloning or converting a VM to a template.
Before you convert or clone a VM that uses an SUSE openSUSE or Ubuntu Linux operating system to a VM template, clear its NIC configuration files. If you do not clear the files, network parameter modifications do not take effect on the VMs created based on the VM template.
For a VM that runs a Windows 7 operating system, you must disable the hibernation feature for that VM before you can clone or convert it to a template. If you do so, the VM deployed from that template might be unable to be woken up.
After you convert a VM that uses an RBD storage pool and the high-speed disk format to a VM template, the disk format of the VM will be changed to intelligent.
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > Host Pool Name > Host Name > VM Name or Compute > Host Pool Name > Cluster Name > Host Name > VM Name.
Click More, and then select Clone as Template or Convert to Template.
Enter the template name and description, and then select a directory to store the template and the template owner.
Click OK.
Template Pool: Select the directory that stores the VM template.