You can create a custom image from an existing system disk snapshot. A custom image includes the operating system, applications, configurations, and data from the source ECS instance. You can then use the custom image to create ECS instances, which allows you to rapidly replicate the source instance's environment. This topic describes how to create a custom image from a system disk snapshot.
Prerequisites
-
Create a system disk snapshot. For more information, see Create a snapshot.
-
Remove sensitive data from the snapshot to avoid security risks.
Usage notes
Before you create a custom image from a snapshot, note the following:
|
Item |
Description |
|
Region restrictions |
The custom image must be in the same region as its source snapshot. To use an image in another region, you can create the custom image and then copy the custom image to the destination region. |
|
Snapshot restrictions |
|
|
Billing |
Snapshots continue to incur snapshot storage fees. For more information, see Snapshot billing. |
|
Creation duration |
The time it takes to create an image depends on the size of the source cloud disk. The image is ready to use only after the creation process for all its associated disk snapshots is complete. |
|
Other |
If the source ECS instance of the snapshot expires or is released, this does not affect the custom image created from the snapshot or any ECS instances created from that image. |
Procedure
You can create a custom image from a system disk snapshot from several locations in the console, such as the Images page, the Instance Details page, and the Snapshots page. This procedure uses the Snapshots page as an example.
Go to ECS console - Snapshots.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
On the Disk Snapshots tab, find the target snapshot whose Disk Type is System Disk. In the Actions column, click Create Custom Image.
-
In the Create Custom Image dialog box, configure the following parameters.
Parameter
Description
References
Name
Enter a name for the custom image.
N/A
(Optional) Detect Image
The image check feature verifies whether an imported custom image is valid and can create fully functional ECS instances.
By default, Check After Creation is selected. The system performs an image check immediately after creating the image. After the check is complete, you can view the check details in the Check Result column of the custom image list. If any issues are found, you can use the public CloudOps Orchestration Service (OOS) template ACS-ECS-RepairImage for a one-click fix, or manually resolve the issues based on the suggestions in the image details.
NoteThe image check feature is supported only for some operating systems. For more information, see Check and fix custom images.
(Optional) Image Family
You can select an image family when you create the custom image.
You can deprecate or restore images within a family, which allows for smooth updates and rollbacks.
(Optional) Snapshot Settings
Select Add Data Disk and click Add to select a data disk snapshot ID. After you add data disks, the resulting custom image contains the same number of data disks.
-
If you do not select a data disk snapshot ID, the system creates an empty data disk with a default capacity of 5 GiB.
-
If you select a data disk snapshot ID, the capacity of the new data disk equals the snapshot size.
Snapshot Billing
If an automatic release time is configured for the snapshot, select I have read the snapshot billing notice "Snapshot billing".
ImportantIf the selected snapshot is configured to be automatically released, you must manually delete any custom images created from it before the scheduled release time. Otherwise, the snapshot will not be released and will continue to incur fees.
(Optional) Image Description
Enter a description for the custom image.
N/A
(Optional) Tag
Select a tag.
-
Optional: This parameter is optional in most scenarios.
-
Required if your RAM user is subject to a RAM policy that enforces tag binding. Otherwise, you will encounter a permission error.
(Optional) Resource Group
Select a resource group to organize and manage permissions for the custom image.
-
-
Click OK and wait for the creation process to complete.