The Cloud Assistant Agent is used to run Cloud Assistant commands on Elastic Compute Service (ECS) instances. This topic describes how to install the Cloud Assistant Agent on an ECS instance.

Prerequisites

The instance type and operating system of the instance on which you want to install the Cloud Assistant Agent support Cloud Assistant. For information about the operating system versions that support Cloud Assistant, see the "Limits" section of Limits.

Background information

By default, the Cloud Assistant Agent is pre-installed on ECS instances that are created from public images after December 1, 2017. For ECS instances that were created before December 1, 2017, you must manually install the Cloud Assistant Agent.

Install an appropriate version of the 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 Cloud Assistant version for each feature.
Feature supported by Cloud AssistantEarliest supported Cloud Assistant version for Linux instancesEarliest supported Cloud Assistant version for Windows instancesReferences
Reporting Cloud Assistant heartbeats1.0.2.4581.0.0.149None
Sending files1.0.2.5691.0.0.149Upload files to ECS instances
Specifying a username to use to run a command2.2.0.1062.1.0.50
Configuring a command to run on next instance startup2.2.0.462.1.0.50
Configuring a command to run on every instance startup
Session Manager2.2.3.1962.1.3.196Connect to an instance by using Session Manager
Using a rate expression or an at expression in the execution plan of a scheduled task2.2.3.2822.1.3.282
Specifying a cron expression that includes a <Year> field or a <Time zone> field in the execution plan of a scheduled task2.2.3.2822.1.3.282
Specifying built-in environment parameters2.2.3.3092.1.3.309
Using instance names as built-in environment parameters2.2.3.3442.1.3.344
Using specific exit codes to stop or restart instances2.2.3.3172.1.3.317Use a specified exit code to stop or restart instances
Specifying the name of a container in which to run a command2.2.3.3442.1.3.344Use Cloud Assistant to run commands in containers
Specifying the ID of a container in which to run a command2.2.3.3442.1.3.344

The following table describes the methods that you can use to install the Cloud Assistant Agent on different operating systems.

Operating systemInstallation method
Windows
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
Other Linux operating systems

Install the Cloud Assistant Agent on a Windows instance

  1. Connect to a Windows instance as an administrator.
    For more information, see Connection methods.
  2. Download the Cloud Assistant Agent installation file.
    You can download the installation file for a specific version of the Cloud Assistant Agent from one of the following URLs:
    • Public URL for the latest version: Latest version of the Cloud Assistant Agent
    • Public URL for a specific version:
      https://aliyun-client-assist.oss-accelerate.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
    • Internal URL for the latest version:
      https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_latest_setup.exe
    • Internal URL for a specific version:
      https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
    Note
    • {version} specifies the version number of the Cloud Assistant Agent.
    • {regionId} specifies the region ID of the instance.

      You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.

    • You can specify the following version numbers of the Cloud Assistant Agent to download installation files 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, you can download the installation file for version 1.0.0.128 of the Cloud Assistant Agent from the following internal URL in the China (Hangzhou) region:
    https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/windows/aliyun_agent_1.0.0.128_setup.exe
  3. Double-click the installation file and install the client as instructed.
    The default installation directory is C:\ProgramData\aliyun\assist\ for Windows instances.
  4. If the instance resides in the classic network, perform the following steps:
    1. In the directory where the Cloud Assistant client is installed, create a file named region-id. Do not add an extension such as .txt or .conf to the file name.
      Important In Windows, you must clear "Hide extensions for known file types" before you can check whether the region-id file has an extension.
    2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
      Note You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.
    For example, if the instance runs Windows Server 2012 R2, the region-id file is created in the C:\ProgramData\aliyun\assist\ directory and the region ID cn-hangzhou is added to the file, as shown in the following figure.Create a file in Windows

Install the Cloud Assistant Agent on a Linux instance by using an RPM package

