The Alibaba Cloud virtio driver is a high-performance I/O driver essential for virtualized environments. You must install this driver when creating a Windows image for use on Alibaba Cloud. Without it, Elastic Compute Service (ECS) instances launched from your image may fail to boot due to unrecognized virtio devices. This topic shows you how to install the Alibaba Cloud virtio driver on the virtual machine (VM) you are using to create your custom image.
Alibaba Cloud virtio driver
The Alibaba Cloud virtio drivers are developed based on the community virtio drivers to ensure better compatibility with the Alibaba Cloud platform. All Alibaba Cloud public images include the virtio drivers. However, other Windows images typically do not include the Alibaba Cloud virtio drivers. Therefore, you must manually install them when creating a custom Windows image. If you use the community virtio drivers, they may not function correctly after installation. We strongly recommend that you use the Alibaba Cloud virtio drivers.
The Alibaba Cloud virtio driver package includes the following components:
Driver | Description |
netkvm | Network adapter driver. |
viostor | Storage driver. |
vioser | Serial port driver. |
balloon | Optimizes and manages the virtual machine's memory usage to allocate memory dynamically without impacting performance. Note This driver is not currently enabled on Alibaba Cloud. |
pvpanic | Provides a mechanism for the virtual machine to report its state to the host during a critical error or crash. |
fwcfg | Transfers configuration information, such as metadata, user data, or device parameters, from the host to the Windows virtual machine. Note This driver is included only in Windows 10, Windows Server 2016, and later operating systems. |
Alibaba Cloud virtio driver release notes:
Driver version | Update | Release date | Supported operating system | Installation package |
58110 | New features:
Bug fixes:
| 2024-01 |
| |
58101 | New features:
Bug fixes:
| 2022-09 |
| |
| ||||
| ||||
58017 | Released based on the Community Edition released in January 2021. | 2021-04 |
| |
| ||||
| ||||
|
Procedure
The virtio driver is updated periodically. This topic demonstrates the installation of Alibaba Cloud virtio driver version 58101 on a 64-bit Windows Server 2016 system as an example.
On the VM you are using for the custom image, download the installation package of the virtio driver that corresponds to your operating system and extract the files.
Install the virtio driver.
GUI installation
ImportantThe GUI-based installation process updates the network adapter driver, which causes a network interruption of approximately 10 seconds. This may affect your services. Assess the risks and prepare accordingly.
Navigate to the download path and double-click
AliyunVirtio_58101_WIN2016_x64.exe.Follow the on-screen instructions to complete the installation.

When the following screen appears, restart the system to apply the new configuration.
NoteIf you are installing the driver on Windows 7 or Windows Server 2008 R2 and a message appears stating
You must install the SHA-2 patch for Windows 7/Windows Server 2008 R2!, the system is missing the required SHA-2 signing patch. To prevent the instance from failing to start after the image is imported, install this patch.
CLI installation
In Windows PowerShell, run the following command to change to the directory where you downloaded the package, 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 to overwrite an existing virtio driver./NORESTART: Prevents the system from automatically restarting after installation.
Verify the virtio driver installation.
In Windows PowerShell, run the following command to check the virtio driver version.
(Get-Item C:\Windows\System32\drivers\viostor.sys).VersionInfo.ProductVersionA returned version number, as shown in the figure below, confirms the 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 typically associated with the virtio driver in a virtualized environment. Successful command output confirms that theviostorservice entry exists in the registry and the driver is installed.If the command returns information similar to the following, the virtio driver is installed. .

After completing these verification steps, the virtio driver is successfully installed. The image can now be imported to Alibaba Cloud.
References
After installing the virtio drivers on a Windows system, you can obtain the Windows image file and import the image file to Alibaba Cloud.
Certain operations on Windows instances depend on the image's virtio driver version. For example, online resizing of cloud disks requires virtio driver version
58011or later, and querying cloud disk serial numbers requires virtio driver version58017or later. If the driver version is insufficient for an operation, you must update it first. For more information, see Update the virtio driver for a Windows instance.An ECS instance created from an image without the virtio drivers will fail to start. In this case, you can perform an Offline installation of virtio drivers for Windows instances.