Help Center> Image Management Service> Getting Started> Scenario 2: Creating a Linux System Disk Image from an External Image File
Updated on 2024-06-13 GMT+08:00

Scenario 2: Creating a Linux System Disk Image from an External Image File

You can import a local image or a system disk image from another cloud platform. After an image is imported, you can use it to create an ECS or reinstall the OS of an existing ECS.

This guide describes how to create a Linux system disk image from an external image file.

Step1: Prepare an Image File

You need to prepare an image file that meets the following requirements:

  • OS: SUSE, Oracle Linux, Red Hat, Ubuntu, etc. (32-bit or 64-bit)
  • Image format: VMDK, VHD, QCOW2, RAW, VHDX, QED, VDI, QCOW, ZVHD2, or ZVHD
  • Image size: no larger than 128 GB. If the image size is between 128 GB and 1 TB, convert the image file into the RAW or ZVHD2 format and import the image through fast import.
  • Network: Files in the network rule directory are deleted and DHCP is configured for the NICs.
  • Tools: Cloud-Init has been installed.
  • Drivers: Native Xen and KVM drivers have been installed.
  • File system: The disk identifier in the GRUB configuration file and fstab file are set to UUID.

    Click here to learn more about the file restrictions and how to check and configure an image file.

Step 2: Upload the Image File

You are advised to use OBS Browser+ to upload external image files to an OBS bucket. For details, see OBS Browser+ Best Practices.

For how to download OBS Browser+, see Downloading OBS Browser+.

Figure 1 Uploading an image file

Step 3: Register the Image File as a Private Image

  1. Log in to the management console. In the service list, choose Compute > Elastic Cloud Server.
  2. In the upper right corner of the page, click Create Image. Configure the parameters.
    Figure 2 Importing an image file
    Figure 3 Image information
  3. Read and agree to the image disclaimer. Click Next.
  4. Confirm the parameter settings and click Submit.
  5. Go back to the private image list. When the image status changes to Normal, the image is created successfully.

Follow-up Procedure

After a system disk image is created, you can use it to create an ECS or change the OS of an existing ECS. This way, you can migrate data from a server to another. For details, see:

For more information, see Creating a Linux System Disk Image from an External Image File.