The features available in Cloud Assistant are dependent on the agent version. If the current version does not support a feature that you need, you can upgrade the Cloud Assistant Agent. This topic describes how to upgrade the Cloud Assistant Agent and disable its automatic upgrades.
Limits
The ECS instance on which you want to upgrade the Cloud Assistant Agent must be in the Running state.
The Cloud Assistant Agent must be installed. For more information, see Install the Cloud Assistant Agent.
Automatic upgrades
By default, the Cloud Assistant Agent runs the aliyun_assist_update upgrade program every 30 minutes. The program is located at one of the following paths:
Windows instances: C:\ProgramData\aliyun\assist\{VERSION}\aliyun_assist_update.exe
Linux instances:
/usr/local/share/aliyun-assist/{VERSION}/aliyun_assist_update
{VERSION} represents the version number of the Cloud Assistant Agent. For more information about how to view the version number, see Install the Cloud Assistant Agent.
You can configure an automatic upgrade policy for the Cloud Assistant Agent to control the upgrade time windows. This helps prevent service disruptions during peak business hours.
In the upper-right corner of the Cloud Assistant page, click Settings.

In the Cloud Assistant Settings dialog box, click the Cloud Assistant Agent Upgrade Settings tab.
Select the Cloud Assistant Agent Upgrade Settings check box, set Period Allowed for Upgrade and Time Zone, and then click OK.
NoteYou can specify up to five time periods. The interval between any two time periods must be at least 1 hour.

