Copy a custom image

更新时间:
复制 MD 格式

You can copy an image to deploy ECS instances across regions or to change the encryption state of an image within the same region or across regions. When you copy an image, a new image with a unique ID is created in the destination region. The new image's configuration, including its tags, resource group, and encryption properties, depends on the parameters you specify during the copy. This topic describes how to copy an encrypted or non-encrypted custom image. You can copy images only within the public cloud.

Prerequisites

Background information

Use cases

  • Standard copy

    Use case

    Description

    Steps

    Deploy ECS instances across regions under the same account

    When you copy an image to another region, a new image with a unique ID is created. Its configuration, including tags, resource group, and encryption properties, is determined by the parameters you set during the copy. You can then use the new image to deploy ECS instances.

    1. Select the standard copy type and a destination region (as described in this topic).

    2. Create an instance from a custom image or shared image

    Deploy ECS instances across regions and accounts

    After copying an image to another region, you can share the new image with another Alibaba Cloud account. The recipient can then use the shared image to deploy ECS instances.

    1. Select the standard copy type and a destination region (as described in this topic).

    2. Share an image

    3. Create an instance from a custom image or shared image

    Deploy ECS instances across accounts within the same region

    Directly share an image with another Alibaba Cloud account. The recipient can then use the shared image to deploy ECS instances.

    1. Share an image

    2. Create an instance from a custom image or shared image

  • Encrypted copy

    Use case

    Description

    Steps

    Change the encryption state of a custom image. This process takes longer than a standard copy.

    • Copy an encrypted image to another encrypted image (change the encryption key).

    • Copy a non-encrypted image to an encrypted image.

    After you copy the image within the same region or to a different region, you can use the resulting encrypted image to deploy ECS instances.

    Note

    When you create an ECS instance from an encrypted custom image, the system automatically encrypts its system disk and data disks with the same key used by the image.

    1. Select the encrypted copy type and specify a destination region (which can be the same as or different from the source region) and an encryption key (as described in this topic).

    2. Create an instance from a custom image or shared image

Usage notes

Before you copy an image, note the following:

  • Billing

    • Snapshot fees: When you copy an image, corresponding snapshots are created in the destination region. These snapshots consume your snapshot capacity, and you are charged for their storage size. For more information, see Snapshot billing.

      Note

      Snapshots generated from an image copy are retained indefinitely, overriding the retention policy of the source image's snapshots.

    • Data transfer fees: Copying an image between regions incurs no data transfer fees. In other words, you are not charged for the snapshot replication traffic generated by the image copy. Alibaba Cloud will issue an official announcement before this policy changes.

  • Copy duration

    The time required to copy an image depends on its size, the network transfer speed, and the number of concurrent copy tasks in the queue.

    Note

    Copying a snapshot is faster and more reliable than copying an entire image, which helps avoid potential speed and capacity limits. Therefore, if you need to copy a large image (for example, an image larger than 2 TiB), we recommend that you first copy its underlying snapshot to the destination region, and then create a new image from the copied snapshot in that region. For more information, see Copy a snapshot and Create a custom image from a snapshot.

Procedure

  1. Go to ECS console - Images.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. Region

  3. On the Images page, click the Custom Images tab.

  4. Find the image that you want to copy and, in the Actions column, click Copy Image.

  5. In the Copy Image dialog box, configure the parameters based on the copy type.

    Standard copy

    Parameter

    Required

    Description

    Copy Mode

    Yes

    Select Copy.

    Destination Region

    Yes

    Select the destination region to which you want to copy the image. Standard copy supports only cross-region copy.

    Note

    If you are using an Alibaba Cloud account, you can copy an image to multiple regions in a single operation. You can select up to five destination regions.

    Custom Image Name

    Yes

    Enter the Custom Image Name for the image in the target region, for example, Image_m_bp1f_from_hangzhou.

    Description

    No

    Enter a description for the copied image in the destination region.

    Resource Group

    No

    Assign the image to a resource group for easier management and organization.

    Tag

    No

    Add tags to the image to categorize it for easier searching and management.

    Note

    You can add new tags during the copy, but you cannot modify the source image's existing tags. The source tags are automatically preserved on the new image.

    Encrypted copy

    Parameter

    Required

    Description

    Copy Mode

    Yes

    Select Copy and Encrypt.

    Note

    If the source image is already encrypted, you can select only Copy and Encrypt.

    Copy Mode

    Yes

    Select a destination region and an encryption key.

    • Destination Region: Select the destination region to which you want to copy the image. You can select the same region as the source or a different region.

    • Encryption Key: From the drop-down list, select a service key or a customer master key (CMK) that you created in KMS. For more information about encryption keys for ECS, see Encrypt a cloud disk.

    Note
    • If you are using an Alibaba Cloud account, you can copy an image to multiple regions in a single operation. You can select up to five destination regions.

    • CMK selection is subject to regional and permission limits. For more information, see Encrypt a cloud disk.

    Custom Image Name

    Yes

    Enter a Custom Image Name for the image in the target region, for example, Image_m_bp1f_from_hangzhou.

    Description

    No

    Enter a description for the copied image in the destination region.

    Resource Group

    No

    Assign the image to a resource group for easier management and organization.

    Tag

    No

    You can add tags to the image to categorize it for easier searching and batch operations.

    Note

    You can add new tags during the copy, but you cannot modify the source image's existing tags. The source tags are automatically preserved on the new image.

  6. After you confirm the settings, click OK to start copying the image.

  7. In the destination region's image list, check the copy progress and manage the task.

    Note

    If you are using an Alibaba Cloud account, a notification about the copy result appears in the upper-right corner of the page. You can click the link in the notification to go to the ROS console and view the detailed progress of the copy task. The system deletes the resource stack after the image is copied.

    1. In the top navigation bar, switch to the destination region to check the copy progress of the custom image.

      When the progress reaches 100% and the image status changes to Available, the task is complete. A new image with a unique ID has been created in the destination region.

    2. (Optional) While the image Status is Creating, you can click Cancel Copy in the Actions column at any time to cancel the task.

      Note

      You can also call the CancelCopyImage API operation to cancel an ongoing image copy task.