This installation method is applicable to Linux operating systems such as Alibaba Cloud Linux, CentOS, RHEL, and SUSE Linux.

  1. Connect to a Linux instance as a user with sudo permissions.
    For more information, see Connection methods.
  2. Download the RPM package for a specific version of the Cloud Assistant Agent from one of the following URLs:
    • Public URLs for the latest versions of the Cloud Assistant Agent:
      • Public URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm"
      • Public URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
    • Public URLs for specific versions of the Cloud Assistant Agent:
      • Public URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
      • Public URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
    • Internal URLs for the latest versions of the Cloud Assistant Agent:
      • Internal URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.rpm"
      • Internal URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
    • Internal URLs for specific versions of the Cloud Assistant Agent:
      • Internal URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
      • Internal URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
    Note
    • {version} specifies the version number of the Cloud Assistant Agent.
    • {regionId} specifies the region ID of the instance.

      You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.

    • You can specify the following version numbers of the Cloud Assistant Agent to download installation files from public or internal URLs:
      • Version numbers that can be specified in public URLs:
        • x86 version numbers: 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 version numbers: 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 version numbers: 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 version numbers: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
    For example, you can download the RPM package for x86 version 1.0.2.458 of the Cloud Assistant Agent from the following internal URL in the China (Hangzhou) region:
    sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.rpm"
  3. Install the Cloud Assistant Agent.
    You can install the Cloud Assistant Agent in the default directory on the Linux instance. The default installation directories of the client vary based on Linux operating systems.
    • For CoreOS, the default installation directory is /opt/local/share/aliyun-assist/.
    • For other Linux operating systems, the default installation directory is/usr/local/share/aliyun-assist/. The other Linux operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.
    In this example, the latest version of the Cloud Assistant Agent is installed.
    • To install the latest x86 version of the Cloud Assistant Agent, run the following command:
      sudo rpm -ivh --force aliyun_assist_latest.rpm
    • To install the latest ARM version of the Cloud Assistant Agent, run the following command:
      sudo rpm -ivh --force aliyun-assist-latest-1.aarch64.rpm
  4. 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 steps:
      1. Stop the qemu-ga service.
        sudo systemctl stop qemu-guest-agent
        sudo systemctl disable qemu-guest-agent
      2. Restart Cloud Assistant.
        sudo systemctl restart aliyun.service
    • If the instance resides in the classic network, perform the following operations:
      In the directory where the Cloud Assistant Agent is installed, create a file named region-id and add the region ID of the instance to the region-id file. For example, to create a file named region-id in the default installation directory of the Cloud Assistant Agent and add the region ID cn-hangzhou to the file, run one of the following commands based on the operating system of the instance.
      • CoreOS:
        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 instance runs one of the other Linux operating systems, a command output similar to the output shown in the following figure is displayed.Create a file

Install the Cloud Assistant Agent on a Linux instance by using a Debian package

