Install and Use VMTools

VMTools is a set of drivers and tools installed in VMs to enhance ZSphere management of guest operating systems. After VMTools is installed, the platform can read internal VM information and support configuration delivery, configuration retrieval, time synchronization, and advanced monitoring.

VMTools Components

VMTools primarily includes the following tools and drivers. The components vary by operating system.

OS VMTools Component Description
Linux Advanced Monitoring Agent An agent installed in a VM to collect advanced monitoring data, including CPU, memory, and disk capacity data.
QEMU Guest Agent (QGA) An application that enables interaction between VMs and hosts without relying on the network. QGA can retrieve and deliver VM configurations and push monitoring data.
Note: Linux operating systems usually include virtio drivers and cloud-init by default. Therefore, VMTools for Linux does not include these two tools. If your Linux operating system does not include them, install them separately.
Windows Advanced Monitoring Agent An agent installed in a VM to collect advanced monitoring data, including CPU, memory, and disk capacity data.
QGA An application that enables interaction between VMs and hosts without relying on the network. QGA can retrieve and deliver VM configurations and push monitoring data.
Virtio Driver A set of drivers that improves VM performance.
  • SCSI controller driver: Improves VM disk performance in a virtualization environment.
  • PCI simple communications controller driver: Enables communication between a VM and the underlying KVM virtualization layer.
  • PCI device driver: Enables balloon memory scaling.
  • Ethernet adapter driver: Improves VM network performance in a virtualization environment.
Cloudbase-init A component that supports User Data import and other customization features.
FreeBSD Advanced Monitoring Agent An agent installed in a VM to collect advanced monitoring data, including CPU, memory, and disk capacity data.

VMTools Use Cases

After VMTools is installed on a VM, the platform can support advanced monitoring, configuration delivery, and configuration retrieval.

Advanced monitoring
The Advanced Monitoring Agent collects monitoring data from inside the VM and periodically pushes the data to the host through DHCP or QGA. You can use line charts to view real-time trends in VM performance, including CPU, memory, and disk capacity.
Configuration delivery
QGA in VMTools delivers parameters configured on the platform to the guest operating system, including the VM hostname and network configurations.
  • Hostname: After the latest VMTools is installed, a new hostname configured for a running VM is delivered through QGA and takes effect without restarting the VM.
    Note: To deliver a hostname through QGA, install VMTools before you modify the hostname.
  • Network configuration: If DHCP is not enabled for a distributed port group, parameters configured on the platform, such as the IP address, DNS, and MTU, must be delivered to the NIC through QGA. After VMTools is installed, the specified IP address and other parameters automatically take effect.
Configuration retrieval
QGA in VMTools automatically retrieves the IP address configured for a VM NIC. The retrieved IP address can be displayed and managed on the platform.
Note:
  • If DHCP is not enabled for the distributed port group to which the VM NIC belongs, and VMTools is installed on the running VM, the platform can automatically retrieve the VM NIC configuration.
  • If an IP address is already configured inside the VM, the retrieved IP address overwrites the IP address configured on the platform.
  • If the VM NIC IP address conflicts with an IP address in the port group, an alert is generated.

Advanced Monitoring Agent

Advanced monitoring obtains performance data from VMs through VMTools and displays metrics such as CPU, memory, and disk capacity in charts. Advanced monitoring data is collected and reported by the Advanced Monitoring Agent in VMTools.

Monitoring Mechanism

  • Advanced monitoring data is obtained through the Advanced Monitoring Agent in VMTools. To view advanced monitoring data, install VMTools on the VM first.
  • The collected monitoring data can be pushed to the host through the DHCP service of the distributed port group or through QEMU Guest Agent (QGA) in VMTools:
    • If DHCP is enabled on the VM default network, monitoring data is pushed through the DHCP service by default.
    • If DHCP is not enabled on the VM default network or the DHCP service fails, monitoring data is pushed through QGA. After DHCP is enabled or restored on the VM default network, monitoring data automatically switches back to the DHCP service.

Manage the Advanced Monitoring Agent

