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
-
You have created a custom image. For more information, see Create a custom image from a snapshot or Create a custom image from an instance.
-
If you want to perform an encrypted copy, make sure that you have activated KMS. For more information, see Activate KMS.
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.
-
Select the standard copy type and a destination region (as described in this topic).
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.
-
Select the standard copy type and a destination region (as described in this topic).
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.
-
-
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.
NoteWhen 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.
-
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).
-
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.
NoteSnapshots 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.
NoteCopying 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
Go to ECS console - Images.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
-
On the Images page, click the Custom Images tab.
-
Find the image that you want to copy and, in the Actions column, click Copy Image.
-
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.
NoteIf 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.
NoteYou 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.
NoteIf 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.
NoteYou 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.
-
-
After you confirm the settings, click OK to start copying the image.
-
In the destination region's image list, check the copy progress and manage the task.
NoteIf 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.
-
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.
-
(Optional) While the image Status is Creating, you can click Cancel Copy in the Actions column at any time to cancel the task.
NoteYou can also call the CancelCopyImage API operation to cancel an ongoing image copy task.
-