You can create a custom image from an existing system disk snapshot, which includes the operating system, installed software, configurations, and data from your ECS instance. This allows you to quickly replicate the instance's environment. This topic describes the steps to create a custom image using a system disk snapshot.
Prerequisites
-
A system disk snapshot is created. For detailed instructions, see Create a snapshot.
-
Sensitive data has been removed from the snapshot to prevent data security risks.
Notes
Please note the following before creating a custom image from a snapshot:
Note | Description |
Note | Description |
Region restrictions | The snapshot and the custom image to be created must belong to the same region. If you need to use the image across regions, you can first create a custom image and then copy the custom image across regions. |
Snapshot restrictions |
|
Billing description | Using snapshots will continuously incur snapshot storage fees. For more information, see Snapshot billing. |
Creation duration | The time required to create an image depends on the size of the disk. You must wait until the snapshot of each disk is created before you can use the image. Please be patient. |
Other matters | After the original ECS instance from which the snapshot was created expires or is released, the custom image created from the snapshot is not affected, nor are the ECS instances created using that image. |
Procedure
To create custom images, you can access various entry points, such as the image, instance product, and snapshot pages. The following procedure demonstrates creation via the snapshot page.
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.
-
Under the Disk Snapshots tab, locate the desired snapshot where the Disk Property is set to System Disk. Then, click Create Custom Image in the Actions column.
-
In the Create Custom Image dialog box, complete the following configurations:
Parameter
Description
References
Parameter
Description
References
Image Name
Enter a name for the custom image.
N/A
(Optional) Image Check
The image check feature primarily checks whether the imported custom image is valid and whether the custom image can be used to create fully functional ECS instances.
By default, Perform Check After Creation is selected. The image check feature will be executed immediately after the image is created. After the check is complete, you can view the check details in the Check Result column of the custom image list. If there are items to be repaired, you can use the public template CloudOps Orchestration Service (OOS) ACS-ECS-RepairImage to repair with one click or manually repair according to the repair suggestions in the image details.
Currently, only some operating systems support the image check feature. For a list of unsupported operating systems, see Operating system restrictions for image check.
(Optional) Image Family
You can select an image family when you create a custom image.
Custom images that belong to an image family can be deprecated or restored to allow smooth image updates and rollbacks.
(Optional) Snapshot Configuration
Select Add Data Disk, and after clicking Add, select the data disk snapshot ID. After adding the data disk, the custom image created from the snapshot will contain the same number of data disks.
If you do not select the data disk snapshot ID, a new data disk is created as an empty disk with a default size of 5 GiB.
If you select the data disk snapshot ID, the new data disk size is the size of the snapshot.
Snapshot Billing
If a specific retention period is set for the snapshot, you need to select I Have Read The Snapshot Billing Notice "snapshot Billing".
If a specific retention period is set for the snapshot, to ensure that the snapshot can be automatically released as planned, please make sure to delete the associated image before the snapshot expires. Otherwise, the snapshot cannot be automatically released and will be retained, incurring continuous billing.
(Optional) Image Description
Enter a description for the custom image.
N/A
(Optional) Tag
Select the appropriate tag.
Optional: In most scenarios, the tag is optional.
Required: When you log on as a RAM user and a policy attached to the RAM user requires that tags be added, the tag is required. Otherwise, an error is reported indicating insufficient permissions.
(Optional) Resource Group
Select a resource group to manage the custom image based on usage and permissions.
```html Resource group
-
Click Confirm and wait for the image creation process to finish.