Configuring a VM
This section describes how to install a VM and add a service port and block service for the VM.
Prerequisites
- The VM service has been initialized, and a VM file system exists in the system.
- The installation media has been prepared for the VM.
- If you use an ISO file for installation, a VM OS file in the .iso format has been prepared on the local PC. You can upload it during or after the VM creation.
- If you use an image file for installation, an image file in the .img format has been created for an existing VM. You can run the create vm_template general vm_id=? name=? command to create an image file in the .img format for an existing VM. The value of vm_id is the ID of the existing VM. The value of name is the name of the VM image to be created.
Example:
admin:/>create vm_template general vm_id=1 name=test.img Command send successfully.
- If you need to add a block device for a VM, the corresponding LUN has been added to the LUN group created during initialization configuration and the LUN group has been mapped to the corresponding container.
Procedure
- Choose
VM >
VM.
- Click Create.
The Create VM Wizard dialog box is displayed.
- Configure basic information about the VM.
- Configure basic information.Table 6-2 describes related parameters.Table 6-2 VM parameters
Parameter
Description
Value
Name
Name of the VM.
[Value range]
- The name must be unique.
- The name can contain only letters, digits, and underscores (_).
- The name contains 1 to 63 characters.
[Example]
VM1
Owning VM Container
Controller to which the VM belongs.
[Example]
0A
Installation Medium
VM installation medium, including:
- ISO: Select the VM OS file in the .iso format to install the VM.
- Image: This mode applies to the scenario where a VM has been created. Create an image file in the .img format for the existing VM and select the image file as a template to create a VM.
[Example]
ISO
Select File
Select the corresponding medium file.
NOTE:- When Installation Medium is set to ISO, the name of the selected medium file must meet the following requirements to ensure that the medium can be installed successfully:
- Contains 5 to 63 characters.
- Can contain only digits, letters, underscores (_), hyphens (-), and periods (.), and must end with extension iso or ISO.
- When the installation media is an ISO file, click Upload. In the Upload ISO File dialog box that is displayed, upload a new ISO file to the current controller. The name of the uploaded file must meet the preceding requirements.
- When the installation media is an ISO file, click Copy. In the Copy ISO File dialog box that is displayed, copy the ISO file from the source VM container to the target VM container.
[Example]
-
System Disk Capacity
System disk capacity of the VM.
NOTE:This parameter is displayed only when Installation Medium is set to ISO.
[Value range]
The value must be greater than or equal to 1 GB, less than or equal to the available capacity of the VM file system displayed on the page, and less than or equal to 1 TB.
[Example]
1 GB
Memory Size
Memory of the VM.
[Value range]
The value must be greater than or equal to 128 MB, less than or equal to the available capacity of the owning VM container displayed on the page, and less than or equal to 1 TB.
[Example]
1 GB
Number of vCPUs
Number of CPU cores for the VM.
NOTE:- When the vCPU isolation switch is enabled, the number of vCPUs must be less than or equal to that of CPUs available to owning VM containers and must be an even number.
Number of CPUs available to owing VM containers = Total number of CPUs in owning VM containers - Number of vCPUs in VMs whose failover function is enabled in non-owning VM containers - Number of vCPUs in VMs in owning VM containers
- When the vCPU isolation switch is disabled, the number of vCPUs can be 1 to 32. When the number of vCPUs exceeds that of CPUs available to owning VM containers, VM performance may deteriorate.
[Value range]
1 to 32
[Example]
2
- Click Next.
- Configure basic information.
- Select an available service port for the VM.
VMs use service ports to transfer data between themselves and peripheral devices.
- Two types of ports can be added for a VM at the same time.
- The storage system allows you to add an Ethernet port or bond port for a VM as a service port, but does not allow you to add a maintenance port for a VM as a service port.
- A service port can be added only for a VM on the corresponding controller. For example, a port on controller A can be added only for a VM on controller A.
- Only an idle service port can be added for a VM and the service port cannot carry any service.
- In Port Type, select Ethernet port or Bond port.
- In the Available Ports area, select one or more ports based on service requirements.
- Click
to add the ports to the Selected Ports area.
- (Optional) Set the MAC addresses of the ports on the VM.
- If you do not set the MAC addresses, they will be automatically generated by the system.
- If you choose to manually set the MAC addresses, ensure that the MAC addresses meet the following requirements:
- A MAC address is a character string in the format of xx:xx:xx:xx:xx:xx.
- A MAC address cannot be the same as the MAC address of any other network device in the LAN.
- Click Next.
- Select available block devices for the VM.
Adding a block device to the VM establishes space where VM data can reside.
- You need to add the corresponding LUNs to the LUN group (vm_lg_reserved_container0 or vm_lg_reserved_container1) created during initialization configuration in advance.
- If the added block devices are not displayed, click Rescan.
- A block device can be added to only one VM. Therefore, VM services do not support cluster services.
- In the Available Block Devices area, select one or more block devices based on service requirements.
- Click
to add the selected block devices to the Selected Block Devices area.
- Click Next.
- Confirm the VM creation.
- View the configuration summary of the created VM.
- Click Finish to create the VM.
If you have manually configured the MAC address, a dialog box prompting a high risk is displayed.
- Carefully read the content and select I have read and understand the consequences associated with performing this operation. Click OK.
The Execution Result dialog box is displayed, indicating that the operation is successful.
- Click Close.
Follow-up Procedure
After adding a block device for the VM, you can view the mounting information about the block device on the VM by running the lsblk command.