第 4 章 Optimizing Windows virtual machines


When using Microsoft Windows as a guest operating system in a virtual machine (VM) hosted in RHEL 10, the performance of the guest may be negatively impacted.

Therefore, you can optimize the performance of your Windows VMs by doing any combination of the following:

The primary method of improving the performance of your Windows virtual machines (VMs) is to install KVM paravirtualized (virtio) drivers for Windows on the guest operating system.

注意

The virtio-win drivers are certified (WHQL) against the latest releases of Windows 10 and 11, available at the time of the respective virtio-win release. However, virtio-win drivers are generally tested and expected to function correctly on previous builds of Windows 10 and 11 as well.

To install the drivers on a Windows VM, perform the following actions:

  1. Prepare the install media on the host machine. For more information, see Preparing virtio driver installation media on a host machine.
  2. Attach the install media to an existing Windows VM, or attach it when creating a new Windows VM. For more information, see Installing Windows virtual machines on RHEL.
  3. Install the virtio drivers on the Windows guest operating system. For more information, see Installing virtio drivers on a Windows guest.
  4. Enable the QEMU Guest Agent on the Windows guest operating system. For more information, see Installing QEMU Guest Agent on a Windows guest.

4.1.1. How Windows virtio drivers work

Paravirtualized drivers enhance the performance of virtual machines (VMs) by decreasing I/O latency and increasing throughput to almost bare metal levels. You can use paravirtualized drivers for VMs that run I/O-heavy tasks and applications.

virtio drivers are KVM’s paravirtualized device drivers, available for Windows VMs running on KVM hosts. These drivers are provided by the virtio-win package, which includes drivers for:

  • Block (storage) devices
  • Network interface controllers
  • Video controllers
  • Memory ballooning device
  • Paravirtualized memory device
  • Paravirtual serial port device
  • Entropy source device
  • Paravirtual panic device
  • Input devices, such as mice, keyboards, or tablets
  • VirtIO FS Device
  • QEMU FwCfg Device
  • A small set of emulated devices
注意

For additional information about emulated, virtio, and assigned devices, refer to Attaching host devices to virtual machines.

By using KVM virtio drivers, the following Microsoft Windows versions are expected to run similarly to physical systems:

To install or update KVM virtio drivers on a Windows virtual machine (VM), you must first prepare the virtio driver installation media on the host machine. To do so, attach the .iso file, provided by the virtio-win package, as a storage device to the Windows VM.

Prerequisites

Procedure

  1. Refresh your subscription data:

    # subscription-manager refresh
    All local data refreshed
  2. Get the latest version of the virtio-win package.

    • If virtio-win is not installed:

      # dnf install -y virtio-win
    • If virtio-win is installed:

      # dnf upgrade -y virtio-win

      If the installation succeeds, the virtio-win driver files are available in the /usr/share/virtio-win/ directory. These include ISO files and a drivers directory with the driver files in directories, one for each architecture and supported Windows version.

      # ls /usr/share/virtio-win/
      agents.json drivers/ guest-agent/ info.json /installer /qxl-wddm-dod release-drivers-versions.txt /spice-vdagent /tools virtio-win-1.9.45.iso virtio-win.iso
  3. Attach the virtio-win.iso file as a storage device to the Windows VM.

    • When creating a new Windows VM, attach the file by using the virt-install command options.
    • When installing the drivers on an existing Windows VM, attach the file as a CD-ROM by using the virt-xml utility:

      # virt-xml WindowsVM --add-device --disk virtio-win.iso,device=cdrom
      Domain 'WindowsVM' defined successfully.

4.1.3. Installing virtio drivers on a Windows guest

To install KVM virtio drivers on a Windows guest operating system, you must add a storage device that contains the drivers (either when creating the virtual machine (VM) or afterwards) and install the drivers in the Windows guest operating system.

This procedure provides instructions to install the drivers by using the graphical interface. You can also use the Microsoft Windows Installer (MSI) command-line interface.

Prerequisites

Procedure

  1. In the Windows guest operating system, open the File Explorer application.
  2. Click This PC.
  3. In the Devices and drives pane, open the virtio-win medium.
  4. Based on the operating system installed on the VM, run one of the installers:

    • If using a 32-bit operating system, run the virtio-win-gt-x86.msi installer.
    • If using a 64-bit operating system, run the virtio-win-gt-x64.msi installer.
  5. In the Virtio-win-driver-installer setup wizard that opens, follow the displayed instructions until you reach the Custom Setup step.

    Image displaying the Virtio-win-guest-tools setup wizard.
  6. In the Custom Setup window, select the device drivers you want to install. The recommended driver set is selected automatically, and the descriptions of the drivers are displayed on the right of the list.
  7. Click next, then click Install.
  8. After the installation completes, click Finish.
  9. Reboot the VM to complete the driver installation.

Verification

  1. On your Windows VM, navigate to the Device Manager:

    1. Click Start
    2. Search for Device Manager
  2. Ensure that the devices are using the correct drivers:

    1. Click a device to open the Driver Properties window.
    2. Navigate to the Driver tab.
    3. Click Driver Details.

Next steps

4.1.4. Updating virtio drivers on a Windows guest

To update KVM virtio drivers on a Windows guest operating system (OS), you can use the Windows Update service, if the Windows OS version supports it. If it does not, reinstall the drivers from virtio driver installation media attached to the Windows virtual machine (VM).

Prerequisites

Procedure

  • On Windows 10, Windows Server 2016 and later operating systems, check if the driver updates are available by using the Windows Update graphical interface:

    1. Start the Windows VM and log in to its guest OS.
    2. Navigate to the Optional updates page:

      Settings Windows Update Advanced options Optional updates

    3. Install all updates from Red Hat, Inc.
  • On operating systems prior to Windows 10 and Windows Server 2016, or if the OS does not have access to Windows Update, reinstall the drivers.

    This restores the Windows guest OS network configuration to default (DHCP). If you want to preserve a customized network configuration, you also need to create a backup and restore it by using the netsh utility:

    1. Start the Windows VM and log in to its guest OS.
    2. Open the Windows Command Prompt:

      1. Use the Super+R keyboard shortcut.
      2. In the window that appears, type cmd and press Ctrl+Shift+Enter to run as administrator.
    3. Back up the OS network configuration by using the Windows Command Prompt:

      C:\WINDOWS\system32\netsh dump > backup.txt
    4. Reinstall KVM virtio drivers from the attached installation media. Do one of the following:

      • Reinstall the drivers by using the Windows Command Prompt, where X is the installation media drive letter. The following commands install all virtio drivers.

        • If using a 64-bit vCPU:

          C:\WINDOWS\system32\msiexec.exe /i X:\virtio-win-gt-x64.msi /passive /norestart
        • If using a 32-bit vCPU:

          C:\WINDOWS\system32\msiexec.exe /i X:\virtio-win-gt-x86.msi /passive /norestart
      • Reinstall the drivers using the graphical interface without rebooting the VM.
    5. Restore the OS network configuration using the Windows Command Prompt:

      C:\WINDOWS\system32\netsh -f backup.txt
    6. Reboot the VM to complete the driver installation.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部