This topic describes how to manage custom images.
Share a custom image
Shared images can be used to deploy Edge Node Service (ENS) instances that use the same image across accounts. The users with whom you share images can use the shared custom images to quickly create ENS instances that run in the same image environment.
Before you share a custom image, make sure that all sensitive data and files are removed from the image.
The IDs of the Alibaba Cloud accounts with which you want to share an image are obtained.
To obtain the ID of an Alibaba Cloud account, log on to the Alibaba Cloud Management Console with the account and move the pointer over the profile picture in the upper-right corner. If the account is tagged with Main Account in the user information panel, the account ID is an Alibaba Cloud account ID.
Log on to the ENS console.
In the left-side navigation pane, choose Computing Capacity and Images > Images.
On the Custom image tab, find the custom image that you want to share and click Manage Share in the operating column.
In the Manage Share dialog box, enter the ID of the account with which you want to share the image and save the ID.
Unshare a custom image
After you unshare a shared image from Alibaba Cloud accounts, the following results occur:
Accounts with which the image was shared can no longer query the image by using the ENS console or by calling an API operation.
The accounts can no longer use the image to create ENS instances or change the system disks of ENS instances.
On the Custom image tab, find the custom image that you want to unshare and click Manage Share in the operating column.
In the Manage Share dialog box, find the ID of the account from which you want to unshare the image and click Cancel in the Operation column.
Export a custom image
You can export an image to an Object Storage Service (OSS) bucket in the ENS console, and download the image from the OSS bucket to your local device for local image analysis and local backup.
Before you export an image, make sure that you have created an OSS bucket in the China (Beijing) region. For more information about how to create an OSS bucket, see Create buckets.
On the Custom image tab, find the custom image that you want to export and click Export in the operating column.
If you export an image for the first time, you must log on to the Resource Access Management (RAM) console with an Alibaba Cloud account and authorize ENS to access OSS resources. This way, ENS assumes the AliyunENSImageExportDefaultRole role to access OSS resources. If ENS is authorized to access OSS resources, this step is automatically skipped.
In the Cloud Resource Access Authorization dialog box, click Authorize.
On the Cloud Resource Access Authorization page, confirm that AliyunENSImageImportDefaultRole and AliyunENSImageExportDefaultRole are displayed. Then, click Confirm Authorization Policy.
In the Export Image dialog box, configure the OSS Bucket Address parameter and click Export.
Delete a custom image
To ensure service availability, you can delete only custom images that are stopped.
You can retain up to 10 custom images for ENS. If the number of custom images exceeds the limit, we recommend that you delete custom images that you no longer use.
After you delete a custom image, the backups of the image on all edge nodes are deleted. Proceed with caution.
On the Custom image tab, find the custom image that you want to delete and click delete in the operating column.
In the message that appears, click OK.