This topic describes how to copy a custom image from one region to another within your Alibaba Cloud account. This feature can be used to create identical Elastic Compute Service (ECS) instances and back up data of instances across regions.

Background information

The following table describes a variety of scenarios in which custom images are copied.
Scenario Procedure API operation
Copy images across different regions within the same account
  1. Create a custom image from an instance
  2. Copy images to a different region
  1. CreateImage
  2. CopyImage
Copy images across regions and accounts
  1. Create a custom image from an instance
  2. Copy images to a different region
  3. Share or unshare a custom image
  1. CreateImage
  2. CopyImage
  3. ModifyImageSharePermission
Share images within the same region to another account You can share images without the need to copy the images. For more information, see Share or unshare a custom image. ModifyImageSharePermission
Change the encryption state of a custom image, encrypt a system disk, or encrypt operating system data Select Encrypt when you copy a custom image within the same region.
Note
  • To copy a custom image within the same region, you must encrypt the image copy.
  • You cannot cancel an ongoing copy task of an encrypted image.
CopyImage
Before you copy a custom image, take note of the following items:
  • You may be charged the following fees:
    • Fees for the use of storage capacity occupied by snapshot copies. For more information, see Overview.
      Note When an image is copied to a region, one or more corresponding snapshots are generated in the region. Then, a custom image is generated in the region based on these snapshots. These snapshots are retained permanently, regardless of the retention period of the snapshots of the source image.
    • Fees for cross-region data transfer. This data transfer is not billed for the moment. For the latest billing details, see the official Alibaba Cloud website for announcements.
  • The amount of time it takes to copy an image depends on the image size, network transmission speed, and the number of concurrent tasks in the queue.
    Note To copy a large image such as an image larger than 2 TiB in size across regions, you can first copy the associated snapshots to the destination region and then create a custom image from these snapshots in the destination region. For more information, see Copy a snapshot and Create a custom image from a snapshot.
  • The role authorization information, service authorization information, and instance user data of the source image are not copied to the image copy.

Procedure

  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. On the Images page, click the Custom Images tab.
  5. Find the custom image that you want to copy and click Copy Image in the Actions column.
  6. In the Copy Image dialog box, specify parameters.
    1. Confirm the ID of the custom image that you want to copy.
    2. Select a region from the Destination Region drop-down list, which can be the current region or another region.
    3. In the Custom Image Name field, enter an image name to display in the destination region. Example: Image_m_bp1f_from_hangzhou.
    4. Optional:In the Description field, enter an image description to display in the destination region.
    5. Optional:Select a resource group from the Resource Group drop-down list.
    6. Optional:Select Encrypt and then select Default Service CMK from the drop-down list.

      Default Service CMK: The default key generated by Key Management Service (KMS).

      Note To copy a custom image within the same region, you must select Encrypt and select a key to encrypt the image.
    7. Click OK.
      Copy a custom image
  7. Check the result and manage the task.
    1. In the upper-left corner of the top navigation bar, select the destination region from the drop-down list and view the copy progress of the custom image.
      When the copy task is completed, the progress reaches 100% and the image enters the Available state. An image is generated in the destination region and has a unique image ID.
    2. Optional: If the Progress has not reached 100% and the Status is Creating, you can cancel the copy task by clicking Cancel Copy.
      Note You cannot cancel an ongoing copy task of an encrypted image.
      Creating

What to do next

You can use the image copy to create an instance or replace the system disk of an instance as described in the following topics: