This topic describes considerations for exporting images and how to export Alibaba Cloud custom images.

Prerequisites

  • Make sure that you have enabled OSS, and that an OSS bucket is available in the same region as your custom image. For more information, see Create a bucket.
    Note Exporting a custom image will incur OSS storage and traffic download fees. For more information, see Billing items and methods.
  • This operation cannot export custom images that were created from Alibaba Cloud Marketplace images.
  • Custom images to be exported cannot contain Windows Server operating systems.
  • Custom images to be exported can only contain snapshots of up to four data disks. The size of each data disk cannot exceed 500 GiB.

Background information

Before you export a custom image, note the following considerations:
  • If an exported custom image contains data disk snapshots, multiple objects appear in your OSS. Objects whose name contains system are system disk snapshots. Objects whose name contains data are data disk snapshots. The identifier of a data disk snapshot is the mount point of the source data disk, for example, xvdb and xvdc.
  • When using exported images to create instances with the same configurations, you must confirm that the storage location and storage space division of files recorded in /etc/fstab are consistent with the exported data disk snapshot information.
  • The time it takes to export a custom image depends on the size of the image and the number of ongoing export tasks in the queue.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Images.
  3. In the top navigation bar, select a region.
  4. Find the custom image you want to export. In the Actions column corresponding to the image, click More and choose Export Image from the shortcut menu.
    1. In the Export Image dialog box that appears, click Confirm Address.
      export_image
    2. On the Cloud Resource Access Authorization page, click Confirm Authorization Policy to allow ECS to access your OSS resources.
  5. Return to the ECS console homepage and go to the Images page again. Find the custom image you want to export. In the Actions column corresponding to the image, click More and choose Export Image from the shortcut menu.
  6. In the Export Image dialog box, configure the following parameters:
    • OSS Bucket Address: Select an OSS bucket that belongs to the same region as the custom image.
    • OSS Object Prefix: Set the prefix of the object name for the custom image. For example, if you set Demo as the prefix, the exported image displayed in the OSS bucket is named Demo-[Automatically generated object name].
  7. Click OK to export the custom image.

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

What to do next

  • Log on to the OSS console to query the result of the export task.
  • Download the custom image. For more information, see Download objects.
    Note The default format of exported custom images is .raw.tar.gz, and the format of the decompressed images is .raw. If your local computer runs on a Mac OS X system, we recommend that you use GNU Tar to decompress the images.