This installation method is applicable to Linux operating systems such as Debian and Ubuntu.

  1. Connect to a Linux instance as a user with sudo permissions.
    For more information, see Connection methods.
  2. Download the Debian package for a specific version of the Cloud Assistant Agent from one of the following URLs:
    • Public URLs for the latest versions of the Cloud Assistant Agent:
      • Public URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.deb"
      • Public URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
    • Public URLs for specific versions of the Cloud Assistant Agent:
      • Public URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.deb"
      • Public URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
    • Internal URLs for the latest versions of the Cloud Assistant Agent:
      • Internal URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.deb"
      • Internal URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
    • Internal URLs for specific versions of the Cloud Assistant Agent:
      • Internal URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.deb"
      • Internal URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
    Note
    • {version} specifies the version number of the Cloud Assistant Agent.
    • {regionId} specifies the region ID of the instance.

      You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.

    • You can specify the following version numbers of the Cloud Assistant Agent to download installation files from public or internal URLs:
      • Version numbers that can be specified in public URLs:
        • x86 version numbers: 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 version numbers: 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 version numbers: 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 version numbers: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
    For example, you can download the Debian package for x86 version 1.0.2.458 of the Cloud Assistant Agent from the following internal URL in the China (Hangzhou) region:
    sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.deb"
  3. If an earlier version of the Cloud Assistant Agent is installed on the instance, uninstall the earlier version.
    sudo dpkg -r aliyun-assist
  4. Install the Cloud Assistant Agent.
    You can install the Cloud Assistant Agent in the default directory on the Linux instance. The default installation directories of the client vary based on Linux operating systems.
    • For CoreOS, the default installation directory is /opt/local/share/aliyun-assist/.
    • For other Linux operating systems, the default installation directory is/usr/local/share/aliyun-assist/. The other Linux operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.
    In this example, the latest version of the Cloud Assistant Agent is installed.
    • To install the latest x86 version of the Cloud Assistant Agent, run the following command:
      sudo dpkg -i aliyun_assist_latest.deb
    • To install the latest ARM version of the Cloud Assistant Agent, run the following command:
      sudo dpkg -i aliyun-assist_latest-1_arm64.deb
  5. If the instance resides in the classic network, perform the following operations:
    In the directory where the Cloud Assistant client is installed, create a file named region-id and add the region ID of the instance to the region-id file. For example, to create a file named region-id in the default installation directory of the Cloud Assistant client and add the region ID cn-hangzhou to the file, run one of the following commands based on the operating system of the instance.
    • CoreOS:
      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 instance runs one of the other Linux operating systems, a command output similar to the output shown in the following figure is displayed.Create a file

Install the Cloud Assistant Agent on a Linux instance by using a binary package

This installation method is applicable to mainstream Linux operating systems.

  1. Connect to a Linux instance as a user with sudo permissions.
    For more information, see Connection methods.
  2. Download the binary package for a specific version of the Cloud Assistant Agent from one of the following URLs:
    • Public URLs for the latest versions of the Cloud Assistant Agent:
      • Public URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
      • Public URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
    • Public URLs for specific versions of the Cloud Assistant Agent:
      • Public URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
      • Public URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
    • Internal URLs for the latest versions of the Cloud Assistant Agent:
      • Internal URL for the latest x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
      • Internal URL for the latest ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
    • Internal URLs for specific versions of the Cloud Assistant Agent:
      • Internal URL for a specific x86 version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
      • Internal URL for a specific ARM version:
        sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
    Note
    • {version} specifies the version number of the Cloud Assistant Agent.
    • {regionId} specifies the region ID of the instance.

      You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.

    • You can specify the following version numbers of the Cloud Assistant Agent to download installation files from public or internal URLs:
      • x86 version numbers: 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 version numbers: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
    For example, you can download the binary package for x86 version 2.2.3.282 of the Cloud Assistant Agent from the following internal URL in the China (Hangzhou) region:
    sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_2.2.3.282_update.zip"
  3. Install the Cloud Assistant Agent.
    You can install the Cloud Assistant Agent in the default directory on the Linux instance. The default installation directories of the client vary based on Linux operating systems.
    • For CoreOS, the default installation directory is /opt/local/share/aliyun-assist/.
    • For other Linux operating systems, the default installation directory is/usr/local/share/aliyun-assist/. Other Linux operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.

    Decompress the binary package to the installation directory and install the client. For example, to decompress the binary package for x86 version 2.2.3.282 of the Cloud Assistant Agent and install the client, 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
  4. 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 steps:
      1. Stop the qemu-ga service.
        sudo systemctl stop qemu-guest-agent
        sudo systemctl disable qemu-guest-agent
      2. Restart Cloud Assistant.
        sudo systemctl restart aliyun.service
    • If the instance resides in the classic network, perform the following operations:
      In the directory where the Cloud Assistant Agent is installed, create a file named region-id and add the region ID of the instance to the region-id file. For example, to create a file named region-id in the default installation directory of the Cloud Assistant Agent and add the region ID cn-hangzhou to the file, run one of the following commands based on the operating system of the instance.
      • CoreOS:
        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 instance runs one of the other Linux operating systems, a command output similar to the output shown in the following figure is displayed.Create a file