Use the following commands to manage the Advanced Monitoring Agent, including stopping, starting, restarting, querying, or uninstalling the advanced monitoring service:
  • Stop the service: service zwatch-vm-agent stop
  • Start the service: service zwatch-vm-agent start
  • Restart the service: service zwatch-vm-agent restart
  • Query service status: service zwatch-vm-agent status
  • Uninstall the advanced monitoring service:
    After the Advanced Monitoring Agent is uninstalled, advanced monitoring data is no longer collected and the advanced monitoring service is no longer provided. The uninstallation method differs for Linux and Windows VMs:
    • Linux VM
      1. Run service zwatch-vm-agent stop to stop the agent.
      2. Run rm -f /etc/systemd/system/zwatch-vm-agent.service to delete the service configuration file.
      3. Run rm -rf /usr/local/zstack/zwatch-vm-agent to delete the agent installation directory.
    • Windows VM
      1. Delete related registry entries.
        Run Windows Command Prompt as an administrator and run the following commands to delete related registry keys:
        reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSDTC /f
        reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC /f
        reg delete HKEY_CLASSES_ROOT\CID /f
      2. Stop and reinstall the msdtc service.
        Run Windows Command Prompt as an administrator and run the following commands to stop and reinstall the msdtc service:
        net stop msdtc
        msdtc -uninstall
        msdtc -install
      3. Restart the VM.
      4. Uninstall the agent.
        Run Windows Command Prompt as an administrator and run the following commands to delete the agent:
        msiexec /a "c:\Program Files\GuestTools\qemu-ga.msi" targetdir="c:\Program Files"
        "c:\Program Files\QEMU Guest Agent\Qemu-ga\qemu-ga.exe" -s vss-uninstall

Install VMTools on a Linux VM

The installation process mounts the VMTools ISO first. You then open the VM console and run the installation commands manually.

Before you begin

  • Make sure the VM is running.
  • Make sure Linux command-line tools are installed on the VM, such as tar, wget, and curl.

Procedure

  1. On the target VM page, click Actions > VMTools > Install VMTools.
  2. In the Install VMTools dialog, click Next: Install on VM Console.
    When mounting the VMTools ISO, the system selects a CD/DVD drive according to the following rules:
    • If an empty CD/DVD drive exists, the system automatically selects the first available empty CD/DVD drive and mounts the VMTools ISO.
    • If no empty CD/DVD drive exists, the system selects CD/DVD Drive 1, automatically unmounts the original image, and mounts the VMTools ISO.
  3. Click Copy Commands and Launch Console.
    After you click the button, the following commands are copied and the VM console opens automatically:
    # Create a mount point directory
    mkdir /mnt/cdrom
    # Mount the CD-ROM image
    mount /dev/cdrom /mnt/cdrom
    # Install VMTools
    cd /mnt/cdrom/
    bash ./zs-tools-install.sh
    # Unmount the CD-ROM image (optional)
    cd ~
    umount /mnt/cdrom
  4. In the VM console, click Local Command Paster.
  5. In the Paste Command dialog, paste the commands copied in the previous step, and then click OK to run the commands.

What to do next

To update VMTools, on the target VM page, click Actions > VMTools > Reinstall VMTools.

Install VMTools on a Windows VM

The installation process mounts the VMTools ISO first. You then open the VM console and install VMTools as prompted.

Before you begin

Make sure the VM is running.

Procedure

  1. On the target VM page, click Actions > VMTools > Install VMTools.
  2. In the Install VMTools dialog, click Next: Install on VM Console.
    When mounting the VMTools ISO, the system selects a CD/DVD drive according to the following rules:
    • If an empty CD/DVD drive exists, the system automatically selects the first available empty CD/DVD drive and mounts the VMTools ISO.
    • If no empty CD/DVD drive exists, the system selects CD/DVD Drive 1, automatically unmounts the original image, and mounts the VMTools ISO.
  3. Click Launch Console.
  4. Open the VM console and install VMTools as prompted.
    1. Mount the VMTools image: In the VMTools installation prompt, click Install Now to mount the VMTools image to the virtual CD/DVD drive.
    2. Install VMTools: Run the VMTools installer to install VMTools, common tools, and VirtIO drivers in sequence.
    3. Complete the installation and restart the VM: After the installation is complete, restart the VM for the configuration to take effect.
    Note: Windows Server 2008 R2 does not support silent installation of VirtIO drivers. If Windows displays a driver publisher or security prompt during installation, manually trust the driver publisher and continue.

What to do next

To update VMTools, on the target VM page, click Actions > VMTools > Reinstall VMTools.

VMTools Supported OS List

VMTools support varies by operating system. The following tables list VMTools support for each operating system.

Note: In the tables, Yes means that the component can be installed through VMTools and related features can be used normally. No means that the component cannot be installed through VMTools, or features that depend on the component might be unavailable after installation. It does not mean the component itself is unsupported. You can still install the component by other means.

Linux Operating Systems

Operating System Version Advanced Monitoring Agent QGA
CentOS CentOS 6.5 64-bit No Yes
CentOS 6.8 64-bit Yes Yes
CentOS 6.9 64-bit Yes Yes
CentOS 6.10 64-bit Yes No
CentOS 7.2 64-bit Yes Yes
CentOS 7.3 64-bit Yes Yes
CentOS 7.4 64-bit Yes Yes
CentOS 7.5 64-bit Yes Yes
CentOS 7.6 64-bit Yes Yes
CentOS 7.9 64-bit Yes Yes
CentOS 8.0 64-bit Yes Yes
RHEL Redhat Enterprise Linux Server 6.9 64-bit Yes No
Redhat Enterprise Linux Server 7.0 64-bit Yes No
Redhat Enterprise Linux Server 7.1 64-bit Yes No
Redhat Enterprise Linux Server 7.2 64-bit Yes No
Redhat Enterprise Linux Server 7.3 64-bit Yes No
Redhat Enterprise Linux Server 7.4 64-bit Yes Yes
Redhat Enterprise Linux Server 7.5 64-bit Yes Yes
Redhat Enterprise Linux Server 7.6 64-bit Yes Yes
Fedora Fedora 30 64-bit Yes Yes
Fedora 31 64-bit Yes Yes
Debian Debian 9.9 64-bit Yes Yes
Debian 10.13 64-bit Yes Yes
Debian 11.9 64-bit Yes Yes
Debian 12.5 64-bit Yes Yes
Ubuntu Ubuntu 14.04 64-bit Yes Yes
Ubuntu 16.04 64-bit Yes Yes
Ubuntu 16.10 64-bit Yes Yes
Ubuntu 18.04 64-bit Yes Yes
Ubuntu 20.04 64-bit Yes Yes
Ubuntu 22.04 64-bit Yes Yes
Ubuntu 24.04 64-bit Yes Yes
Kylin Kylin V4.0.2 64-bit Yes No
Kylin V10 SP1(0518) 64-bit Yes Yes
Kylin V10 SP2 64-bit Yes Yes
Kylin V10 SP3 64-bit Yes Yes
NeoKylin NeoKylin V7.0 64-bit Yes Yes
NeoKylin V7update6 64-bit Yes Yes
OpenSUSE OpenSUSE Leap 15.0 64-bit Yes Yes
SLES SUSE Linux Enterprise Server 11 64-bit Yes Yes
SUSE Linux Enterprise Server 12 64-bit Yes Yes
SUSE Linux Enterprise Server 15 64-bit Yes Yes
SUSE Linux Enterprise Desktop 12 64-bit Yes Yes
SUSE Linux Enterprise Desktop 15 64-bit Yes Yes
UOS UOS V20 1050e Yes Yes
Oracle Linux Oracle Linux 7.9 Yes Yes
OpenEuler OpenEuler 20 64-bit Yes Yes
OpenEuler 22 64-bit Yes Yes
Alma Linux Alma Linux 9.3 64-bit Yes Yes

Windows Operating Systems

Operating System Version Advanced Monitoring Agent QGA VirtIO Driver Cloudbase-init
Windows Windows Server 2008 R2 64-bit Yes Yes Yes No
Windows Server 2012 64-bit Yes Yes Yes Yes
Windows Server 2016 64-bit Yes Yes Yes Yes
Windows Server 2019 64-bit Yes Yes Yes Yes
Windows Server 2022 64-bit Yes Yes Yes Yes
Windows Server 2025 64-bit Yes Yes Yes Yes
Note: Windows Server 2008 R2 supports installing VirtIO drivers through VMTools, but it does not support silent installation. If Windows displays a driver publisher or security prompt during installation, manually trust the driver publisher and continue.

FreeBSD Operating System

Operating System Version Advanced Monitoring Agent
FreeBSD FreeBSD 11 64-bit Yes
FreeBSD 12 64-bit Yes
FreeBSD 13 64-bit Yes