The lifecycle of an image starts when the image is created, and ends when the image is deleted. This topic provides answers to some frequently asked questions (FAQ) about the Elastic Compute Service (ECS) image-related operations that you can perform during the image lifecycle. The operations include creating images, copying images, sharing images, and deleting images.
FAQ about creating images
FAQ about copying images
FAQ about encrypting images
FAQ about sharing images
FAQ about importing images
How do I view the progress of importing an image? How long does it take to import an image?
Can I use an internal endpoint of Object Storage Service (OSS) to import custom images?
How do I convert ISO files to image formats that are supported by ECS?
Which permissions are required to upload image files to OSS?
FAQ about exporting images
FAQ about deleting images
Can I use a snapshot of a data disk to create a custom image?
No, data disk snapshots cannot be used to create custom images. Custom images can be created only from system disk snapshots, not from data disk snapshots. However, you can add data disk snapshots when you use a system disk snapshot to create a custom image. For more information, see Create a custom image from a snapshot.
How do I view the progress of creating a custom image from an instance? How long does it take to create the custom image?
You can view the progress of creating a custom image on the Images page of the ECS console. The amount of time required to create a custom image from an instance varies based on the total size of disks on the instance. Wait until a snapshot is created for each disk before you can use the image. For more information, see Create a custom image from an instance.
When do I need to copy a custom image?
Each custom image is tied to a region and can be used only in that region. You can copy a custom image and use the image copy for the following purposes:
Deploy the applications that are hosted on the source instance of the custom image to multiple regions.
Migrate the source instance of the custom image to another region.
Use the custom image across regions.
Change the encryption status of the custom image, encrypt system disk data, or encrypt operating system data.
For more information, see Copy a custom image.
Which images can be copied?
Only custom images can be copied. Public images, Alibaba Cloud Marketplace images, and images that are shared from other accounts cannot be copied.
How long does it take to copy an image?
When you copy an image across regions, the image file is transmitted from the source region to the destination region. The amount of time required to copy a custom image varies based on the network transfer rate and the number of queued transfer tasks.
To copy a large image (for example, an image larger than 2 TiB in size) across regions, you can copy the associated snapshots to the destination region and then create a custom image from the snapshot copies in the destination region. This procedure is faster than directly copying the image. For more information, see Copy a snapshot and Create a custom image from a snapshot. For information about snapshot billing, see Snapshots.
Can I copy a custom image that is derived from an Alibaba Cloud Marketplace image across regions?
If an Alibaba Cloud Marketplace image exists in a region, you can copy the custom images that are derived from the Alibaba Cloud Marketplace image to the region. If an Alibaba Cloud Marketplace image does not exist in a region, the error message that is shown in the following figure appears when you copy a custom image that is derived from the Alibaba Cloud Marketplace image to the region.
How many images can be shared with me?
Up to 100 images can be shared with you. You can go to the ECS console to view and increase image quotas. For more information, see View and increase resource quotas.
How many users can an image be shared with?
An image can be shared with up to 50 users. If you want to increase the quota, submit a ticket.
I have accounts on different Alibaba Cloud sites. Can I share images among these accounts?
Images cannot be shared between accounts on the China site and accounts on the international site.
What are the risks of sharing images?
Sharing images pose risks of data leakage and software theft. Before you share an image with other accounts, make sure that the image does not contain sensitive or important data and software. After you share an image with other accounts, the accounts can use the image to create ECS instances, which can then be used to create more custom images. During this process, data can be repeatedly spread. This poses data leakage risks.
Alibaba Cloud does not guarantee the integrity and security of images that are shared by other accounts. We recommend that you select only images that are shared by trusted accounts. When you create an ECS instance from a shared image, log on to the ECS instance to check the security and integrity of the image.
The owner of an image can check how the image is shared and delete the image. After a shared image is deleted by the image owner, the system disks of the instances that use the image cannot be re-initialized.
After an account shares an image with me, can I share the image with another account?
No, you cannot directly share the image with other accounts. You can copy the shared image to create a custom image and then share the custom image with other accounts.
How do I share an image with another account across regions?
You can share an image with an account, and then the account can copy the shared image to the destination region. Alternatively, you can copy the image to the destination region and then share the image copy with an account. For more information, see Copy a custom image and Share a custom image.
Can the system disks of ECS instances be encrypted by using KMS keys? How do I use Terraform or Packer to encrypt system disks?
Yes, the system disks of ECS instances can be encrypted with default service keys or custom keys in KMS. For more information, see Encrypt a system disk.
In Packer, configure the
image_encrypted
parameter to encrypt system disks. For more information, see Alicloud Image Builder.In Terraform, configure the
encrypted
parameter to encrypt system disks. For more information, see alicloud_disks.
What limits apply when I use the Copy and Encrypt feature to copy an image?
Ensure that KMS is activated. For more information, see Activate KMS.
You need to set Copy Mode to Copy and Encrypt.
Before you use a custom KMS key, create a custom key in KMS. For more information, see Create a CMK.
What permissions are required to share an encrypted image?
Before you can share an encrypted image with other Alibaba Cloud accounts or within your organization based on resource directories, create a Resource Access Management (RAM) role named AliyunECSShareEncryptImageDefaultRole
and grant required permissions to the role. For more information, see Share an encrypted custom image.
How do I view the progress of importing an image? How long does it take to import an image?
To view the progress of importing an image to a region, select the region and go to the Images or Task Logs page in the ECS console.
The amount of time that is required to import an image varies based on the image size and the number of queued import tasks. For more information, see Import a custom image.
The license subscriptions of ECS instances that were created from an imported bring-your-own-license (BYOL) image expire. How do I purchase licenses that are provided by Alibaba Cloud for the instances?
To purchase licenses that are provided by Alibaba Cloud for the instances, replace the BYOL image on the instances with an Alibaba Cloud image. You can make the image replacement by replacing the operating systems of the instances.
For Windows Server operating systems, you can use Alibaba Cloud public images. For information about Alibaba Cloud public images, see Overview of public images.
For SQL Server and Red Hat operating systems, you can use Alibaba Cloud Marketplace images. For more information, see Use Alibaba Cloud Marketplace images.
Can I use an internal URL provided by OSS to import custom images?
No, you cannot use the internal URLs provided by OSS to import custom images. To import an image, use the public URL of the image object generated when you share the image object. If you use the internal URL of an object to import an image, an error is reported.
For information about how to obtain the URL of an image object, see Share objects.
For information about the internal endpoint of OSS, see Obtain the internal endpoint of OSS.
How do I convert ISO files to image formats that are supported by ECS?
An ISO file need to be converted to an image format that is supported by ECS before the file can be imported to ECS.
Use tools such as VirtualBox to create an image based on an ISO file on premises.
Convert the image to a format that is supported by ECS, such as RAW, VHD, and QCOW2.
For more information, see Import a custom image.
How do I upload on-premises image files to ECS?
For more information, see Import a custom image.
Which permissions are required to upload image files to OSS?
If you are using an Alibaba Cloud account, you can directly upload image files to OSS. For more information, see Upload image files to OSS.
If you are using a RAM user, contact the Alibaba Cloud account owner to grant you the operation permissions on OSS buckets. For more information, see Grant permissions for different scenarios.
How do I download image files to an on-premises device?
You can use the image export feature to export image files to an on-premises device. For more information, see Export a custom image.
Can an image exported from ECS start on other platforms?
Images that are exported from ECS and then downloaded to on-premises devices may not start as expected on other platforms. You can attach the disks that are contained in the downloaded images on the on-premises devices to obtain data.
After I share a custom image or use the image to create ECS instances, can I delete the image? What is the impact of deleting the image?
After you share a custom image or use the image to create ECS instances, you can only force delete the image.
If you share Image M with Alibaba Cloud Account A and then delete the image, the following situations occur:
Account A can no longer query Image M in the ECS console or by calling ECS API operations.
Account A can no longer use Image M to create ECS instances or replace system disks.
If Account A created ECS instances from Image M, the system disks of the instances can no longer be re-initialized.
For more information, see Delete a custom image.
When I delete an image, I am prompted with a message similar to "The specified image cannot be deleted because it is associated with instances." Why?
You may have used the image to create ECS instances. To delete the image, select Forcefully Delete Image. After an image is force deleted, instances created from the image remain available, but the system disks of the instances cannot be re-initialized. For more information, see Re-initialize a system disk. For more information, see Delete a custom image.