You can resize the disks of a Windows Elastic Compute Service (ECS) instance online without the need to restart the instance. You can also query the serial numbers of disks from the operating system of the instance. If you want to resize the disks of a Windows instance created before March 30, 2019 or query the serial numbers of the disks attached to an instance created before May 1, 2020, perform the operations described in this topic to determine whether to update the Red Hat virtio driver of the instance.
Background information
- You can update the virtio driver only on Windows Server 2008 and later versions.
- If an ECS instance has multiple data disks attached, the driver update process may take 1 to 2 minutes to complete.
Procedure
Step 1: Check the version of the driver
- Method 1: Use the PowerShell script to check the version of the driver
- Connect to the Windows instance.
For more information, see Connect to a Windows instance by using a username and password.
- Open Command Prompt.
- Enter powershell to access the PowerShell interactive interface.
- Enter and run the following command to check the version and determine whether the
ECS instance supports resizing disks online based on the command output:
[System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Windows\System32\drivers\viostor.sys")
- Connect to the Windows instance.
- Method 2: Manually check the version of the driver
- Connect to the Windows instance.
For more information, see Connect to a Windows instance by using a username and password.
- Go to the C:\Windows\System32\drivers system directory.
- Right-click the viostor.sys file, select Properties, and then view the file version on the Details tab.
- Connect to the Windows instance.
Scenario | Version of the virtio driver | Operation |
---|---|---|
Resize a disk online | 58011 or later | Resize the disk online. For more information, see Resize disks online for Windows instances. |
Earlier than 58011 |
|
|
Query the serial number of a disk | 58017 or later | Query the serial number of the disk. For more information, see Query the serial number of a disk. |
Earlier than 58017 | You cannot query the serial number of the disk. You need to update the virtio driver. For more information, see Step 2: Update the virtio driver. |
Step 2: Update the virtio driver
If your Windows instance can access the Internet, we recommend that you perform the operations described in this section to update the virtio driver of your instance in a quick manner. If the instance cannot access the Internet or if you want to batch update the virtio drivers, perform the operations described in Manually update virtio drivers of Windows instances.
Before you update virtio drivers on your Windows instances, we recommend that you create snapshots to back up instance data. For more information, see Create a snapshot of a disk.
What to do next
- For information about how to resize a disk online, see Resize a disk online.
- For information about how to query the serial number of a disk, see Query the serial number of a disk.
- For more information about how to manually update the Red Hat virtio drivers on Windows instances, see Manually update virtio drivers of Windows instances.