Use shared images
Create ECS instances, replace the operating system, or copy shared images received from other Alibaba Cloud accounts.
Considerations
Alibaba Cloud does not guarantee the integrity or security of shared images. Before you use a shared image, verify that it comes from a trusted account. You assume all risks associated with using shared images.
Before you use a shared image, note the following items.
|
Item |
Description |
|
Fees |
See Image billing. |
|
Limits |
|
|
Permissions |
|
Use a shared image to create ECS instances
Use the ECS console
Use a shared image to create one or more ECS instances with the same image environment.
-
Go to ECS console - Images.
In the upper-left corner of the page, select a region and resource group.
-
Click the Shared Image tab, find the target shared image, and then click Create Instance in the Actions column.

-
The region and image are automatically populated. Configure other parameters such as Billing Method and Instance Type based on your business requirements.
For other parameters, see Create an instance with Custom Launch.
If you use an encrypted shared image, the system disks or data disks created from the image are automatically encrypted and cannot be changed to unencrypted. You must specify a service key or a customer master key (CMK) as the encryption key.

Call an API operation
-
Call the DescribeImages operation to query the
IDsof available shared images. -
Call the RunInstances or CreateInstance operation with
ImageIdset to the ID of a shared image.ImportantIf the shared image is encrypted, you must set Encrypted to true. Otherwise, instance creation may fail.
Replace the operating system with a shared image
Use the ECS console
Replace the operating system (system disk) of an ECS instance with a shared image.
In the Replace Operating System section of the Change Operating System page, select Shared Image and then select a shared image. See Replace the operating system (system disk).
Call an API operation
-
Call the DescribeImages operation to query the
IDsof available shared images. -
Call the ReplaceSystemDisk operation with
ImageIdset to the ID of a shared image to replace the operating system (system disk).ImportantIf the shared image is encrypted, you must set Encrypted to true to encrypt the new system disk. Otherwise, the replacement may fail.
Copy a shared image
Use the ECS console
As a sharee, you can only use a shared image to create ECS instances. To delete or update a shared image, copy it first. The copy appears as a custom image in the same region.
-
On the Shared Image tab, find the target shared image and click Copy Image in the Actions column.

-
In the Copy Image dialog box, configure the parameters.
-
Set Copy Mode to Copy or Copy and Encrypt.
-
For Destination Region, you can select only the region in which the shared image resides.
NoteShared images can only be copied within the same region. To copy a shared image to a different region, first copy it in the current region, and then copy the resulting custom image to the target region.
For other parameters, see Copy a custom image.
-
-
(Optional) View the image copy on the Custom Images tab.
Call an API operation
-
Call the DescribeImages operation to query the
IDsof available shared images. -
Call the CopyImage operation with
ImageIdset to the ID of a shared image.ImportantIf the shared image is encrypted, you must set Encrypted to true to encrypt the image copy. Otherwise, the copy may fail.
References
-
Deploy ECS instances across multiple Alibaba Cloud accounts in the same region. See Share a custom image.
-
Stop sharing custom images with other Alibaba Cloud accounts. See Unshare an image.
-
Permissions required to share encrypted images. See Encryption permissions.