Install the virtio driver

更新时间:
复制 MD 格式

The Alibaba Cloud virtio driver is a high-performance I/O driver for virtualization and a required component for publishing images to the Alibaba Cloud platform. When you create a Windows image, make sure that the virtio driver is installed in the operating system. Otherwise, ECS instances may fail to identify virtio virtualization devices and the system cannot start. This topic describes how to install the Alibaba Cloud virtio driver on the virtual machine from which you create the image.

Introduction to the Alibaba Cloud virtio driver

The Alibaba Cloud virtio driver is developed based on the community virtio driver to better adapt to the Alibaba Cloud platform. All Alibaba Cloud public images are preinstalled with the virtio driver. However, other Windows images usually do not contain the Alibaba Cloud virtio driver. Therefore, you must manually install the virtio driver when you create a custom Windows image. If you use the community virtio driver, the driver may not work as expected after installation. We recommend that you use the Alibaba Cloud virtio driver.

The Alibaba Cloud virtio driver contains the following components:

Driver

Description

netkvm

Network adapter driver.

viostor

Storage driver.

vioser

Serial port driver.

balloon

Optimizes and manages the memory usage of virtual machines so that memory allocation can be dynamically adjusted without compromising performance.

Note

This driver is not enabled on Alibaba Cloud.

pvpanic

Provides a mechanism for virtual machines to report their state to the host in the event of a critical error or crash.

fwcfg

Transfers configuration information of the host, such as metadata, user data, and device parameters, to Windows virtual machines in virtualized environments.

Note

This driver is available only for Windows 10, Windows Server 2016, and later operating systems.

Release notes of Alibaba Cloud virtio driver versions:

Driver version

Updates

Release date

Supported operating system

Installation package

58120

New features:

  1. Supported disk multi-queue to improve concurrency performance in high-I/O scenarios.

  2. Supported full 64-bit DMA addressing to effectively mitigate disk attach failures caused by severe system memory fragmentation.

  3. Introduced an error event logging mechanism for the network adapter driver to facilitate troubleshooting.

2026-07

Windows 10/Windows Server 2016 and later, 64-bit

AliyunVirtio_58120_WIN2016_x64.zip

58110

New features:

  1. Improved the packet receive efficiency of the network adapter driver in IPv6 scenarios.

  2. Improved the packet transmission efficiency of the network adapter driver for TCP ultra-short packets.

  3. Supported setting the MaxRxBuffers parameter of the network adapter driver to 2048.

  4. Optimized the memory usage of the network adapter driver.

Bug fixes:

  1. Fixed occasional system hangs caused by out-of-bounds disk I/O.

  2. Fixed occasional packet loss during continuous transmission of TCP ultra-short packets to better adapt to the Alibaba Cloud platform.

2024-01

Windows 10/Windows Server 2016 and later, 64-bit

AliyunVirtio_58110_WIN2016_x64.zip

58101

New features:

  1. Added the fwcfg driver.

  2. Supported setting the MaxRxBuffers parameter of the network adapter driver to 4096.

Bug fixes:

  1. Fixed a bug where the queried disk serial number was 0 with a small probability for specific instance types.

  2. Fixed a bug where setting the MaxRxBuffers parameter of the network adapter driver to 16 did not take effect.

2022-09

Windows 10/Windows Server 2016 and later, 64-bit

AliyunVirtio_58101_WIN2016_x64.zip

Windows 8.1/Windows Server 2012 R2, 64-bit

AliyunVirtio_58101_WIN2012R2_x64.zip

Windows 7/Windows Server 2008 R2, 64-bit

AliyunVirtio_58101_WIN2008R2_x64.zip

58017

Based on the community edition released in January 2021.

2021-04

Windows 10/Windows Server 2016 and later, 64-bit

AliyunVirtio_58017_WIN2016_x64.zip

Windows 8.1/Windows Server 2012 R2, 64-bit

AliyunVirtio_58017_WIN2012R2_x64.zip

Windows 8/Windows Server 2012, 64-bit

