Creating a Data Disk Image from an External Image File

Scenarios

A data disk image contains only service data. You can create a data disk image using a local image file or an external image file (image file on another cloud platform). Then, you can use the data disk image to create EVS disks and migrate your service data to the cloud.

Background

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

**Figure 1** Creating a data disk image from an external image file

Figure 1 Creating a data disk image from an external image file

  1. Prepare an external image file. The file must be in VHD, VMDK, QCOW2, RAW, VHDX, QCOW, VDI, QED, ZVHD, or ZVHD2 format. If you want to use an image file in other formats, convert the file into any of the listed formats before importing it to the cloud platform.

  2. When uploading the external image file, you must select an OBS bucket with standard storage. For details, see Uploading an External Image File.

  3. Create a data disk image. For details, see Procedure.

  4. Use the data disk image to create data disks. For details, see Follow-up Procedure.

Procedure

  1. Access the IMS console.

    1. Log in to the management console.

    2. Under Computing, 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 Import Image for Type and then select Data disk image for Image Type.

    3. Select the bucket storing the image file from the list and then select the image file.

      **Figure 2** Creating a data disk image

      Figure 2 Creating a data disk image

    4. To register the image file using Fast Create, select Enable Fast Create.

      Note

      • Currently, fast import is only available for ZVHD2 and RAW image files.

      • For how to convert image file formats and generate bitmap files, see Fast Import of an Image File.

      After you select Enable Fast Create, select the confirmation information following Image File Preparation if you have prepared the required files.

    5. In the Image Information area, set the following parameters.

      • OS Type: The value is Windows or Linux.

      • Data Disk: The value ranges from 1 GB to 2048 GB and must be no less than the data disk capacity in the image file.

      • Name: Enter a name for the image.

      • (Optional) Encryption: If you want to encrypt the image, select KMS encryption and then select the key to be used from the key list.

      • (Optional) Tag: Set a tag key and a tag value for the image to easily identify and manage it.

      • (Optional) Description: Enter description of the image.

    6. Click Create Now.

    7. Confirm the settings and click Submit.

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

    When the image status changes to Normal, the image creation is complete.

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.

    Note

    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

    Figure 3 Adding data disks