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.
Before deploying VMs by using a VM template, you must create a VM template. For more information, see "Create a VM template."
For ARM hosts restored from an old version through template deployment, upgrade, or backup, they do not support adding hardware devices online.
As a best practice, do not deploy VM templates created on a host that uses a higher software version to a host that uses a lower software version. For example, if CVM manages both E0783 and E0730P11 hosts, you cannot deploy VM templates created on an E0783 host to an E0730P11 host.
When you deploy VMs to a shared storage file system that uses distributed locks, ensure the stability of the host management network. Management network issues might trigger storage isolation, freezing the VMs and subsequently migrating them to other hosts through the HA mechanism.
On the top navigation bar, click Compute.
From the left navigation pane, select VM Templates.
Click Deploy in the Actions column for a VM template.
Follow the configuration wizard to deploy VMs.
Configure basic settings:
Quantity: Enter the number of VMs to create.
Alias: If the number of VMs to be deployed is 1, you must specify the VM alias. If the number of VMs to be deployed is larger than 1, you must specify a method to set the VM alias. If you select Generate, the system generates VM aliases based on the alias prefix and start number. If you select Specify, you must manually specify an alias for each VM or import VM aliases from a file.
Alias Prefix: Specify an alias prefix.
Start Number: Specify the start number for bulk deploying VMs. This parameter is required only when the number of VMs to be deployed is larger than 1.
Classification Level: Select a VM classification level. If you select internal use only, a VM can be deployed only to the non-security zone. If you select other options, a VM can be deployed only to the security zone. Configure this parameter when the secure mode is enabled.
Encryption: Select whether to enable encryption for the VM. VM encryption is enabled by default and cannot be disabled when the VM's classification level is top secret, secret, or confidential. This parameter is available only when secure mode is enabled for the system.
Encryption Method: Select an encryption method. Options are SM4 and AES. This parameter is available only when secure mode is enabled for the system.
Key: Enter the encryption key. The key is used for encrypting and decrypting VM disk data to ensure data security. This parameter is available only when secure mode is enabled for the system.
|
|
CPUs: Set the number of CPUs and CPU cores.
Memory: Set the memory size.
VM Group: Select a VM group.
Fast Deployment: Select VM deployment based on the base image file of the VM template as needed. To shorten the VM creation time and save server storage space, select this option.
Start Now: Set whether to start the VMs immediately after they are created.
Configure OS: Set whether to initialize the operating systems of VMs.
Fast—Initializes the OS and user account information about a VM by using CAStools and does not clear the SID of the OS. CAStools is required. This mode is applicable to Windows and Linux OSs that support CAStools.
Full—Initializes the OS and user account information about a VM and clears the SID of the OS. CAStools and Sysprep are required. This mode is applicable to Windows operating systems. ARM hosts do not support this option.
Compatibility Upgrade: From the E078* series, you can hot-add CPUs and memory for a VM on an ARM host only after you set the boot firmware for the VM to PFlash. Before you hot-add CPUs or memory for a VM, check the compatibility matrix to identify whether the VM supports CPU and memory hot-add. With this feature, you can deploy VM templates from an ARM host that runs a lower software version to all ARM hosts managed by CVM. The system automatically adjusts the boot firmware type based on the selected target host for a VM, allowing you to add CPUs and memory to that VM when it is online. x86 hosts do not support this feature. The following tables show support of automatic VM boot firmware change for VM templates that use different firmware:
VM deployment through a VM template that uses ROM firmware
Target host | Automatic VM boot firmware change | Remarks |
E0730 series | No. To change the VM boot firmware to another type other than PFlash, you must change it manually. | The system automatically adjusts the maximum memory for the VMs based on the model of the target host. |
E0760 series, E078* series, and higher version | Yes (changed to PFlash). To change the VM boot firmware to another type other than PFlash, you must change it manually. |
VM deployment through a VM template that uses PFlash firmware
Target host | Automatic VM boot firmware change | Remarks |
E0730 series | No. To change the VM boot firmware to another type other than PFlash, you must change it manually. | The system automatically adjusts the maximum memory for the VMs based on the model of the target host. |
E0760 series, E078* series, and higher version | No. To change the VM boot firmware to another type other than PFlash, you must change it manually. |
Configure cluster settings:
Select the destination cluster and host for the VM.
Configure storage settings:
Bulk Select Storage Pools: If a VM template has multiple storage files, you can choose to specify the same or different target storage pools for the VM to be deployed. To specify the same storage pool, click this button, select a storage pool, and then click OK. All the target storage pools for the storage files will automatically become the selected one.
Target Storage File: Enter the name of the storage file.
Storage Size: Size of the source storage file.
Target Storage Pool: Select the storage pool for the created VMs.
Disk Format: Specify the disk format for the VMs. This parameter is available only when the Fast Deployment option is not selected.
Same Format—Same disk format as the VM template.
Intelligent—Qcow2 format.
High-Speed—Raw format. This format provides high I/O efficiency.
Provision: Select a storage volume provision mode.
Thin—Allocates only as much storage space as the storage volume needs for its initial operations when the storage volume is created. If the storage volume needs more storage space later, you can allocate as much storage space as the volume would require based on the specified maximum storage size.
Lazy Zeroed—Allocates the specified maximum storage size to the storage volume when the storage volume is created. Data remaining on the physical device is not erased during creation, but is zeroed out on first write from the VM.
Eager Zeroed—Allocates the specified maximum storage size to the storage volume when the storage volume is created. Data remaining on the physical device is zeroed out during creation. It might take a longer time to create storage volumes in this format than to create storage volumes of other formats.
Details
Manually Define: Manually define network information for the VM, including vSwitch, port profile, vFirewall, VLAN policy, and IPv4 mode.
Import from File: Enter network configuration, such as IP address, login password, gateway, username, and subnet mask, in a template file, import it into the system, and then set vSwitch, port profile, and vFirewall information for the VM.
Bulk Select Port Profiles: Click this button to bulk configure port profiles for all deployed VMs.
Bulk Select vSwitches: Click this button to select a vSwitch for all deployed VMs.
vSwitch: Specify a virtual switch for the VM.
Port Profile/Port Group: Select a port profile/port group. A newly deployed VM uses the most recent port profile, the VLAN and QoS settings in which might be different from those in the VM template.
IPv4 Mode: Specify IP address assignment parameters for the VMs. The default value is Default.
Default: The system does not configure the network parameters of the new VM. The network configuration of the new VM will be the same as that of the source VM. If the source VM has been manually assigned an IP addresses, make sure the source and new VMs use different IP addresses.
DHCP: Automatically configure the network parameters of the VM through DHCP.
Manual: Configure the following parameters manually:
IP Address: Enter an IP address for the VM.
Subnet Mask: Enter a subnet mask for the VM.
Default Gateway: Enter a default gateway address for the VM.
Primary DNS: Enter the IP address of the primary DNS server.
Secondary DNS: Enter the IP address of the backup DNS server.
Set IP Binding: Set whether to bind the IP address to the MAC address of the NIC.
Virtual Firewall: Select a virtual firewall for the VM. The incoming and outgoing data packets of the VM will be filtered based on the firewall rules.
VLAN Transparent Transmission Policies: Configure VLAN policies for VMs, including VLAN transparent transmission policies and private VLAN policies.
VLAN transparent transmission policies—To add a policy, see "Manage VLAN transparent transmission policies" The policies are used by the VMs to identify incoming and outgoing traffic of different virtual networks.
Private VLAN policies—For more information, see "Manage private VLAN policies".
Configure system settings-x86 hosts:
Computer Name: Enter the computer name.
Belong To: Select how the VM will participate in the network. Options include Domain and Work Group. This parameter is required only for a Windows VM.
Domain/Work Group: Enter a domain or work group name. This parameter is required only for a Windows VM.
Login Account: Enter the login account of the VM OS.
Login Password: Enter the login password of the VM OS.
Confirm Password: Confirm the password.
Local Group: Select the local group to which the login account belongs. This parameter is required only for a Windows VM.
Time Zone: Select a time zone. This parameter is available only when you use a Windows VM template to deploy VMs.
Default User Password: Set a password for the Administrator account. If you leave this field empty, the system administrator can access the VMs without providing a password. This parameter is available only when you use a Windows VM template to deploy VMs and select full initialization.
Activation Key: Enter the activation key of the VM OS. This parameter is required only when the VM uses a Windows OS and the initialization mode is full initialization. If you do not set this parameter, you must enter the activation key when the VM is booted.
Configure system settings-ARM hosts:
Computer Name: Enter the computer name.
Login Account: Enter the login account of the VM OS.
Login Password: Enter the login password of the VM OS.
Confirm Password: Confirm the password.