Install the virtio driver

更新时间:
复制 MD 格式

The Alibaba Cloud virtio driver is a high-performance I/O driver for virtualization. This driver is a required component for images published on the Alibaba Cloud platform. When you create a Windows custom image, you must install the virtio driver. Otherwise, Elastic Compute Service (ECS) instances created from the image might fail to start because they cannot recognize the virtio virtualization devices. This topic describes how to install the Alibaba Cloud virtio driver on the virtual machine (VM) used to create a custom image.

Alibaba Cloud virtio driver

The Alibaba Cloud virtio driver is developed based on the community virtio driver to provide better compatibility with the Alibaba Cloud platform. All public images from Alibaba Cloud come with the virtio driver pre-installed. However, other Windows images usually do not include the Alibaba Cloud virtio driver. Therefore, you must manually install the virtio driver when you create a Windows custom image. The community virtio driver may not work correctly after installation, so we recommend that you use the Alibaba Cloud virtio driver.

The Alibaba Cloud virtio driver includes the following components:

Included drivers

Description

netkvm

Network interface controller (NIC) driver

viostor

Storage driver

vioser

Serial port driver

balloon

Optimizes and manages the memory usage of VMs to ensure that VMs can dynamically adjust memory allocation without affecting performance.

Note

This driver is not yet enabled on Alibaba Cloud.

pvpanic

Provides a mechanism for virtual machines to report their status to the host when critical errors or crashes occur.

fwcfg

Passes host configuration information, such as metadata, user data, or device parameters, to Windows VMs in a virtualization environment.

Note

This driver is included only in Windows 10, Windows Server 2016, and later operating systems.

Release history of the Alibaba Cloud virtio driver:

Driver version

Updates

Release date

Supported operating systems

Installation package

58110

New features:

  1. Improves the packet receiving efficiency of the NIC driver in IPv6 scenarios.

  2. Improves the packet sending efficiency of the NIC driver in TCP ultra-short packet scenarios.

  3. Supports setting the MaxRxBuffers parameter of the NIC driver to 2048.

  4. Optimizes the memory usage of the NIC driver.

Fixed issues:

  1. Fixes an issue where the system may hang when a disk I/O out-of-bounds error occurs.

  2. Fixes an issue where packet loss may occur when TCP ultra-short packets are sent continuously. This improves compatibility with the Alibaba Cloud platform.

January 2024

64-bit versions of Windows 10, Windows Server 2016, and later

AliyunVirtio_58110_WIN2016_x64.zip

58101

New features:

  1. Adds the fwcfg driver.

  2. Supports setting the MaxRxBuffers parameter of the NIC driver to 4096.

Fixed issues:

  1. Fixes an issue where the disk serial number 0 is returned for a query on some instance types.

  2. Fixes an issue where setting the MaxRxBuffers parameter of the NIC driver to 16 does not take effect.

September 2022

64-bit versions of Windows 10, Windows Server 2016, and later

AliyunVirtio_58101_WIN2016_x64.zip

64-bit versions of Windows 8.1 and Windows Server 2012 R2

AliyunVirtio_58101_WIN2012R2_x64.zip

64-bit versions of Windows 7 and Windows Server 2008 R2

AliyunVirtio_58101_WIN2008R2_x64.zip

58017

Based on the community version from January 2021.

April 2021

64-bit versions of Windows 10, Windows Server 2016, and later

AliyunVirtio_58017_WIN2016_x64.zip

64-bit versions of Windows 8.1 and Windows Server 2012 R2

AliyunVirtio_58017_WIN2012R2_x64.zip

64-bit versions of Windows 8 and Windows Server 2012

AliyunVirtio_58017_WIN2012_x64.zip

64-bit versions of Windows 7 and Windows Server 2008 R2

AliyunVirtio_58017_WIN2008_x64.zip

Procedure

The virtio driver is updated periodically. This topic provides an example of how to install virtio driver version 58101 on a 64-bit Windows Server 2016 operating system.

  1. On the VM that you use to create the image, download and decompress the virtio driver installation package for your operating system. For more information, see Alibaba Cloud virtio driver download URLs.

  2. Install the virtio driver.

    Install using the GUI

    Important

    During the GUI-based installation, the NIC driver is updated. This causes a network interruption that lasts for approximately 10 seconds and may affect your services. You must perform a risk assessment and make the necessary preparations in advance.

    1. In the download path, find and double-click AliyunVirtio_58101_WIN2016_x64.exe.

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

      image

    3. When the following window appears, restart the system for the changes to take effect.

      image

      Note

      If the message For Windows 7/Windows Server 2008 R2, you must install the SHA-2 patch! appears during installation on a Windows 7 or Windows Server 2008 R2 system, the SHA-2 signing patch is missing. To prevent startup failures after you import the image, you must install the signing patch in advance. For more information, see Windows Server 2008 R2 fails to start due to a driver signature verification failure.

    Install from the command line

    1. In Windows PowerShell, run the following command to navigate to the package download directory, for example, 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: Enables silent mode.

      • /FORCE: Forces the installation and overwrites the existing virtio driver if one is already installed.

      • /NORESTART: Prevents the system from automatically restarting after installation.

  3. Verify that the virtio driver is installed.

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

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

      If a driver version number similar to the one in the following figure appears, the virtio driver is installed.

      image

    2. Run the following command to retrieve the registry configuration information for the viostor service.

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

      The viostor service is usually associated with the virtio driver in a virtualization environment. 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 appears, the virtio driver is installed.

      image

    After you verify that the driver is installed, you can import the image to the Alibaba Cloud platform.

References

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

  • Some operations on Windows instances depend on the virtio driver version in the image. For example, to resize a disk online, the virtio driver version must be newer than 58011. To retrieve a disk serial number, the version must be newer than 58017. If the current virtio driver version does not meet the requirements, you must update the driver before you perform the operation. For more information, see Update the virtio driver for a Windows instance.

  • If you do not install the virtio driver when you create an image, ECS instances created from that image may fail to start. In this case, you can perform an offline installation of the virtio driver. For more information, see Offline installation of virtio drivers for Windows instances.