Install the Cloud Assistant Agent on Linux instances by using the source code

  1. Connect to a Linux instance as a user with sudo permissions.
    For more information, see Connection methods.
  2. Install necessary software such as Git and Go.
    In this example, YUM is used. If you use 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
  3. Download the source code of the Cloud Assistant Agent.
    sudo git clone https://github.com/aliyun/aliyun_assist_client
  4. Access the directory where the source code is stored.
    cd ./aliyun_assist_client
  5. Compile the source code.
    sudo go build
    If no error message is returned, the client is installed.
  6. If the instance resides in the classic network, perform the following operations:
    In the directory where the Cloud Assistant client is installed, create a file named region-id and add the region ID of the instance to the region-id file. For example, to create a file named region-id in the default installation directory of the Cloud Assistant client and add the region ID cn-hangzhou to the file, run one of the following commands based on the operating system of the instance.
    • CoreOS:
      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 instance runs one of the other Linux operating systems, a command output similar to the output shown in the following figure is displayed.Create a file
  7. Run the Cloud Assistant Agent.
    aliyun-service -d

Install the Cloud Assistant Agent on a Windows or Linux instance by using Alibaba Cloud CLI

To use this method, you do not need to connect to the instance, but you must install Alibaba Cloud CLI. For information about how to install Alibaba Cloud CLI on different operating systems, see the following topics:
Note You cannot use Alibaba Cloud CLI to install the Cloud Assistant Agent on RHEL.
  1. Call the DescribeCloudAssistantStatus operation to check whether the Cloud Assistant Agent is installed on the 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, the Cloud Assistant Agent is installed on the instance. If the value of CloudAssistantStatus is not true in the response, proceed to the next step.
  2. Call the InstallCloudAssistant operation to install the Cloud Assistant Agent.
    aliyun ecs InstallCloudAssistant --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p
  3. Call the RebootInstance operation to restart the instance.
    aliyun ecs RebootInstance --InstanceId i-bp1g6zv0ce8og******p
  4. If the instance resides in the classic network, add a region declaration in the instance.
    1. Connect to the instance as the root or system user.
      For more information, see Connection methods.
    2. Check the version of Cloud Assistant.

      If the version number of the Cloud Assistant Agent is later than 1.0.1.400, the Cloud Assistant Agent is installed. If the version number of the Cloud Assistant Agent is 1.0.1.400 or earlier, proceed to the next step.

    3. Create a file named region-id and add the region ID of the instance to the file.
      • Linux:
        In the directory where the Cloud Assistant Agent is installed, create a file named region-id and add the region ID of the instance to the region-id file. For example, to create a file named region-id in the default installation directory of the Cloud Assistant Agent and add the region ID cn-hangzhou to the file, run one of the following commands based on the operating system of the instance.
        • CoreOS:
          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 instance runs one of the other Linux operating systems, a command output similar to the output shown in the following figure is displayed.Create a file
      • Windows:
        1. In the directory where the Cloud Assistant client is installed, create a file named region-id. Do not add an extension such as .txt or .conf to the file name.
          Important In Windows, you must clear "Hide extensions for known file types" before you can check whether the region-id file has an extension.
        2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
          Note You can go to the Instance Details page of the instance in the ECS console, view the region of the instance in the Basic Information section, and then find the corresponding region ID in Regions and zones.
        For example, if the instance runs Windows Server 2012 R2, the region-id file is created in the C:\ProgramData\aliyun\assist\ directory and the region ID cn-hangzhou is added to the file, as shown in the following figure.Create a file in Windows

View information about the Cloud Assistant Agent on the instance

After you install the Cloud Assistant Agent on an instance, you can perform the following steps to query the version number and status of the client on the instance.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Maintenance & Monitoring > ECS Cloud Assistant.
  3. In the top navigation bar, select a region.
  4. Click the ECS Instances tab to view information about the Cloud Assistant Agent on the ECS instances within the current region.
    Execution results