You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Creating custom images
Creating custom image based on instance (for Linux)
Copy page
Download PDF
Creating custom image based on instance (for Linux)
This topic describes how to create a system volume image or whole image based on a Linux instance.​
Terms​
​
Term​
Notes​
System volume image​
A custom image that contains only system volume data.​
Whole image​
A custom image that contains data from the system volume and data volumes. During the image creation process, the platform creates a separate snapshot for each volume attached to the instance, including the system volume. The collection of these snapshots constitutes a whole image.​
​
Operation instructions​
​
Preparations​
​
Instance​
You have purchased an ECS instance for creating a custom image. For more information, see Purchasing ECS instances.​
Dependent feature​
The snapshot feature is enabled to store custom image data. For more information, see Snapshot.​
Limits for different image types​
​
System volume image​
By default, only a custom image of your system volume is created.​
Whole image​
  • The total amount of data on the system volume and data volumes must not exceed 32 TiB.​
  • You can create a whole image only based on the combination of the system volume and all data volumes of an instance.​
  • You cannot create a whole image for an instance equipped with a local disk or a PTSSD volume.​
tip​
If the specification details of the instance include local storage information, the instance is equipped with a local disk. For example, the Local-SSD i3s instance type falls into this category.​
  • You cannot export a whole image or use a whole image to change the operating system.​
Limits on various volume types​
​
PTSSD volume​
If the ECS instance for which you want to create a custom image is mounted with a PTSSD volume:​
  • Before you create an image, stop the instance first. Otherwise, you cannot create an image.​
  • During the creation process, you cannot change the instance status. For example, you cannot start, stop, or restart the instance. Wait until the custom image is created before you perform operations on the instance.​
ESSD volume​
If the ECS instance for which you want to create a custom image is mounted with an ESSD volume:​
  • Before you create a custom image, you do not need to stop the instance. For volume performance metrics, refer to Volume specifications.​
  • During the creation process, you cannot change the instance status. For example, you cannot start, stop, or restart the instance. Wait until the custom image is created before you perform operations on the instance.​
tip​
When you create a custom image for a running instance, some real-time data may not be saved to the image file. To ensure data integrity, we recommend that you stop the instance before you create an image.​
  • During the creation process, the instance status does not change, and you can start, stop, or restart the instance.​
​
​
warning​
  • Do not modify the kernel. Otherwise, the custom image you create may not work as expected. If the custom image cannot work as expected, submit a ticket.​
  • If the available space of the system volume is insufficient, you may fail to create the custom image. If you fail to create the custom image, submit a ticket.​
Step 1: Install software (optional)​
  1. Install software on the target instance based on your business requirements. For example, you can install JDK or Oracle.​
tip​
When you create a non-whole image, you can create a custom image only for your system volume. Therefore, data stored on the data volume is not contained in the image. Install software on the system volume.​
Step 2: Clear the Cloud-init configuration​
Execute the following command to delete the /var/lib/cloud file. This way, the Cloud-init configuration is cleared. If you do not delete the file, information such as the hostname and password cannot be injected into ECS instances created by using the custom image.​
​
rm -rf /var/lib/cloud​
​
Step 3: Stop the instance​
Stop the target instance. For more information, see Stopping instances.​
tip​
If you use a custom image created based on an ESSD volume, you do not need to stop the instance and can skip this step.​
Step 4: Create a custom image based on the instance​
  1. Log in to the ECS console.​
  1. On the left side of the top menu bar, select the project and region where the instance is located.​
  1. In the left-side navigation pane, click "Instances & Images > Instances". ​
  1. Click "... > Volumes & Image > Create custom image" in the "Actions" column on the right side of the target instance.​
tip​
If the snapshot feature is not enabled, click "... > Volumes & Image > Create custom image" in the "Actions" column on the right side of the target instance. In the pop-up window, check the box next to "Click to activate, indicating that you are aware and agree Service-Specific Terms for VolcanoEngine Elastic Compute Service", and then click the "Activate" button.​
  1. In the pop-up window, configure the following parameters.​
  • ​
    Parameter​s​
    Description​
    Sample value​
    Image name​
    Specify the name of the custom image.​
    CentOS7.9-P​
    Project (optional)​
    Select the project to which the custom image belongs.​
    • After you select a project, the created custom image can be viewed and used only by users with permissions on the project.​
    • If no project is available in the drop-down list, you can follow the guidelines to create a project. For more information, see Creating projects.​
    tip​
    A project is a collection of resources. You can add custom images to projects and classify and manage custom images by project. Additionally, you can control the permissions of users and roles within each project on custom images. Learn more.​
    projectA​
    Image detection (optional)​
    Specifies whether to enable the image detection feature. This feature detects whether your custom image meets VolcanoEngine image requirements. This helps ensure that the ECS instances created by using the custom image run as expected.​
    tip​
    The image detection process starts after a custom image is created. Detection failures or failed detection does not block the creation or import process of the custom image. Learn more.​
    -​
    Tag (optional)​
    A tag is a key-value pair used to identify cloud resources. Tags help you categorize cloud resources with similar attributes based on different dimensions, such as purpose, owner, or environment. This allows you to search and aggregate your cloud resources for easy management.​
    Click the + icon and enter the tag key and tag value to add tags to the image. For more information, refer to Tag overview.​
    Key:Value​
    Production scope (optional)​
    Select the "Creating Whole Images" option based on your business requirements to specify whether to create a custom image that contains data from the system volume and all data volumes.​
    tip​
    When the target instance is mounted with a data volume, a whole image is created by default. You can also clear the "Creating Whole Images" option to create a custom image that contains only system volume data.​
    -​
    ​
  1. Click the "Create" button and wait until the custom image is created. The time required to create the custom image varies based on the actual amount of data in the volume.​
  1. You can view the progress of creating a custom image on the Custom Image page or the Executions page.​
  • In the left-side navigation pane, click "Instances & Images > Images", and then select the "Custom Image" tab to view the creation progress.​
  • ​​​
  • In the left-side navigation pane, click "Maintenance & Monitoring > Executions", and view the creation progress on the Executions page.​
  • ​​​
Operation results​
  1. Log in to the ECS console.​
  1. In the top menu bar, select the region and project where the target custom image is located.​
  1. Select the "Custom Image" tab.​
  1. If the status of the target image is Available in the "State" column, the custom image is created.​
  • ​​​
  1. You can also click the image name to go to the image details page, select the "Associative snapshot" tab, and view the IDs of the snapshots associated with the volumes in the image, the volume types, and the capacity of the volumes. For more information, see Snapshot overview.​
Related documents​
Last updated: 2026.06.18 17:49:50