You can create a custom image from a snapshot that contains the operating system and data of an Elastic Compute Service (ECS) instance. Then, you can use the custom image to create multiple identical instances.
Prerequisites
- The snapshot service is activated, and a system disk snapshot is created. For more information, see Activate ECS Snapshot and Create a snapshot for a disk.
- Sensitive data is deleted from the system disk snapshot to enhance data security.
Precautions
Before you create custom images from snapshots, take note of the items described in the following table.
Item | Description |
Limits on regions | A custom image resides within the same region as the snapshot from which the image was created. For information about how to use images across regions, see Copy an image. |
Billing | You are charged for snapshots. For information about snapshot billing, see Snapshots. |
Snapshot |
|
ECS instance | ECS instances created from custom images:
|
Procedure
This section describes how to create a custom image from a system disk snapshot on the Snapshots page in the ECS console. You can also go to the Images page (
) or the Snapshot tab of the Instance Details page ( ) to create a custom image from a system disk snapshot.- 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.
- On the Disk Snapshots tab, find a snapshot whose Disk Type is System Disk and click Create Custom Image in the Actions column.
- In the Create Custom Image dialog box, configure the parameters described in the following table.
Parameter or option Description References Image Name Enter a name for the custom image. N/A Image Check 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.Note Only specific operating systems support the image check feature. For information about operating systems that do not support the feature, see Operating system limits for image check.Overview Image Family Optional. Select an image family. Custom images that belong to an image family can be deprecated or restored to allow seamless image updates and rollbacks.
Overview Snapshot Details Optional. Select increaseData Disk, click increases, and then select the ID of a data disk snapshot. - If you leave the Snapshot ID field empty, an empty data disk will be created when you use the custom image to create an instance. By default, the data disk is 5 GiB in size.
- If you select the ID of a data disk snapshot, a data disk is created from the data disk snapshot and has the same size as the snapshot when you use the custom image to create an instance.
Snapshot overview Image Description Optional. Enter a description for the custom image. N/A Tag Select one or more tags. - The Tag parameter is optional in most cases.
- The Tag parameter is required when you log on as a RAM user and a policy attached to the RAM user requires that tags be added. In this case, if you do not specify Tag, an error is reported and indicates insufficient permissions.
Overview Resource Group Optional. Select a resource group to manage the custom image based on the usage and permissions. Resource groups Automatic release time has been set for the selected snapshot. To ensure that the snapshot can be automatically released, you must delete the associated image before the snapshot expires. Otherwise, the snapshot cannot be released and will continue to incur charges. If a retention period is configured for the selected snapshot, select this option. Create a snapshot of a disk - Click OK.