All Products
Search
Document Center

Elastic Compute Service:Export a custom image

Last Updated:Apr 14, 2025

After you create a custom image, you can export the image files to an Object Storage Service (OSS) bucket in the Elastic Compute Service (ECS) console. Then, you can download the image files from the OSS bucket to your computer for analysis and backup. This topic describes how to export a custom image and the items that you must consider when you export the image.

Usage notes

Prerequisites

  • OSS is activated.

  • An OSS bucket is created in the region where the custom image that you want to export resides. For more information, see Create a bucket.

  • The AliyunECSImageExportDefaultRole role is assigned to ECS to grant access to OSS resources.

    image

Limits

Limit

Description

Image format

You cannot export custom images that are derived from Alibaba Cloud Marketplace images.

Operating system

You cannot export custom images for Windows Server.

Number and capacity of data disks

  • You can export custom images that contain snapshots of up to four data disks.

  • The capacity of each data disk cannot exceed 500 GiB.

    Note

    If the capacity of a data disk exceeds 500 GiB, you must distribute the data on the disk to multiple data disks that are less than 500 GiB in size. Then, create and export custom images from the smaller data disks.

Considerations

Consideration

Description

Export fee

Exported image files are stored in OSS buckets. You are charged for the storage of files in the buckets, the data transfers that occur when you download files from the buckets, and write or read calls. For information about OSS billing, see Billing overview.

Export duration

The time required to export a custom image varies based on the size of the image files and the number of concurrent export tasks in the queue.

Exported image files

If an exported custom image contains data disk snapshots, multiple image files are generated and stored as objects in the same OSS bucket.

Note

Files whose names contain system are system disk snapshots. Files whose names contain data are data disk snapshots. The identifiers of data disk snapshots are the mount points of the source data disks, such as xvdb and xvdc.

Others

  • To create identical Linux instances by using an exported image, make sure that the file system information recorded in the /etc/fstab directory is the same as the exported data disk snapshot information.

  • If you create a custom image based on a cloud disk that does not contain data and export the image, the decompressed image file also does not contain data.

  • Custom images exported from ECS may not start as expected on other platforms. To obtain data, you can attach the disks contained in the images.

Procedure

Use the ECS console

  1. Go to ECS console - Images.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. 地域

  3. On the Custom Images tab, find the custom image that you want to export and click Export Image in the Actions column.

  4. In the Make Preparations step, read the precautions for exporting images and click Next. In the message box that appears, confirm that you completed the prerequisites and click Continue.

  5. In the Export Image File step, configure the following parameters:

    image

    • Image Format: Select the format in which you want to export the custom image. Valid values: Auto-detect, RAW, VHD, QCOW2, VDI, and VMDK. Default value: Auto-detect.

      Note
      • The Image Format parameter is available only in the following regions: India (Mumbai) Closed Down, Japan (Tokyo), Australia (Sydney), Indonesia (Jakarta), Germany (Frankfurt), UAE (Dubai), US (Virginia), UK (London), Singapore, US (Silicon Valley), and Malaysia (Kuala Lumpur).

      • By default, images are exported in the RAW format in regions where the Set Exported Image Format feature is not supported.

    • OSS Bucket(OSS Bucket): Select an OSS bucket in the same region as the custom image.

    • Image File Name Prefix: Enter a prefix for the OSS object names of each exported image file.

      For example, if you enter Demo as a prefix, the name of each exported image file in the specified OSS bucket is Demo-[Automatically generated object name].

  6. Click OK to export the custom image.

    The time required to export a custom image varies based on the size of the image files and the number of concurrent export tasks in the queue. You can go to the Task Management page in the ECS console to query the task progress by task ID or log on to the OSS console to query the task progress.

    You can cancel an image export task at any time before the task is completed. Go to the Task Management page in the ECS console, find the task in the specified region, and then cancel the task.

Call an API operation

Call the ExportImage operation to export a custom image to an OSS bucket in the same region.

Note

You can call the CancelTask operation to cancel an ongoing image export task.

What to do next

You can download the exported image files from the specified OSS bucket to your computer. For more information, see Simple download.

Note

If you selected the RAW format when you exported the custom image, the default name extension of the exported image files is .raw.tar.gz and the name extension of the decompressed image files is .raw. If your computer runs Mac OS X, we recommend that you use GNU Tar to decompress the image files.