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.
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 | Only system disk snapshots can be used to create custom images. Both encrypted and unencrypted snapshots can be used to create custom images. Custom images created from encrypted snapshots are encrypted. Shared snapshots cannot be used to create custom images. If the ECS instance from which a snapshot was created expires or is released, the custom images created from the snapshot and the ECS instance created from the images are not affected.
|
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 |
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. 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. | 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 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.
| Create a disk from a 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. | Create a snapshot |
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.
| Tags |
Resource Group | Optional. Select a resource group to manage the custom image based on the usage and permissions. | Resource groups |
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.