You can create a custom image from an existing system disk snapshot. A custom image contains the operating system and the software, configurations, and data on the source ECS instance. You can then use the custom image to quickly create ECS instances with an environment identical to the source instance. This topic describes how to create a custom image from a system disk snapshot.
Prerequisites
-
A snapshot of a system disk is available. For more information, see Manually create a single snapshot.
-
Sensitive data has been removed from the source system disk to prevent security risks.
Considerations
Before you create a custom image from a snapshot, note the following:
|
Item |
Description |
|
Region limit |
The snapshot and the custom image must be in the same region. To use an image in a different region, you must first create the custom image and then copy the custom image to the destination region. |
|
Snapshot limit |
|
|
Billing |
You are charged for snapshot storage. For more information, see Snapshot billing. |
|
Creation time |
The time required to create an image depends on the size of the source snapshot. The image becomes available once the creation process is complete. |
|
Other considerations |
If the snapshot's source ECS instance expires or is released, the custom image and any ECS instances created from the image are not affected. |
Procedure
You can create a custom image from a system disk snapshot on the Images page, the instance details page, or the Snapshots page. This topic uses the Snapshots page as an example.
Go to ECS console - Snapshots.
In the upper-left corner of the page, select a region and resource group.
-
On the Disk Snapshot tab, find the 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
Related information
Image Name
Enter a name for the custom image.
None
(Optional) Image Check
The image check feature verifies whether a custom image is valid and can be used to create fully functional ECS instances.
By default, Check After Creation is selected. The feature runs a check immediately after the image is created. After the check is complete, you can view the results in the Check Results column of the custom image list. If issues are found, you can use the ACS-ECS-RepairImage public template of CloudOps Orchestration Service (OOS) for a one-click repair, or fix the issues manually based on the provided suggestions.
NoteThe image check feature is supported only by specific operating systems. For a list of unsupported operating systems, see Operating system limitations for image check.
(Optional) Image Family
You can assign the custom image to an image family.
Custom images that belong to an image family can be deprecated or restored, which allows for smooth image updates and rollbacks.
(Optional) Snapshot Settings
Select Add Data Disk, click Add, and then select one or more data disk snapshot IDs. After you add data disk snapshots, the resulting custom image will contain both the system disk and the specified data disks.
-
When adding a data disk, if you do not select a source snapshot ID, an empty data disk with a default capacity of 5 GiB is created.
-
If you select a data disk snapshot ID, the new data disk has the same capacity as the snapshot.
Snapshot billing.
If a specific retention period is set for the snapshot, you must select I have read the Snapshot billing notice.
ImportantIf you set a retention period for a snapshot, you must delete any associated images before the snapshot expires. This ensures that the snapshot can be automatically deleted as scheduled. Otherwise, the snapshot is retained and continues to incur storage fees.
(Optional) Description
Enter a description for the custom image.
None
(Optional) Tag
Select a tag.
-
This parameter is optional in most scenarios.
-
This parameter is required if you use a RAM user that is granted a RAM policy to enforce tag binding. If you do not add a tag, a permission error occurs.
(Optional) Resource Group
Select a resource group to manage the custom image based on its purpose, permissions, or other criteria.
-
-
Click OK and wait for the image to be created.