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

A system disk snapshot is created. For more information, see Create a snapshot of a disk.

Background information

demo
Before you create custom images from snapshots, take note of the following items:
  • Notes on snapshots used to create custom images:
    • A custom image can be created from a system disk snapshot or from a system disk snapshot and one or more data disk snapshots. Data disk snapshots alone cannot be used to create custom images.
    • 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.
  • Notes on custom images:
    • Custom images cannot be used across regions. To use custom images across regions, you can copy custom images from one region to another. For more information, see Copy a custom image.
    • The billing method of custom images is independent of that of the ECS instances from which the custom images were created and that of the ECS instances created from the custom images. For example, custom images created from subscription instances can be used to create pay-as-you-go instances.
  • Notes on ECS instances created from custom images:
  • Recommendations for data security:

    Delete sensitive data from a snapshot in advance to enhance data security.

Procedure

  1. Log on to the ECS console.
  2. Use one of the following methods to find the system disk snapshot from which you want to create a custom image:
    • On the Instances page
      1. In the left-side navigation pane, choose Instances & Images > Instances.
      2. In the top navigation bar, select a region.
      3. Find the instance. Click the instance ID or click Manage in the Actions column.
      4. On the Instance Details page, click the Snapshot tab. Find the snapshot whose Disk Type(All) is System Disk. Click Create Custom Image in the Actions column.
    • On the Snapshots page
      1. In the left-side navigation pane, choose Storage & Snapshots > Snapshots.
      2. In the top navigation bar, select a region.
      3. Find the snapshot whose Disk Type(All) is System Disk. Click Create Custom Image in the Actions column. snapshot_systemdisk
  3. In the Create Custom Image dialog box, configure parameters described in the following table.
    Parameter Description References
    System Snapshot ID The snapshot must be a system disk snapshot. N/A
    Custom Image Name and Custom Image Description Enter an image name in the Custom Image Name field and enter a description for the image in the Custom Image Description field. N/A
    Image Family Optional. Select an image family. Custom images that belong to an image family can be deprecated or restored to allow smooth image updates and rollbacks. Overview
    Resource Group Optional. Select a resource group to manage the custom image based on the usage and permissions. Resource groups
    Add Data Disk Snapshot Optional. Select Add Data Disk Snapshot, click Add in the Snapshot Details section, and then select the ID of a data disk snapshot.
    • If you do not select the ID of a data disk snapshot, an empty data disk is created with a default capacity of 5 GiB.
    • 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
    Tag Select a 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 specific tags be added, you must configure this parameter to specify the tags. Otherwise, an error is reported and indicates insufficient permissions.
    Create a resource with a specific tag
  4. Click Create.

What to do next

After the custom image is created, you can perform operations described in the following topics: