Virtual Machine

A virtual machine is a core computing resource of the platform. Once you have prepared the necessary physical computing, storage, and networking resources and environment for the virtual machine, you can create a new virtual machine and manage its entire lifecycle according to your business scenarios. This section introduces how to use virtual machines from the following perspectives:

Virtual Machine Basic Operations

You can understand the basic operations supported by virtual machines from the perspective of adding, deleting, modifying, and querying.

Create a Virtual Machine

ZStack ZSphere supports various ways to create a virtual machine, and you can decide on the method based on your business needs and other factors.

Create a New Virtual Machine

A new virtual machine that you'll be able to customize CPU, memory, storage, and network.

Before you begin

  • The platform provides system parameters related to virtual machines, which can globally control the default behavior of platform settings. Before creating a virtual machine, you can customize the parameters related to virtual machines in the system parameters to control the default characteristics of the virtual machines. For more information, see System Parameters.
  • The platform provides default capacity and feature configurations for virtual machines, such as CPU, Memory, Disk 1, NIC 1, Other Hardware, and Advanced Settings. You can quickly create a virtual machine based on the default platform configuration.
  • Supports creating a virtual machine without an image. Disk 1 can be added using the default method for creating a new disk, and it is not necessary to configure a CD/DVD drive.
  • Supports creating a virtual machine without a NIC. You can temporarily not configure the NIC and its features.

Procedure

  1. In the navigation pane on the left side of the platform page, right-click the target cluster, host, or image, and then click New Virtual Machine.
  2. In the Select VM Creation Method dialog, select New VM, and then click Next.

You can refer to the following example to complete the configuration:

Basic Information
  • Name: The name of the virtual machine
  • Quantity: The number of virtual machines to create this time
  • Group: The group the virtual machine belongs to; if not set, the default group will be used
  • Location: The host or cluster location of the virtual machine
  • OS: The operating system of the virtual machine, supporting mainstream operating systems including Linux and Windows
  • HA: Automatic restart mechanism for the virtual machine after abnormal shutdown, default is disabled. For more information, see VM HA
  • Power Status: Whether the virtual machine automatically powers on after creation, default is to power on automatically
Hardware Information
  • CPU: Customize the number of CPU cores and features of the virtual machine
    • Cores: The number of CPU cores in the virtual machine
    • Cores per Socket: The number of cores allocated per socket in the virtual machine
    • CPU Mode: Whether the virtual machine's CPU model is set to match the host CPU model, to inherit some or all of the host's CPU features, to meet business needs in different scenarios. By default, it is not set (none).
    • CPU Resource Priority: For important virtual machines, when the host load is too high and there is CPU resource contention, you can set the priority to "high," giving it higher CPU contention capability compared to "normal" virtual machines.
    • CPU Clock Speed Limit: Used to control the upper limit of host CPU resources that a virtual machine can occupy. The effective range is 1%~100%. Setting it to 100% or leaving it blank means no limitation.
    • CPU NUMA Binding: Associate the virtual machine's CPU (vCPU) with the host's CPU (pCPU), allocating specific pCPUs to the virtual machine to improve its performance.
    • CPU Hot Plug: Whether the virtual machine supports online modification of CPUs. By default, it is supported. CPU hot-plugging and memory hot-plugging must be enabled or disabled together.
      Note: Hot-plugging is only supported by some operating systems. You can click View to get a list of supported systems for hot-plugging.
    • CPU Hypervisor Tag: Whether the virtual machine enables the virtualization (hypervisor) marker. If disabled, it will skip the application's detection of the virtualization environment in the virtual machine. By default, it is enabled.
  • Memory: Customize the memory capacity and features of the virtual machine
    • Memory: The memory capacity of the virtual machine
    • Memory Resource Priority: For important virtual machines, when the host load is too high and there is memory resource contention, you can set the priority to "high", giving it higher memory contention capability compared to "normal" virtual machines.
    • Memory Hot Plug: Whether the virtual machine supports online modification of memory. By default, it is supported. CPU hot-plugging and memory hot-plugging must be enabled or disabled together.
      Note: Hot-plugging is only supported by some operating systems. You can click View to get a list of supported systems for hot-plugging.
  • Disk 1: Customize the storage location, capacity, and features of the virtual machine's system disk, or create a new disk or choose an existing system image
    • Storage Location: The data storage location of the virtual machine's disk. If not set, it defaults to automatic allocation.
    • Capacity: When creating a new disk, the capacity of the system disk.
    • System Image: When using a system image, you need to select an image that encapsulates the virtual machine's system, supporting raw and qcow2 formats.
    • Bus Type: Supports Virtio, IDE, Virtio SCSI, and SCSI bus types. By default, the bus type for Disk 1 is Virtio for Linux systems and IDE for Windows systems.
    • Provision Method: Only when the storage location is selected as SAN storage, you need to choose the allocation method for the disk storage space, supporting thin provisioning and thick provisioning methods, defaulting to thin provisioning.
      • Thin Provisioning: Allocates storage space based on actual usage, achieving higher storage utilization.
      • Thick Provisioning: Pre-allocates the required storage space when creating the disk, providing sufficient storage capacity and ensuring storage performance.
    • Caching Mode: Whether the host page cache is used when the virtual machine writes data, and if so, whether the data is written to the storage device before returning success, defaulting to none, meaning not used.
    • AIO Acceleration: Whether asynchronous I/O (AIO) acceleration is enabled in the virtual machine kernel, defaulting to off.
      Note: To enable AIO acceleration, make sure the cache mode is set to none.
    • QoS: Whether read/write bandwidth and IOPS limits are set for the disk, defaulting to no limit.
    Disks other than Disk 1 are data disks, such as Disk 2. Add data disks through Add Hardware > Disk. A single virtual machine can support up to 24 disks (including Disk 1).
    • Data disks support four methods of addition: new disk, disk image, existing disk, and RDM disk.
    • Data disks support Virtio and Virtio SCSI bus types, defaulting to Virtio type.
    • You can share a disk when the storage location is ZCE distributed storage and the bus type is Virtio SCSI.
    • You can share a disk when the storage location is SAN storage, the bus type is Virtio SCSI, and the provision method is thick provision.
    • You cannot modify the bus type or QoS of a shared disk.
  • NIC 1: Customize the address and features of the virtual machine's NIC
    • NIC Model: Set the NIC model, supporting e1000, rtl8139, virtio, and SR-IOV models.
    • Port Group: The port group of the distributed switch to which the virtual machine's NIC is connected.
    • State: Whether the NIC is automatically enabled when the virtual machine starts.
    • NIC Queue Number: The virtual machine's NIC uses multiple queues to send and receive network packets, improving network PPS and bandwidth performance.
    • MAC Address: Custom configuration of the virtual machine's MAC address, defaulting to automatic allocation by the system.
    • IP Address: Custom configuration of the virtual machine's IP address, defaulting to automatic allocation by the system.

      If the distributed port group to which the virtual machine's NIC is connected does not have DHCP service enabled, you can specify an IPv4 address via VMTools and have it take effect automatically. For more information, see Virtual Machine VMTools.

    • Security Group: Bind a security group to the virtual machine's NIC to control east-west traffic. The smaller the number on the left side of the bound security group, the higher the priority for taking effect. For more information, see Security Group
      Note: Please configure carefully to avoid conflicts between rules in different security groups.
    • QoS: Whether the virtual machine's NIC sets limits on packet transmission bandwidth, defaulting to no limit.

    Additional NICs can be added by clicking Add Hardware > NIC, such as NIC 2.

  • CD/DVD Drive 1: Load an ISO system image file onto the virtual machine for booting from a CD/DVD drive.

    Additional CD/DVD drives can be added by clicking Add Hardware > CD/DVD Drive. A single virtual machine supports up to 3 CD/DVD drives.

  • GPU Device 1: Load a GPU device onto the virtual machine, supporting physical GPU devices and vGPU devices.

    GPU devices can be added by clicking Add Hardware > GPU Device.

  • USB Device 1: Load a USB device onto the virtual machine, supporting direct connection and redirection methods.

    USB devices can be added by clicking Add Hardware > USB Device. A single virtual machine supports adding up to 1 USB device.

  • Other Hardware: Configuration of graphics card and sound card types when loading them onto the virtual machine
    • Graphics Card Type: The default graphics card type used when the virtual machine starts, supporting vga, virtio, qxl, and cirrus, providing basic/high-definition/high-performance video functionality experiences. x86 architecture virtual machines default to vga, while ARM architecture virtual machines only support selecting virtio.
    • Total Graphics Memory: When using vga and cirrus types of graphics cards, the video memory capacity is fixed at 16 MB; when using qxl type graphics cards, you can customize the video memory capacity.
    • Audio Card Type: The default sound card type used when the virtual machine starts, supporting HDA (ICH6), HDA (ICH9), and AC97, defaulting to HDA (ICH6).
Advanced Settings
  • General Options
    • Tags: Bind tags to identify different virtual machines. For more information, see Tag Management
    • Hostname: The hostname of the virtual machine
    • VM Scheduling Group: Join a virtual machine scheduling group to allocate hosts according to the scheduling policy associated with the scheduling group. For more information, see VM Scheduling Policy
    • Sync with Host BIOS: Whether the Windows virtual machine's BIOS clock synchronizes with the host's BIOS clock, defaulting to disabled.
    • User Data: User-defined data, uploaded custom parameters or scripts to perform custom configurations or specific tasks on the virtual machine.
  • Remote Access: Virtual machine remote access settings. For more information, see Access a Virtual Machine
    • Console Mode: Virtual machine console mode, including VNC, SPICE, VNC+SPICE, default is VNC
    • Console Password: The console password for the virtual machine, supports manual input or random generation. Only supports English letters, numbers, and the following special characters: -`=[];',./~!@#$%^&*()_+|{}:"<>?

      You can specify whether to enforce setting a console password and password strength through VNC Console Password in the security settings. If enabled, you need to set the console password according to the specified strength requirements when creating a virtual machine.

    • USB Redirection: Redirects USB devices from the VDI client to the virtual machine for use, default is not enabled.
  • Login Authentication: Authentication method for logging into the virtual system.
    • Not Set: No login password or key is set yet.
    • Password: The password for the root user on Linux virtual machines or the Administrator user on Windows virtual machines when logging into the system. Supports manual input or random generation. Only supports English letters, numbers, and the following special characters: -`=[];',./~!@#$%^&*()_+|{}:"<>?
      Note: Before setting the password, ensure that the virtual machine image has cloud-init installed.
    • SSH Key: When creating a new Linux virtual machine, you can choose to inject an SSH Key for passwordless login to the virtual machine.
      Note: Before injecting the SSH Key, ensure that the virtual machine image has cloud-init installed.
  • VMTools: Virtual machine fault handling strategy and time synchronization strategy.
    • Error Policy: The strategy for handling virtual machine faults, supporting no action, restart, and shutdown policies.
    • Time Synchronization: Whether the virtual machine's base time automatically synchronizes with the host system time, defaulting to automatic synchronization.
  • Boot Options: BIOS boot order and mode settings for the virtual machine.
    • Boot Order: The priority order in which the BIOS loads the operating system, supporting hard disk, CD-ROM, and network booting. By default, the BIOS boots from the hard disk, and if no boot device is found, it cannot load the system.
    • BIOS Mode: The BIOS boot mode, supporting Legacy and UEFI. Legacy is the default in x86 clusters, while UEFI is the default in ARM clusters.
    • BIOS Post Delay: The automatic dwell time on the BIOS interface, defaulting to 10 seconds.
  • Other Options: Options related to virtual machine migration, virtualization, network security, and more.
    • Hide KVM Virtualization Flag: Marks whether the virtual machine's CPU virtualization is turned on. When enabled, inserts <hidden state="on"> into the <kvm> element in the newly started virtual machine's definition XML, defaulting to disabled.
    • VMware I/O Port Simulation: Whether to allow a KVM virtual machine to emulate the IO ports in a VMware virtualization environment, making the KVM virtual machine compatible with VMware IO port standards, defaulting to disabled.
      The main purposes of this option:
      • Migration and Compatibility: Allows migrating virtual machines from a VMware environment to a KVM environment, or running both VMware and KVM virtual machines in a mixed environment without significant configuration changes.
      • Testing and Development: Developers and testers can use KVM virtual machines to simulate a VMware environment to test applications or configurations in a VMware-like environment without requiring actual VMware licenses.
    • Anti-Spoofing Mode: Whether to enable anti-IP/MAC spoofing and ARP deception features. When enabled, the virtual machine can only communicate with the outside world using the IP/MAC address allocated by the platform, defaulting to disabled.
    • Cross-Cluster HA Policy: Whether to support cross-cluster high availability for automatic virtual machine migrations, defaulting to not allowing cross-cluster high availability.
      Note: This policy only affects scenarios involving shared storage (distributed storage, NFS storage, SAN storage) and automatic virtual machine migration behavior, such as high availability host replacement and host entering maintenance mode triggering migration. Other actions like manual hot migration of virtual machines (changing hosts), starting virtual machines on designated hosts, or changing hosts based on Dynamic Resource Scheduling (DRS) policies are not affected.
    • Hyper-V: Whether to enable Hyper-V emulation for the virtual machine, primarily for nested virtualization scenarios in Windows systems. Default is disabled.
    • EmulatorPin: Whether to bind threads in the virtual machine (excluding vCPU and IO threads) to host pCPUs, supporting binding by NUMA nodes. Default is not bound, meaning virtual machine-related threads run on corresponding pCPUs according to system scheduling.
    • Auto-Converge: Whether to enable auto-convergence mode for KVM virtual machine hot migrations, defaulting to not enabled.

      If the virtual machine remains under high business load for a long time and the application is moderately sensitive to performance, it is recommended to enable auto-convergence mode to improve migration success rates.

    • PCI Hot Plug: Whether to allow hot plugging of PCI devices in the virtual machine, defaulting to allowed.
      Note: If hardware compatibility errors occur during hot plugging or if the hardware device is not supported, this option can be disabled.

After confirming that the configuration is correct, click OK to create the new virtual machine.

What to do next

Some virtual machine configurations depend on VMTools. After creating the virtual machine, it is recommended to install VMTools to enable certain configurations. For more information about VMTools, see Virtual Machine VMTools.
















































Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.