After you create an Elastic Compute Service (ECS) instance, you can customize the instance by performing operations, such as installing software and deploying application environments, based on your business requirements and then create a custom image from the instance. Instances created from the custom image contain all of the customized items, which eliminates the need to configure these items for each new instance. This topic describes how to create a custom image from an existing instance.
An ECS instance is created. For information about how to create an ECS instance, see Create an instance on the Custom Launch tab.
Sensitive data is deleted from the instance to enhance data security.
Before you create a custom image from a Linux instance, the following items are checked:
Network configurations of the instance. If network errors occur, troubleshoot the errors by performing the operations that are described in How to solve unreachable network errors when a VPC-type instance is created from a custom image.
Free space on the system disk. The system disk must have sufficient free space.
When you create a custom image from an instance, a snapshot is automatically created for each disk on the instance. All the snapshots together constitute a complete custom image, as shown in the following figure.
If the instance has data disks, the custom image contains the snapshots of both the system disk and data disks of the instance.
Before you create a custom image from an instance, take note of the items that are described in the following table.
A custom image resides in the same region as the instance from which the image was created. For information about how to use images across regions, see Copy an image.
You cannot create images that contain snapshots of system disks and data disks from instances that use local SSDs. For more information, see Instance families with local SSDs.
When you create a custom image from a Linux instance, take note the following additional items:
Amount of time required to create an image
The amount of time that is required to create an image from an instance depends on the disk size of the instance. Wait until the snapshot for each disk is created before you can use the image.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find the instance from which you want to create a custom image. Choose in the Actions column.
In the Create Custom Image dialog box, configure the parameters that are described in the following table.
Enter a name for the custom image.
Optional. The image check feature checks whether imported custom images are valid and whether the images can be used to create full-featured ECS instances.
By default, Check After Creation is selected, and the image check feature checks the custom image immediately after the image is created. After the image is checked, you can find the image in the custom image list and click Details in the Status column to view the check results and resolve issues based on the solutions that are provided in the results. For information about check items and solutions to image issues, see Overview.Note
Only specific operating systems support the image check feature. For information about the operating systems that do not support the image check feature, see Operating system limits for image check.
Optional. Select an image family for the custom image. Custom images that belong to an image family can be deprecated or restored to allow smooth image updates and rollbacks.
Optional. Enter a description for the custom image.
Select one or more tags.
Tag is an optional parameter in most scenarios.
Tag is a required parameter when you log on as a Resource Access Management (RAM) user and a policy attached to the RAM user requires that tags be added. In this case, if you do not specify the Tag parameter, an error that indicates insufficient permissions is reported.
Optional. Select a resource group to manage the custom image based on usage and permissions.