When you need to create a custom image that includes the latest software configurations, you can use CloudOps Orchestration Service (OOS) to automate the creation of an updated image version. This enables you to rapidly deploy future ECS instances.
Background
CloudOps Orchestration Service provides the ACS-ECS-UpdateImage public template, which you can use to update a custom image in a single step. You only need to specify a source image, an instance type, and a Cloud Assistant script to automate the image update process.
During the custom image update process, Alibaba Cloud automatically creates a temporary instance. Temporary resources are billed on a pay-as-you-go basis. Before you update a custom image, ensure your account balance is sufficient to cover potential charges for temporary resources.
OOS uses the ACS-ECS-UpdateImage public template to execute the following core tasks:
-
Validation: Checks if the new image name already exists and meets naming conventions.
-
Resource preparation: Creates a temporary ECS instance from the source image with specified configurations (such as security groups and instance types), and installs the Cloud Assistant Agent (if missing).
-
Environment update: Calls the Cloud Assistant API to run a custom script, which can be a Shell, Bat, or PowerShell script, to update the system and application environment. For more information, see Cloud Assistant overview.
-
Image creation: Stops the temporary instance and creates a new custom image from it.
-
Resource cleanup: Releases the temporary ECS instance to avoid unnecessary charges.
Procedure
Go to ECS console - Images.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
On the Images page, click the Custom Images tab.
-
Find the target image. In the Actions column, choose
> Update Image. -
You are redirected to the OOS console to complete the following configurations.
-
Configure the general settings.
Parameter
Description
Example
New Image Name
The name of the new custom image. This name must be unique.
image-20230713133609
Permissions
-
(Default) Use Existing Permissions of Current Account: The task runs with the permissions of your current account. Ensure your account has the necessary permissions to make all ECS API calls to create a custom image.
-
Specify RAM Role and Use Permissions Granted to This Role: If you specify a RAM role, OOS assumes this role to perform the task.
Use Existing Permissions of Current Account
-
-
Select an image.
By default, the target image is prefilled. Ensure the selected image is the one you want to update.
-
Configure the temporary instance.
Set parameters for the temporary ECS instance, such as the VPC, vSwitch, security group, and instance type.
Parameter
Description
Example
VPC
The Virtual Private Cloud (VPC) for the temporary ECS instance.
vpc-bp1pfyqnwdnvj7b******
vSwitch
The vSwitch for the temporary ECS instance. The specified vSwitch must be in the same VPC as the security group.
vsw-bp1s5fnvk4gn2tw******
Security Group
The security group for the temporary ECS instance.
sg-bp1azkttqpldxg******
Instance Type
The instance type for the temporary ECS instance. For more information, see Instance families.
ecs.g6.xlarge
System Disk Category
The system disk type for the temporary ECS instance.
cloud_essd
Public Bandwidth
The public bandwidth for the temporary ECS instance.
0
-
(Optional) Send a remote command.
You can select a command type and enter your script content. The script runs on the temporary ECS instance.
-
(Optional) Configure image distribution.
You can copy the image to other regions or share the image with other Alibaba Cloud accounts by specifying their account IDs.
-
(Optional) Configure scaling group settings as needed.
-
(Optional) Configure execution settings.
You can set a description, add tags, specify a resource group, or save the current configuration as a new template.
-
-
Click Create. In the dialog box that appears, confirm the parameters and then click OK.
A status of Running indicates that the image update is in progress. The update is complete when the status changes to Successful.
NoteTo learn more about the update process, in the Actions column, click Details. Then, click the Logs tab to track the task's real-time progress and status.
-
(Optional) View information about the new image.
-
On the task details page, find the new image ID in the output parameters.

-
In the ECS console's Custom Images list, find the newly generated image by its ID.
-