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:
Fixed issues:
| January 2024 | 64-bit versions of Windows 10, Windows Server 2016, and later | |
58101 | New features:
Fixed issues:
| September 2022 | 64-bit versions of Windows 10, Windows Server 2016, and later | |
64-bit versions of Windows 8.1 and Windows Server 2012 R2 | ||||
64-bit versions of Windows 7 and Windows Server 2008 R2 | ||||
58017 | Based on the community version from January 2021. | April 2021 | 64-bit versions of Windows 10, Windows Server 2016, and later | |
64-bit versions of Windows 8.1 and Windows Server 2012 R2 | ||||
64-bit versions of Windows 8 and Windows Server 2012 | ||||
64-bit versions of Windows 7 and Windows Server 2008 R2 |
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.
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.
Install the virtio driver.
Install using the GUI
ImportantDuring 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.
In the download path, find and double-click
AliyunVirtio_58101_WIN2016_x64.exe.Follow the on-screen instructions to complete the installation.

When the following window appears, restart the system for the changes to take effect.
NoteIf 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
In Windows PowerShell, run the following command to navigate to the package download directory, for example,
C:\test.cd C:\testRun the following command to install the virtio driver.
./AliyunVirtio_58101_WIN2016_x64.exe /SILENT /FORCE /NORESTARTNote/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.
Verify that the virtio driver is installed.
In Windows PowerShell, run the following command to check the virtio driver version number.
(Get-Item C:\Windows\System32\drivers\viostor.sys).VersionInfo.ProductVersionIf a driver version number similar to the one in the following figure appears, the virtio driver is installed.

Run the following command to retrieve the registry configuration information for the
viostorservice.Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\viostor"NoteThe
viostorservice is usually associated with the virtio driver in a virtualization environment. If the command returns information, theviostorservice 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.

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 than58017. 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.