To quickly replicate the environment of an Elastic Compute Service (ECS) instance, you can create a custom image from a system disk snapshot of the instance. The custom image contains the operating system of the ECS instance, the software installed on the ECS instance, and the configurations and data stored on the ECS instance. You can create ECS instances that have identical environment settings as the original ECS instance from the custom image. This topic describes how to use a system disk snapshot to create a custom image.
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.
Considerations
Before you create custom images from snapshots, take note of the items described in the following table.
Consideration | Description |
Region | A custom image resides in the same region as the snapshot from which the image was created. For information about how to use images across regions, see Copy a custom image. |
Billing | You are charged for snapshots. For information about the billing of snapshots, see Snapshots. |
Snapshot |
|
Procedure
This section describes how to create a custom image from a system disk snapshot on the Snapshots page. To create a custom image from a system disk snapshot, you can also go to the Images page by choosing
in the left-side navigation pane, or go to the Snapshots tab of the instance details page from the Instance page after choosing in the left-side navigation pane.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.
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 that are described in the following table.
Parameter
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 check is completed, you can view the check result in the Check Result column corresponding to the image on the Custom Images tab. If you need to repair an item, you can use the ACS-ECS-RepairImage public template of CloudOps Orchestration Service (OOS) or manually repair the item based on the solutions in the check result.
NoteOnly 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.
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.
Snapshot Settings
Optional. Select increaseData Disk, click increases, and then select the ID of a data disk snapshot. After data disk snapshots are added, the custom image created from the snapshots contains the same number of data disks as the snapshots.
If you do not select the ID of a data disk snapshot, an empty data disk is created. The default size of the data disk is 5 GiB.
If you select the ID of a data disk snapshot, a data disk that has the same size as the data disk snapshot is created from the snapshot.
Billing of Snapshots
If you specified a retention period for the snapshot, you must select I have read the Billing of Snapshots.
To ensure that the snapshot can be automatically released, delete the images that are associated with the snapshot before the snapshot expires. Otherwise, the snapshot cannot be released and continues to generate fees.
Image Description
Optional. Enter a description for the custom image.
N/A
Tag
Optional. Select a tag.
The Tag parameter is optional in most cases.
The Tag parameter is required 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 is reported indicating insufficient permissions.
Resource Group
Optional. Select a resource group to manage the custom image based on the usage and permissions.
In the message that appears, click OK.
The amount of time required to create an image varies based on the sizes of disks. You must wait until the snapshot of each disk is created before you can use the image.