You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
O&M
Batch installing Virtio 1.1 driver
Copy page
Download PDF
Batch installing Virtio 1.1 driver
This topic describes how to use the cloud assistant feature to batch install Virtio 1.1 drivers on Linux ECS instances.​
Prerequisites​
Cloud assistant Agent is installed on the instance. For operation details, refer to Installing cloud assistant Agent.​
Applicable scenario​
For instances of certain types (refer to Installing Virtio driver for type details), you need to install the Virtio 1.1 driver first to run them normally. To batch install drivers on multiple instances, you can use the cloud assistant feature.​
Procedure​
  1. Log in to the cloud assistant console. ​
  1. In the top menu bar, select the region where your business is located.​
  1. Click the "Create a job" button to enter the Create a job page.​
  1. Enter the following job information as instructed.​
This practice only describes necessary parameters. Keep other parameters with default values. For parameter details, refer to Creating jobs.​
  • ​
    Parameter​​
    Description​
    Sample value​
    Job name​
    Set the job name.​
    Install the Virtio driver.​
    Command type​
    Select "Manual input".​
    -​
    Command contents​
    Select "Shell", and copy the command for installing Virtio 1.1 driver into the content box.​
    tip​
    Replace the driver installation command in the red box based on the actual image and its kernel version of the instance. For installation command details, see Installing Virtio 1.1 driver.​
    -​
    Object​
    Select the instances on which you want to install the Virtio 1.1 driver. You can select multiple instances at a time.​
    warning​
    For the target instance, both the operating system and kernel version used are required to meet the requirements of the driver installation command.​
    -​
    ​
  1. Click the "Confirm" button to complete the job creation.​
  1. After the job is created, the system automatically redirects you to the Job management page. The new job is then executed immediately.​
View job execution results​
  1. Log in to the cloud assistant console. ​
  1. In the top menu bar, select the region where your business is located.​
  1. Find the target job in the job list or search by "Job name".​
  1. Click the target job name or the number in the "Execution result" column to open the job details page.​
  1. Select the "Execute object" tab to view the command execution results on each instance.​
  1. When the job status is Execution successful, it indicates that the script has been successfully executed on all instances. You can also click the "Run log" button in the "Action" column on the right side of the target instance to view the command output during execution on this instance.​
  • If the following output is displayed, the Virtio 1.1 driver is installed.​
  • ​
Installation command​
In this practice, a CentOS 7.9 64-bit image (kernel version: 3.10.0-1160.102.1.el7.x86_64) is used as an example. For more operating system and kernel version installation commands, see Installing Virtio 1.1 driver.​
​
#!/bin/bash​
​
wget -O virtio_tool https://virtio11-drivers.tos-cn-beijing.volces.com/virtio_tool_1.1.2​
chmod +x ./virtio_tool​
output=$(./virtio_tool -check)​
​
if grep -q "Support virtio 1.1" <<< "$output"; then​
echo "No need to install Virtio1.1 driver"​
​
elif grep -q "Not support virtio 1.1" <<< "$output"; then​
echo "Attempting to install Virtio1.1 driver"​
​
#Replace the installation command accordingly based on operating system and kernel version​
yum -y install rpm-build redhat-lsb-core​
yum -y install epel-release​
​
sed -e 's!^metalink=!#metalink=!g' \​
-e 's!^#baseurl=!baseurl=!g' \​
-e 's!//download\.fedoraproject\.org/pub!//mirrors.volces.com!g' \​
-i /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo​
​
yum -y install --enablerepo=epel dkms​
​
./virtio_tool -install​
​
else​
echo "Script execution failed"​
fi​
​
​
Last updated: 2026.06.18 17:49:51