Disable automatic upgrades
To disable automatic upgrades for a specific version of the Cloud Assistant Agent, you can create configuration files to disable automatic upgrades or rename the automatic upgrade program.
To disable automatic upgrades for all versions of the Cloud Assistant Agent, you must create configuration files to disable automatic upgrades.
Rename the automatic upgrade program
You can rename the aliyun_assist_update file to disable automatic upgrades for the Cloud Assistant Agent.
VERSION represents the version number of the Cloud Assistant Agent. For more information about how to view the version number, see Install the Cloud Assistant Agent.
Windows Server: In PowerShell, run the following command to rename the
aliyun_assist_updateautomatic upgrade program toaliyun_assist_update.bk.Rename-Item -Path 'C:\ProgramData\aliyun\assist\VERSION\aliyun_assist_update.exe' -NewName 'C:\ProgramData\aliyun\assist\VERSION\aliyun_assist_update.exe.bk'Linux: Run the following command to rename the
aliyun_assist_updateautomatic upgrade program toaliyun_assist_update.bk.mv /usr/local/share/aliyun-assist/VERSION/aliyun_assist_update /usr/local/share/aliyun-assist/VERSION/aliyun_assist_update.bk
To resume automatic upgrades, rename the file back to aliyun_assist_update.
Windows Server:
Rename-Item -Path 'C:\ProgramData\aliyun\assist\VERSION\aliyun_assist_update.exe.bk' -NewName 'C:\ProgramData\aliyun\assist\VERSION\aliyun_assist_update.exe'Linux:
mv /usr/local/share/aliyun-assist/VERSION/aliyun_assist_update.bk /usr/local/share/aliyun-assist/VERSION/aliyun_assist_update
Create configuration files to disable automatic upgrades
For Cloud Assistant Agent 2.2.1.140 or later on Linux and Cloud Assistant Agent 2.1.1.140 or later on Windows, you can create a configuration file in a specified path for the Cloud Assistant Agent to disable upgrades for the Cloud Assistant Agent:
Step 1: Disable the Cloud Assistant Agent from checking for upgrades on startup
Create the disable_bootstrap_update file in the `config` directory of the Cloud Assistant Agent installation directory to disable the startup upgrade check for the current version of the Cloud Assistant Agent. To disable the startup upgrade check for all versions of the Cloud Assistant Agent on the instance, create the file in the `config` directory that is shared across all versions. The disable_bootstrap_update file does not require any content.
Windows Server: In PowerShell, run the following command.
# For example, the following command disables the upgrade check on startup for a specific version of the Cloud Assistant Agent. New-Item -Path 'C:\ProgramData\aliyun\assist\VERSION\config\disable_bootstrap_update' # For example, the following command disables the upgrade check on startup for all versions of the Cloud Assistant Agent. New-Item -Path 'C:\ProgramData\aliyun\assist\config\disable_bootstrap_update'Linux: Run the following command.
# For example, the following command disables the upgrade check on startup for a specific version of the Cloud Assistant Agent. touch /usr/local/share/aliyun-assist/VERSION/config/disable_bootstrap_update # For example, the following command disables the upgrade check on startup for all versions of the Cloud Assistant Agent. touch /usr/local/share/aliyun-assist/config/disable_bootstrap_update
VERSION represents the version number of the Cloud Assistant Agent. For more information about how to view the version number, see Install the Cloud Assistant Agent.
Step 2: Disable the Cloud Assistant Agent's automatic update check
Create the disable_update file in the `config` directory of the Cloud Assistant Agent installation directory to disable automatic upgrades for that version of the Cloud Assistant Agent. To disable automatic upgrades for all versions of the Cloud Assistant Agent on the instance, create the file in the `config` directory that is shared across all versions. The disable_update file does not require any content.
Windows Server: In PowerShell, run the following command.
# For example, the following command disables automatic upgrades for a specific version of the Cloud Assistant Agent. New-Item -Path C:\ProgramData\aliyun\assist\VERSION\config\disable_update # For example, the following command disables automatic upgrades for all versions of the Cloud Assistant Agent. New-Item -Path C:\ProgramData\aliyun\assist\config\disable_updateLinux: Run the following command.
# For example, the following command disables automatic upgrades for a specific version of the Cloud Assistant Agent. touch /usr/local/share/aliyun-assist/VERSION/config/disable_update # For example, the following command disables automatic upgrades for all versions of the Cloud Assistant Agent. touch /usr/local/share/aliyun-assist/config/disable_update
VERSION represents the version number of the Cloud Assistant Agent. For more information about how to view the version number, see Install the Cloud Assistant Agent.
To resume automatic upgrades, delete the disable_update and disable_bootstrap_update configuration files.
Windows Server: In PowerShell, run the following command.
Remove-Item -Path C:\ProgramData\aliyun\assist\VERSION\config\disable_update Remove-Item -Path C:\ProgramData\aliyun\assist\config\disable_update Remove-Item -Path C:\ProgramData\aliyun\assist\VERSION\config\disable_bootstrap_update Remove-Item -Path C:\ProgramData\aliyun\assist\config\disable_bootstrap_updateLinux: Run the following command.
rm /usr/local/share/aliyun-assist/VERSION/config/disable_update rm /usr/local/share/aliyun-assist/config/disable_update rm /usr/local/share/aliyun-assist/VERSION/config/disable_bootstrap_update rm /usr/local/share/aliyun-assist/config/disable_bootstrap_update
Manual upgrade
For information about the features that Cloud Assistant supports and the minimum agent versions required, see Supported features and versions.
Upgrade using public commands
If automatic upgrades fail, you can run public commands to upgrade the agent.
The following steps use the console as an example. For more information about how to run public Cloud Assistant commands by calling OpenAPI or using the command-line interface (CLI), see View and run public commands.
On the Cloud Assistant page, click the Common Commands tab.
Find the latest version of one of the following public commands and click Run.
Linux instances:
ACS-ECS-UpdateAliyunAssist-linux.sh.Windows instances:
ACS-ECS-UpdateAliyunAssist-windows.ps1.
In the Run Command panel, configure the parameters as prompted and click Run.
Execution Plan: Select a time to run the command. For more information, see Execution plan details.
Select Instance: Select the instances on which to upgrade the Cloud Assistant Agent. The instances must be in the Running state and have the Cloud Assistant Agent installed.
For more information about the parameters, see View and run public commands.
If the execution result is similar to the one shown in the following figure, the Cloud Assistant Agent is successfully upgraded.

If the public command fails, view the error message and resolve the issue based on the diagnostic information. For more information, see Common errors and troubleshooting for failed executions.
Upgrade by manually downloading the installation package
You can also manually download the latest installation package to upgrade the agent. For more information about installation methods, see Install the Cloud Assistant Agent.
For example, on a Linux instance that uses the x86 architecture, you can run the following command to download and install the latest Cloud Assistant Agent installation package using an RPM Package Manager (RPM).
wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm" && sudo rpm -ivh --force aliyun_assist_latest.rpmHighest upgradeable Cloud Assistant Agent versions for specific kernel versions
Instance kernel version | Highest upgradeable Cloud Assistant Agent version |
Linux kernel version earlier than 2.6.32 |
|
FreeBSD 11 or earlier (kernel version earlier than 12.x) | 2.3.3.529 |