You can copy a custom image to deploy ECS instances across regions, or change the encryption status of an image within the same region or across regions. After you copy an image, a new image with a unique ID is created in the destination region. The tags, resource group, and encryption attributes of the new image are determined by the parameters you specify during the copy operation. Image copying is supported only within Alibaba Cloud (public cloud).
Prerequisites
A custom image is created. For more information, see Create a custom image from an instance or Create a custom image from a snapshot.
To perform an encrypted copy, make sure that Key Management Service (KMS) is activated. For more information, see Activate KMS.
Background information
Scenarios
Alibaba Cloud ECS provides two types of image copy: standard copy and encrypted copy. Choose the appropriate type based on your use case.
Standard copy
Use standard copy to replicate an image to a different region while preserving its encryption status.
Scenario
Description
Steps
Cross-region, same-account deployment
Copy an image to another region. A new image with a unique ID is created in the destination region (tags, resource group, and encryption attributes are determined by the copy parameters). Use the new image to create ECS instances.
Select Standard Copy and choose the destination region (this topic).
Cross-region, cross-account deployment
Copy an image to another region, then share the image with another Alibaba Cloud account. The recipient uses the shared image to create ECS instances.
Select Standard Copy and choose the destination region (this topic).
Same-region, cross-account deployment
Share an image directly with another Alibaba Cloud account. The recipient uses the shared image to create ECS instances.
Encrypted copy
Use encrypted copy to change the encryption status of a custom image. Encrypted copy takes longer than standard copy.
Scenario
Supported
Non-encrypted image → Encrypted image
Yes
Encrypted image → Encrypted image (change key)
Yes
Encrypted image → Non-encrypted image
No
Scenario
Description
Steps
Change encryption status (takes longer than standard copy)
Copy an encrypted image to an encrypted image (change the encryption key)
Copy a non-encrypted image to an encrypted image
Copy an image within the same region or across regions, then use the encrypted image to create ECS instances.
NoteWhen you create an ECS instance from an encrypted custom image, the system disk and data disks (if any) are automatically encrypted with the same key used by the image.
Select Encrypted Copy and choose the destination region (same-region or cross-region) and encryption key (this topic).
Usage notes
Before you copy an image, take note of the following items:
Billing
Snapshot storage fees: Copying an image creates corresponding snapshots in the destination region. You are charged based on the storage size of these snapshots. For more information, see Snapshot billing.
NoteSnapshots created by image copying are retained indefinitely, regardless of the retention policy of the source image snapshots.
No data transfer fees are charged for cross-region image copying. Alibaba Cloud does not currently charge for this traffic. Any changes to this policy will be announced in advance.
Copy duration
The time required to copy an image depends on the image size, network conditions, and the number of concurrent copy tasks in the queue.
NoteCopying large images directly may be slow and subject to capacity constraints. Snapshot copy is typically faster and avoids these limitations. For images larger than 2 TiB, we recommend that you copy the underlying snapshot to the destination region first, and then create an image from the snapshot. For more information, see Copy a snapshot across regions and Create a custom image from a snapshot.
Limits
Standard copy supports only cross-region copy. To copy within the same region, use encrypted copy.
Encrypted images can only be copied by using encrypted copy.
Alibaba Cloud account users can copy to up to 5 destination regions per operation.
You can add new tags during copy, but you cannot modify the existing custom tags from the source image. The source image tags are preserved in the copied image.
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. 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. Standard copy supports only cross-region copy.
NoteAlibaba Cloud account users can copy to up to 5 destination regions per operation.
Custom Image Name
Yes
Enter the name for the image in the destination region. Example: Image_from_hangzhou.
Description
No
Enter a description for the image in the destination region.
Resource Group
No
Select a resource group to organize and manage the image.
Tag
No
Add tags to categorize the image for easier search and batch management.
NoteYou can add new tags during copy, but you cannot modify the existing custom tags from the source image. The source image tags are preserved in the copied image.
Encrypted copy
Parameter
Required
Description
Copy Mode
Yes
Select Copy and Encrypt.
NoteIf the source image is already encrypted, only Encrypted Copy is available.
Copy Mode
Yes
Configure the destination region and encryption key.
Destination Region: Select the region (same-region or cross-region).
Encryption Key: Select a service key or a customer master key (CMK) that you created in KMS. For more information about CMK restrictions, see Key Management Service.
NoteAlibaba Cloud account users can copy to up to 5 destination regions per operation. Click Add Destination Region to add more regions with different encryption keys.
Custom Image Name
Yes
Enter the name for the image in the destination region. Example: Image_from_hangzhou.
Description
No
Enter a description for the image in the destination region.
Resource Group
No
Select a resource group to organize and manage the image.
Tag
No
Add tags to categorize the image for easier search and batch management.
NoteYou can add new tags during copy, but you cannot modify the existing custom tags from the source image. The source image tags are preserved in the copied image.
After you verify the settings, click OK to start copying the image.
Check the copy progress in the destination region.
In the top navigation bar, switch to the destination region and view the progress of the custom image. When the progress reaches 100% and the status changes to Available, the copy is complete. The new image has a unique image ID.
(Optional) If the copy status is Creating, you can cancel the copy at any time by clicking Cancel Copying in the Actions column.
You can also cancel a pending copy by calling the CancelCopyImage API operation.