AliyunVirtio_58017_WIN2012_x64.zip

Windows 7/Windows Server 2008 R2, 64-bit

AliyunVirtio_58017_WIN2008_x64.zip

Procedure

The virtio driver is updated from time to time. In this example, Alibaba Cloud virtio driver 58101 is installed on a 64-bit Windows Server 2016 operating system.

  1. On the virtual machine from which you create the image, download the virtio driver installation package for your operating system and decompress the package. For more information, see the download URLs of Alibaba Cloud virtio driver versions.

  2. Install the virtio driver.

    GUI-based installation

    Important

    The GUI-based installation of the virtio driver updates the network adapter driver, which causes a network interruption of approximately 10 seconds and may affect your business. Assess the risks and make preparations in advance.

    1. Go to the download path and double-click AliyunVirtio_58101_WIN2016_x64.exe.

    2. Follow the on-screen instructions to complete the installation.

    3. After the installation is complete, restart the system for the configuration to take effect.

      On the page that indicates the AliyunVirtio installation is complete, select Yes, restart the computer now (Y) and click Finish (F).

      Note

      If the You must install the SHA-2 patch for Windows 7/Windows Server 2008 R2! message appears during installation on Windows 7 or Windows Server 2008 R2, the SHA-2 signing patch is missing from the system. To prevent startup failures after the image is imported, we recommend that you install the signing patch in advance. For more information, see Windows Server 2008 R2 boot failure: Unverified driver signature.

    CLI-based installation

    1. In Windows PowerShell, run the following command to switch to the directory to which the package is downloaded, such as C:\test.

      cd C:\test
    2. Run the following command to install the virtio driver.

      ./AliyunVirtio_58101_WIN2016_x64.exe /SILENT /FORCE /NORESTART
      Note
      • /SILENT: specifies the silent mode.

      • /FORCE: forcibly overwrites the existing virtio driver, if one is installed.

      • /NORESTART: suppresses the automatic restart.

  3. Verify that the virtio driver is installed.

    1. In Windows PowerShell, run the following command to query the virtio driver version.

      (Get-Item C:\Windows\System32\drivers\viostor.sys).VersionInfo.ProductVersion

      If a driver version similar to the following output is returned, the virtio driver is installed.

      PS C:\test> (Get-Item C:\Windows\System32\drivers\viostor.sys).VersionInfo.ProductVersion
      100.6.101.58101
    2. Run the following command to obtain the registry configuration of the viostor service.

      Get-ItemProperty  -Path "HKLM:\SYSTEM\CurrentControlSet\Services\viostor"
      Note

      The viostor service is usually associated with the virtio driver in virtualized environments. If the command returns information, the viostor service entry exists in the registry, which indicates that the virtio driver is installed.

      If information similar to the following output is returned, the virtio driver is installed.

      PS C:\test> Get-ItemProperty  -Path "HKLM:\SYSTEM\CurrentControlSet\Services\viostor"
      
      ImagePath    : System32\drivers\viostor.sys
      Type         : 1
      Start        : 0
      ErrorControl : 1
      Group        : SCSI miniport
      Tag          : 33
      Owners       : (oem4.inf)
      PSPath       : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viostor
      PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
      PSChildName  : viostor
      PSDrive      : HKLM
      PSProvider   : Microsoft.PowerShell.Core\Registry

    After the preceding verification, the virtio driver is installed and the image can be imported to the Alibaba Cloud platform.

References

  • After you install the virtio driver on the Windows system, you can Obtain the Windows image file and import the image file to the Alibaba Cloud platform.

  • Some operations on Windows instances depend on the virtio driver version of the image. For example, the virtio driver version must be later than 58011 to resize cloud disks online, and later than 58017 to query the serial numbers of cloud disks. If the current virtio driver does not meet the requirements, update the virtio driver before you perform the operations. For more information, see Update the virtio driver for a Windows instance.

  • If the virtio driver is not installed when the image is created, ECS instances created from the image fail to start. In this case, you can Offline installation of virtio drivers for Windows instances.