Create a Virtual Machine from a Template
Create identical virtual machines from a template. You'll be able to customize hardware, software, and other configurations.
Before you begin
- The platform provides system parameters for VMs to control default settings globally. Before creating a VM, you can customize VM-related settings in the system parameters to control the default VM features. For more information, see System Parameters.
- Before creating a virtual machine based on a template, make sure there is already a virtual machine template available in the platform.
Procedure
- In the navigation pane, choose .
- Right-click a valid parent resource (cluster or host) of virtual machines and select New Virtual Machine.
- In the Select VM Creation Type dialog, choose From Template.
- Click Next.
- In the Select Virtual Machine Template dialog, select the target template and click OK.
-
In the Create Virtual Machine from Template dialog, set the following parameters:
- Review the configuration and click OK.
What to do next
Some VM configurations require VMTools. After VM creation, it is recommended to install VMTools to enable certain configurations. For more information about VMTools, see Virtual Machine VMTools.
VM Template
A virtual machine template is a collection of the virtual machine's operating system, applications, and configuration features. Through virtual machine templates, you can quickly deploy multiple virtual machines with the same properties, improving efficiency and consistency.
Clone a Virtual Machine to a Template
Clone a virtual machine to a template. The source virtual machine remains available for use after it has been cloned into a template.
Before you begin
- Make sure the virtual machine is running, paused, shut down, or crashed.
- Detach all shared disks and RDM disks on the virtual machine.
Procedure
- In the navigation pane, choose .
- Select the target VM and click .
-
In the Clone Virtual Machine to Template dialog, set the following parameters:
- Name: Enter the template name.
Note: The name must be unique and cannot duplicate the names of existing virtual machines or templates. - Data Storage: Location where the template will be stored. By default, this is consistent with the source virtual machine's data storage.
- Tag: Attach tags to identify different templates. For more information, see Tag Management
Note: If the VM has GPU, USB, or PCIe devices attached (except for PCIe devices automatically attached by SR-IOV NICs), the cloned template will not include these devices. To keep these devices, you can convert the VM to a template. - Name: Enter the template name.
- Review the configuration and click OK.
What to do next
After cloning a virtual machine as a template, you can use this template to quickly deploy virtual machines with the same attributes.
You can modify the template without affecting the normal use of the source virtual machine.
Convert a Virtual Machine to a Template
Convert a powered-off virtual machine to a template. After conversion, the source VM becomes template-only and will be removed from the virtual machine navigation tree. The template will appear in the navigation tree.
Before you begin
- Make sure the virtual machine is shut down.
- Detach all shared disks and RDM disks on the virtual machine.
- Make sure the virtual machine has not associated with any backup plans.
Procedure
- In the left navigation pane, select .
- Select the target VM and click .
- Review the selected target and click OK.
What to do next
After converting a virtual machine to a template, you can use this template to quickly deploy virtual machines with the same attributes.Convert a Template to a Virtual Machine
Convert a template directly to a virtual machine. Use this when you need to modify template configurations or no longer require the VM to server as a deployment template.
Procedure
- In the navigation pane, choose .
- Select the target template in Template File and click .
-
In the Convert to Virtual Machine dialog, set the following parameters:
- Name: Enter a name for the virtual machine.
- Power Status: Choose whether to automatically power on the VM after conversion.
- Location: Automatically assigned by default. Select a target host or cluster for the VM.
- For local storage scenario, you cannot specify the VM location. By default, the VM is allocated to the host where local disks reside.
- For non-local storage scenarios, you can specify the VM location.
- Review the configuration and click OK.
What to do next
After converting a template to a virtual machine, you can make adjustments to the virtual machine configuration as needed and then convert the virtual machine back into a template.Create a Virtual Machine from a Template
Create identical virtual machines from a template. You'll be able to customize hardware, software, and other configurations.
Before you begin
- The platform provides system parameters for VMs to control default settings globally. Before creating a VM, you can customize VM-related settings in the system parameters to control the default VM features. For more information, see System Parameters.
- Before creating a virtual machine based on a template, make sure there is already a virtual machine template available in the platform.
Procedure
- In the navigation pane, choose .
- Right-click a valid parent resource (cluster or host) of virtual machines and select New Virtual Machine.
- In the Select VM Creation Type dialog, choose From Template.
- Click Next.
- In the Select Virtual Machine Template dialog, select the target template and click OK.
-
In the Create Virtual Machine from Template dialog, set the following parameters:
- Review the configuration and click OK.
What to do next
Some VM configurations require VMTools. After VM creation, it is recommended to install VMTools to enable certain configurations. For more information about VMTools, see Virtual Machine VMTools.
Manage Virtual Machine Templates
You can modify virtual machine templates according to your business needs, including editing names and descriptions, changing configurations, and altering ownership. If you no longer need a template, you can delete the virtual machine template.
Edit Name and Description
Note: The new name must be unique and cannot duplicate the names of existing virtual machines or templates.Modify Configuration
If you need to modify the basic information, total number of CPU cores, number of cores per socket, memory size, or hard disk capacity of the template, in the target template page, click on the and make the necessary changes to the corresponding settings.
If you need to make extensive adjustments to the template configuration, you can first convert the template to a virtual machine, then adjust the configuration as needed. Once the adjustments are complete, convert the virtual machine back into a template for future use.
Change Ownership
If you need to change the owner of the template, in the target template page, click on the and specify the new owner.
Delete Virtual Machine Template
- To delete a single template: Navigate to the target template page, click on the to perform the deletion operation.
- To delete multiple templates in bulk: Navigate to the parent resource (data center) corresponding Image and Template sub-page, select the target templates, and then click on the to perform the deletion operation.
Note: After deleting a template, you will not be able to recover the template
files (including network card, hard disk files, and database records). Proceed
with caution.