Help Center/ Image Management Service/ User Guide/ Creating a Private Image/ Creating a Data Disk Image from an ECS
Updated on 2024-07-30 GMT+08:00

Creating a Data Disk Image from an ECS

Scenarios

A data disk image contains only service data. You can create a data disk image from an ECS and then use the image to create new EVS disks. This is a convenient way to migrate data from an ECS to EVS disks.

You are advised to use data disk images in the following scenarios:
  • Migrate service data on an ECS to another account.

    Create a data disk image from the data disk and share the image with the target account. Then you can use the data disk image under the account to create data disks, completing the service data migration.

  • Migrate service data on an ECS to another region.

    Create a data disk image from the data disk in the current region and replicate the image to the target region (for details, see Replicating Images Across Regions). Then you can use the data disk image in the target region to create data disks, completing the service data migration.

For example, you can create a data disk image to clone the data of an ECS whose disk is about to expire.

Background

The following figure shows the process of creating a data disk image from an ECS.

Figure 1 Creating a data disk image and using it to create data disks

Prerequisites

  • A data disk has been attached to the ECS, and the ECS is running or stopped. For details about how to attach a data disk, see Elastic Cloud Server User Guide.
  • The data disk capacity of the ECS must be no greater than 1 TB.

    If the capacity is greater than 1 TB, you can only use the ECS to create a full-ECS image.

Procedure

  1. Access the IMS console.

    1. Log in to the management console.
    2. Under Compute, click Image Management Service.

      The IMS console is displayed.

  2. Create a data disk image.

    1. Click Create Image in the upper right corner.
    2. In the Image Type and Source area, select Create Image for Type and then select Data disk image for Image Type.
    3. Select ECS for Source and then select a data disk of the ECS.
      Figure 2 Creating a data disk image
    4. In the Image Information area, set Name, Tag, and Description, and select an enterprise project.

      If the data disk is not encrypted, the private image created from it is also not encrypted. The encryption attribute cannot be changed during image creation. After the image is created, you can change its encryption attribute based on Replicating Images Within a Region.

      If your organization has configured tag policies for images, you need to add tags to your images based on the policies. If you do not comply with the tag policies, images may fail to be created. Contact the organization administrator to learn more about the tag policies.

      • Each tag consists of a key and a value. The key contains a maximum of 36 characters, and the value contains a maximum of 43 characters. The key cannot be left blank or an empty string. The value cannot be left blank but can be an empty string.
      • An image can have a maximum of 10 tags.
    5. Click Next.
    6. Confirm the settings. Read the image disclaimer and select I have read and agree to the Image Disclaimer, and click Submit.

      The private image list is displayed. Wait until the data disk image is created successfully.

  3. Go back to the Private Images page and view the new data disk image.

Follow-up Procedure

If you want to use the created data disk image to create an EVS disk and attach it to an ECS, you can perform either of the following operations:

  • Locate the row that contains the created data disk image and click Create Data Disk to create one or multiple data disks. Then attach the data disks to an ECS.
  • On the page for creating ECSs, click Create Disk from Data Disk Image and select the data disk image.

    In this way, a data disk image can be used to create a data disk for an ECS only once. For example, a data disk created from data disk image data_disk_image has been added to the ECS. No any other data disk created from this image can be added to the ECS.

    Figure 3 Adding data disks