Cloud Assistant Agent is used to run Cloud Assistant commands on Elastic Compute Service (ECS) instances. This topic describes how to install Cloud Assistant Agent on instances.
Prerequisites
Before you install Cloud Assistant Agent, make sure that your instance type and operating system support Cloud Assistant. For more information, see Overview.
Background information
By default, Cloud Assistant Agent is pre-installed on ECS instances that were created from public images after December 1, 2017. For ECS instances created before December 1, 2017, you must manually install Cloud Assistant Agent.
Install a version of Cloud Assistant Agent based on the features supported by Cloud Assistant. The following table describes the features that are supported by Cloud Assistant and the earliest supported version of Cloud Assistant Agent for each feature.
Feature supported by Cloud Assistant | Earliest supported version of Cloud Assistant Agent for Linux instances | Earliest supported version of Cloud Assistant Agent for Windows instances | References |
Reporting Cloud Assistant heartbeats | 1.0.2.458 | 1.0.0.149 | None |
Sending files | 1.0.2.569 | 1.0.0.149 | |
Specifying a username to use to run a command | 2.2.0.106 | 2.1.0.50 | |
Configuring a command to run on next instance startup | 2.2.0.46 | 2.1.0.50 | |
Configuring a command to run on every instance startup | |||
Session Manager | 2.2.3.196 | 2.1.3.196 | |
Using a rate expression or an at expression in the execution plan of a scheduled task | 2.2.3.282 | 2.1.3.282 | |
Specifying a cron expression that includes a <Year> field or a <Time zone> field in the execution plan of a scheduled task | 2.2.3.282 | 2.1.3.282 | |
Specifying built-in environment parameters | 2.2.3.309 | 2.1.3.309 | |
Using instance names as built-in environment parameters | 2.2.3.344 | 2.1.3.344 | |
Using specific exit codes to stop or restart instances | 2.2.3.317 | 2.1.3.317 | |
Specifying the name of a container in which to run a command | 2.2.3.344 | 2.1.3.344 | |
Specifying the ID of a container in which to run a command | 2.2.3.344 | 2.1.3.344 |
The following table describes the methods that you can use to install Cloud Assistant Agent on different operating systems.
Operating system | Installation method |
Windows operating systems | |
Linux operating systems such as Alibaba Cloud Linux, CentOS, Red Hat Enterprise Linux (RHEL), and SUSE Linux |
|
Linux operating systems such as Debian and Ubuntu |
Note You cannot use Alibaba Cloud CLI to install Cloud Assistant Agent on RHEL. |
Other Linux operating systems |
|
Install Cloud Assistant Agent on a Windows instance
Connect to the instance as an administrator account.
For more information, see Connection methods.
Download Cloud Assistant Agent.
You can download a specific version of Cloud Assistant Agent from one of the following URLs:
Public URL for the latest version of Cloud Assistant Agent:
Public URL for a specific version of Cloud Assistant Agent:
https://aliyun-client-assist.oss-accelerate.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
Internal URL for the latest version of Cloud Assistant Agent:
https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_latest_setup.exe
Internal URL for a specific version of Cloud Assistant Agent:
https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
Note{version} indicates the version number of Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs: 1.0.0.128, 2.1.2.181, 2.1.3.187, 2.1.3.221, 2.1.3.247, 2.1.3.256, 2.1.3.269, 2.1.3.282, 2.1.3.289, 2.1.3.326, 2.1.3.349, 2.1.3.372, and 2.1.3.398
Version numbers that can be specified in internal URLs: 1.0.0.128, 2.1.3.221, 2.1.3.247, 2.1.3.256, 2.1.3.265, 2.1.3.269, 2.1.3.282, 2.1.3.289, 2.1.3.326, 2.1.3.349, 2.1.3.372, and 2.1.3.398
For example, to download the version 1.0.0.128 of Cloud Assistant Agent in the China (Hangzhou) region, access the following internal URL:
https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/windows/aliyun_agent_1.0.0.128_setup.exe
Double-click the installation file of Cloud Assistant Agent. Then, install Cloud Assistant Agent as instructed.
For Windows instances, the default installation directory of Cloud Assistant Agent is C:\ProgramData\aliyun\assist\.
If the instance is in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id. Do not add an extension such as .txt or .conf to the file name.
ImportantIn Windows, you must clear the Hide extensions for known file types checkbox before you can check whether the region-id file has an extension.
In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
NoteTo query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
For exmaple, the instance runs a Windows Server 2012 R2 operating system and resides in the China (Hangzhou) region whose ID is cn-hangzhou. The default installation directory of Cloud Assistant Agent on the instance is C:\ProgramData\aliyun\assist\. You must create the region-id file in the directory and enter cn-hangzhou in the file, as shown in the following figure.
Install Cloud Assistant Agent on a Linux instance
Use RPM packages
This installation method is applicable to Linux operating systems such as Alibaba Cloud Linux, CentOS, RHEL, and SUSE Linux.
Connect to a Linux instance as an account with sudo permissions.
For more information, see Connection methods.
Download the RPM package for Cloud Assistant Agent.
Architecture for Cloud Assistant Agent
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.rpm"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
Note{version} indicates the version number of Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs:
x86 architecture: 1.0.1.413, 1.0.1.414, 1.0.1.448, 1.0.1.450, 1.0.2.458, 1.0.2.479, 1.0.2.541, 1.0.2.569, 1.0.2.574, 2.2.0.102, 2.2.0.106, 2.2.2.181, 2.2.3.187, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
Version numbers that can be specified in internal URLs:
x86 architecture: 1.0.1.407, 1.0.2.458, 1.0.2.479, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.265, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the RAM package for the version 1.0.2.458 of Cloud Assistant Agent on an instance that uses an x86 operating system from an internal URL in the China (Hangzhou) region, run the following command:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.rpm"
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems (such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE): /usr/local/share/aliyun-assist/
To install the latest version of Cloud Assistant Agent on an instance, run one of the following commands based on the operating system architecture of the instance:
x86
sudo rpm -ivh --force aliyun_assist_latest.rpm
ARM
sudo rpm -ivh --force aliyun-assist-latest-1.aarch64.rpm
Perform operations based on the operating system or network type of the instance.
If the instance runs a Red Hat operating system, perform the following operations:
Stop the qemu-ga service.
sudo systemctl stop qemu-guest-agent sudo systemctl disable qemu-guest-agent
Restart Cloud Assistant.
sudo systemctl restart aliyun.service
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, a command output similar to the following one is returned.
Use DEB packages
This installation method is applicable to Linux operating systems such as Debian and Ubuntu.
Connect to a Linux instance as an account with sudo permissions.
For more information, see Connection methods.
Download the DEB package for Cloud Assistant Agent.
Architecture for Cloud Assistant Agent
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.deb"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.deb"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.deb"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.deb"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
Note{version} indicates the version number of Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs:
x86 architecture: 1.0.1.413, 1.0.1.414, 1.0.1.448, 1.0.1.450, 1.0.2.458, 1.0.2.479, 1.0.2.541, 1.0.2.569, 1.0.2.574, 2.2.0.102, 2.2.0.106, 2.2.2.181, 2.2.3.187, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
Version numbers that can be specified in internal URLs:
x86 architecture: 1.0.1.407, 1.0.2.458, 1.0.2.479, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.265, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the DEB package for the version 1.0.2.458 of Cloud Assistant Agent on an instance that uses an x86 operating system from an internal URL in the China (Hangzhou) region, run the following command:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.deb"
If an earlier version of Cloud Assistant Agent is installed on the instance, uninstall the earlier version.
sudo dpkg -r aliyun-assist
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems (such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE): /usr/local/share/aliyun-assist/
To install the latest version of Cloud Assistant Agent on an instance, run one of the following commands based on the operating system architecture of the instance:
x86
sudo dpkg -i aliyun_assist_latest.deb
ARM
sudo dpkg -i aliyun-assist_latest-1_arm64.deb
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, a command output similar to the following one is returned.
Use binary packages
This installation method is applicable to mainstream Linux operating systems.
Connect to a Linux instance as an account with sudo permissions.
For more information, see Connection methods.
Download the binary package for Cloud Assistant Agent.
Architecture for Cloud Assistant Agent
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
Note{version} indicates the version number of Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
x86 architecture: 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the binary package for the version 2.2.3.282 of Cloud Assistant Agent on an instance that uses an x86 operating system from an internal URL in the China (Hangzhou) region, run the following command:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_2.2.3.282_update.zip"
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems (such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE): /usr/local/share/aliyun-assist/
Decompress the binary package to the installation directory and install Cloud Assistant Agent. For example, to install the version 2.2.3.282 of Cloud Assistant Agent on an instance that uses an x86 operating system, run the following commands:
sudo unzip -o aliyun_assist_2.2.3.282_update.zip -d /usr/local/share/aliyun-assist/ sudo chmod a+x /usr/local/share/aliyun-assist/2.2.3.282/update_install sudo bash /usr/local/share/aliyun-assist/2.2.3.282/update_install
Perform operations based on the operating system or network type of the instance.
If the instance runs a Red Hat operating system, perform the following operations:
Stop the qemu-ga service.
sudo systemctl stop qemu-guest-agent sudo systemctl disable qemu-guest-agent
Restart Cloud Assistant.
sudo systemctl restart aliyun.service
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, a command output similar to the following one is returned.
Use source code
Connect to a Linux instance as an account with sudo permissions.
For more information, see Connection methods.
Install necessary software such as Git and Go.
In this example, YUM is used. If you install software on other Linux operating systems, use the corresponding package manager.
To install Git, run the following command:
sudo yum install git -y
To install Go, run the following command:
sudo yum install go -y
Download the source code for Cloud Assistant Agent.
sudo git clone https://github.com/aliyun/aliyun_assist_client
Access the directory where the source code is stored.
cd ./aliyun_assist_client
Compile the source code.
sudo go build
If no error message is returned, Cloud Assistant Agent is installed.
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, a command output similar to the following one is returned.
Run Cloud Assistant Agent.
aliyun-service -d
Install Cloud Assistant Agent on Windows or Linux instances by using Alibaba Cloud CLI
To use this method, you do not need to connect to an instance but you must install Alibaba Cloud CLI on the instance. For more information about how to install Alibaba Cloud CLI in different operating systems, see the following topics:
You cannot use Alibaba Cloud CLI to install Cloud Assistant Agent on RHEL.
Call the DescribeCloudAssistantStatus operation to query whether Cloud Assistant Agent is installed on your instance.
aliyun ecs DescribeCloudAssistantStatus --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p --output cols=CloudAssistantStatus rows=InstanceCloudAssistantStatusSet.InstanceCloudAssistantStatus[]
If the value of
CloudAssistantStatus
is true in the response, Cloud Assistant Agent is installed on the instance. If the value of CloudAssistantStatus is not true in the response, proceed to the next step.Call the InstallCloudAssistant operation to install Cloud Assistant Agent.
aliyun ecs InstallCloudAssistant --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p
Call the RebootInstance operation to restart the instance.
aliyun ecs RebootInstance --InstanceId i-bp1g6zv0ce8og******p
If the instance is in the classic network, add a region declaration within the instance.
Connect to the ECS instance as the root or administrator account.
For more information, see Connection methods.
View the version of Cloud Assistant Agent.
For Linux instances, run the following command:
aliyun-service -v
For Windows instances, perform the operations that are described in Upgrade or disable upgrades for Cloud Assistant Agent.
If the version of Cloud Assistant Agent is later than 1.0.1.400, Cloud Assistant Agent is installed on the instance. If the version of Cloud Assistant Agent is 1.0.1.400 or earlier, proceed to the next step.
Create the region-id file and enter the region ID of the instance in the file.
Linux instances:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, a command output similar to the following one is returned.
Windows instances:
In the directory where Cloud Assistant Agent is installed, create a file named region-id. Do not add an extension such as .txt or .conf to the file name.
ImportantIn Windows, you must clear the Hide extensions for known file types checkbox before you can check whether the region-id file has an extension.
In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
NoteTo query the region in which an instance resides, click the ID of the instance on the Instances page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
For exmaple, the instance runs a Windows Server 2012 R2 operating system and resides in the China (Hangzhou) region whose ID is cn-hangzhou. The default installation directory of Cloud Assistant Agent on the instance is C:\ProgramData\aliyun\assist\. You must create the region-id file in the directory and enter cn-hangzhou in the file, as shown in the following figure.
View the information of Cloud Assistant Agent on an instance
After you install Cloud Assistant Agent on an instance, you can perform the following steps to query the version number and state of Cloud Assistant Agent.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
Click the ECS Instances tab to view the information of Cloud Assistant Agent on the ECS instances within the current region.