CloudOps Orchestration Service (OOS) provides a public template named ACS-ECS-CreateAndCopyImage to help you perform operations such as sending remote commands, creating custom images, and copying custom images. This topic describes how to use OOS to create a custom image.
You can view information, such as the default process of executing a public template, in the OOS console. For more information, see View the information of a public template.
Procedure
Go to the page for configuring a custom image creation task in the OOS console.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Move the pointer over Create Custom Image and select Use OOS to Create.
On the Create or Update Images page, configure parameters.
Keep Create Image from Existing Instance selected.
Configure the parameters in the General Settings section.
Enter a name for the custom image and configure the Permissions parameter.
Select an instance.
OOS creates a custom image from the selected instance. When OOS creates a custom image, OOS creates snapshots for the disks that are attached to the instance. You are charged for the snapshots contained in the created custom image.
(Optional) Enter remote commands.
The remote commands that you enter are sent to the selected instance before OOS creates the custom image. You can enter remote commands to perform specific operations on the instance, such as installing software or recording the execution time of O&M tasks.
(Optional) Configure the parameters in the Image Distribution section. The following table describes the parameters.
Parameter
Description
Copy to Other Region
Select one or more regions. After a custom image is created in the current region, the image is automatically copied to the regions that you select.
Shared Account ID
Specify the IDs of one or more Alibaba Cloud accounts. After a custom image is created, it is automatically shared to the accounts that you specify.
(Optional) Configure the Scaling Group Configuration ID parameter in the Scaling Group Configuration section.
After a custom image is created, it is automatically used to update image parameters in the scaling configuration of the specified scaling group.
(Optional) Configure the parameters in the Execution Settings(Optional) section. The following table describes the parameters.
Parameter
Description
Description
Enter a description for the custom image.
Tags for Execution
Add tags to the task to help you identify the task.
Executed Resource Group
Select a resource group to manage the custom image based on usage and permissions.
Save as Template
Turn on this switch to save the settings of this task as a custom template for future reuse.
Click Create.
On the task details page, when the value of Execution Status changes to Running, you can click the Output and Log tabs to view the output parameters and the execution logs of the task. When the value of Execution Status changes to Success, the custom image is created and operations, such as copying the image to other regions, are performed as configured in the task.
NoteAfter the custom image is created, you can go back to the Elastic Compute Service (ECS) console and view the custom image on the Images page.
References
After a custom image is created, you can use the custom image to perform the following operations: