You can create a VM template by converting a VM to a template or cloning a VM to a template for fast creation and configuration of VMs in bulk. VMs deployed using a VM template have the same OS and applications as the template.
VM templates are stored on CVM hosts. As a best practice, set aside a dedicated shared storage as a template pool for storing VM templates. Before adding a shared directory as a template pool, make sure storage volumes and other required settings are configured on the shared storage.
To create a template pool:
On the top navigation bar, click Resources.
From the left navigation pane, select VM Templates.
Click Template Pool.
Click Add Template Pool.
Enter /templet in the Target Path field, select iSCSI Shared Directory from the Type list, and enter 192.168.12.100 in the IP Address field.
Click the search icon in the LUN field to search for the desired LUN by IP address.
Click OK.
Verify that the newly added template pool is displayed on the template pool list.
You can create a VM template by using the following methods:
Clone to 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 the original VM template is removed from the system.
Export as template—Exports a VM in shutdown state to an OVF template.
Before creating a VM template by using a VM, perform the following steps:
Disconnect the CD-ROM driver or floppy driver, if any, from the VM.
Make sure the VM is configured to obtain IP address settings automatically through DHCP (to avoid network address conflicts).
Shut down the VM, and then disconnect the mounted virtual driver and driver files, if any, from the VM.
Navigation to the VM configuration page. Click More, and then select Clone as Template.
In the dialog box that opens, enter a template name, select a template pool for storing the template, and then click OK. The template name must be different from the VM name.
Navigate to the Resources > VM Templates page and verify that the newly created VM template is displayed on the VM template list.
Shut down the VM, and then disconnect the mounted virtual driver and driver files, if any, from the VM.
Navigation to the VM configuration page. Click More, and then select Convert to Template.
In the dialog box that opens, enter a template name and template description, select a template pool for storing the template, and then click OK.
Navigate to the VM templates page and verify that the newly created VM template is displayed on the VM template list.
Verify that the VM is removed from the host.
You can export a VM template from CVM and then import it to another CVM system. Use this method to deploy VMs across management platforms.
On the top navigation bar, click Resources.
From the left navigation pane, select VM Templates.
Click Download icon in the Actions column for a VM template to download the template as a compressed file.
Navigate to the VM templates page in the CVM system where you want to import the template and import the template as an OVF template.
You can deploy 1 to 100 VMs by using a VM template at a time. When using a template to deploy multiple VMs in bulk, you cannot configure the system settings for the VMs. |
On the top navigation bar, click Resources.
From the left navigation pane, select VM Templates.
Click Deploy VM in the Actions column for a VM template.
Configure basic information, cluster information, storage information, network information, and system information for VM deployment and start the deployment.
After the VM deployment is complete, check the deployed VMs on the target host.