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:
|
2026-07 |
Windows 10/Windows Server 2016 and later, 64-bit |
|
|
58110 |
New features:
Bug fixes:
|
2024-01 |
Windows 10/Windows Server 2016 and later, 64-bit |
|
|
58101 |
New features:
Bug fixes:
|
2022-09 |
Windows 10/Windows Server 2016 and later, 64-bit |
|
|
Windows 8.1/Windows Server 2012 R2, 64-bit |
||||
|
Windows 7/Windows Server 2008 R2, 64-bit |
||||
|
58017 |
Based on the community edition released in January 2021. |
2021-04 |
Windows 10/Windows Server 2016 and later, 64-bit |
|
|
Windows 8.1/Windows Server 2012 R2, 64-bit |
||||
|
Windows 8/Windows Server 2012, 64-bit |
||||
|
Windows 7/Windows Server 2008 R2, 64-bit |
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.
-
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.
-
Install the virtio driver.
GUI-based installation
ImportantThe 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.
-
Go to the download path and double-click
AliyunVirtio_58101_WIN2016_x64.exe. -
Follow the on-screen instructions to complete the installation.
-
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).
NoteIf 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
-
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 -
Run the following command to install the virtio driver.
./AliyunVirtio_58101_WIN2016_x64.exe /SILENT /FORCE /NORESTARTNote-
/SILENT: specifies the silent mode. -
/FORCE: forcibly overwrites the existing virtio driver, if one is installed. -
/NORESTART: suppresses the automatic restart.
-
-
-
Verify that the virtio driver is installed.
-
In Windows PowerShell, run the following command to query the virtio driver version.
(Get-Item C:\Windows\System32\drivers\viostor.sys).VersionInfo.ProductVersionIf 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 -
Run the following command to obtain the registry configuration of the
viostorservice.Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\viostor"NoteThe
viostorservice is usually associated with the virtio driver in virtualized environments. 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 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
58011to resize cloud disks online, and later than58017to 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.