You can create a custom image from a snapshot that contains the operating system and data of an Elastic Compute Service (ECS) instance. Then, you can use the custom image to create multiple identical instances.

Prerequisites

Background information

You can use one of the following methods to create a custom image from a snapshot:

Precautions

Before you create custom images from snapshots, take note of the items described in the following table.

Item Description
Limits on regions A custom image resides within the same region as the snapshot from which the image was created. For information about how to use images across regions, see Copy an image.
Billing A snapshot is automatically generated for each disk when you create a custom image. You are charged for the snapshots. For more information about snapshot billing, see Snapshots.
Snapshot
  • Only system disk snapshots can be used to create custom images and data disk snapshots cannot.
  • Both encrypted and unencrypted snapshots can be used to create custom images.
  • If the ECS instance from which a snapshot was created expires or is released, the custom image created from the snapshot and the ECS instance created from the image are not affected.
ECS instance ECS instances created from custom images:

Create a custom image on the Images page

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Images.
  3. In the top navigation bar, select a region.
  4. In the Create Image section, click Create Custom Image.
    Create an image
  5. In the Create Custom Image dialog box, configure the parameters described in the following table.
    Parameter Description References
    Creation Method Select Snapshot. N/A
    Snapshot Select a created system disk snapshot from the drop-down list. N/A
    Image Name Enter a name for the custom image. N/A
    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 Details Optional. Select increaseData Disk, click increases, and then select the ID of a data disk snapshot.
    • If you leave the Snapshot ID field empty, an empty data disk will be created when you use the custom image to create an instance. By default, the data disk is 5 GiB in size.
    • If you select the ID of a data disk snapshot, the capacity of the data disk to be created is the same as the snapshot size.
    Snapshot overview
    Image Description Enter a description for the custom image. N/A
    Tag Select one or more tags.
    • Tag is an optional parameter in most cases.
    • Tag is a required parameter 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 Tag, an error is reported and indicates insufficient permissions.
    Overview
    Resource Group Optional. Select a resource group to manage the custom image based on the usage and permissions. Resource groups
  6. Click OK.

Create a custom image on the Instances page

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance whose snapshot you want to use and click the instance ID to go to the Instance Details page.
  5. On the Instance Details page, click the Snapshot tab.
  6. Find a snapshot whose Disk Type is System Disk and click Create Custom Image in the Actions column.
  7. In the Create Custom Image dialog box, configure the parameters described in the following table.
    Parameter Description References
    Image Name Enter a name for the custom image. N/A
    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 Details Optional. Select increaseData Disk, click increases, and then select the ID of a data disk snapshot.
    • If you leave the Snapshot ID field empty, an empty data disk will be created when you use the custom image to create an instance. By default, the data disk is 5 GiB in size.
    • If you select the ID of a data disk snapshot, the capacity of the data disk to be created is the same as the snapshot size.
    Snapshot overview
    Image Description Enter a description for the custom image. N/A
    Tag Select one or more tags.
    • Tag is an optional parameter in most cases.
    • Tag is a required parameter when you log on as a RAM user and a policy attached to the RAM user requires that tags be added. In this case, if you do not specify Tag, an error is reported and indicates insufficient permissions.
    Overview
    Resource Group Optional. Select a resource group to manage the custom image based on the usage and permissions. Resource groups
  8. Click OK.

Create a custom image on the Snapshots page

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Storage & Snapshots > Snapshots.
  3. In the top navigation bar, select a region.
  4. On the Disk Snapshots tab, find a snapshot whose Disk Type is System Disk and click Create Custom Image in the Actions column.
  5. In the Create Custom Image dialog box, configure the parameters described in the following table.
    Parameter Description References
    Image Name Enter a name for the custom image. N/A
    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 Details Optional. Select increaseData Disk, click increases, and then select the ID of a data disk snapshot.
    • If you leave the Snapshot ID field empty, an empty data disk will be created when you use the custom image to create an instance. By default, the data disk is 5 GiB in size.
    • If you select the ID of a data disk snapshot, the capacity of the data disk to be created is the same as the snapshot size.
    Snapshot overview
    Image Description Enter a description for the custom image. N/A
    Tag Select one or more tags.
    • Tag is an optional parameter in most cases.
    • Tag is a required parameter when you log on as a RAM user and a policy attached to the RAM user requires that tags be added. In this case, if you do not specify Tag, an error is reported and indicates insufficient permissions.
    Overview
    Resource Group Optional. Select a resource group to manage the custom image based on the usage and permissions. Resource groups
  6. Click OK.

What to do next