Help Center> Image Management Service> Getting Started> Scenario 2: Creating a Linux System Disk Image from an External Image File
None

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 to the current cloud system. After the image is imported, you can use it to create ECSs or reinstall the OSs of existing ECSs.

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

Step 1: Prepare an Image File

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

  • OS: SUSE, Oracle Linux, Red Hat, and Ubuntu (32-bit or 64-bit)

  • Image format: VMDK, VHD, QCOW2, RAW, VHDX, QED, VDI, QCOW, ZVHD2, and ZVHD

  • Image size: no greater than 128 GB. If the image size is between 128 GB and 1 TB, convert the image file to the RAW or ZVHD2 format and import the image through fast import.

  • Network capability: Files in the network rule directory are deleted and the NIC is set to DHCP.

  • Tool: Cloud-Init has been installed.

  • Driver: The native Xen and KVM drivers have been installed.

  • File system: The disk identifier in the GRUB configuration file and fstab file is set to UUID.

Note

Click here to learn more about the restrictions, check, and confrontation of a Linux system disk image file.

1

Creation process

Apply for a VPC.

View Image

Step 2: Upload the Image File

You are advised to use OBS Browser+ to upload the external image file to OBS buckets. For details, see OBS Browser+ Best Practices.

For how to download OBS Browser+, see https://support.huaweicloud.com/intl/en-us/browsertg-obs/obs_03_1003.html.

1

Uploading the image file

Select the charging mode.

View Image

Step 3: Register the Image File as a Private Image

1. Log in to the HUAWEI CLOUD console and click Image Management Service under Compute.
2. On the image list page, click Create Image in the upper right corner. Configure the following information:

Image Type and Source

  • Region: Select a region close to your services.
  • Type: Select Import Image.
  • Image Type: Select system disk image.
  • Select Image File: Select the bucket storing the image file from the list and then select the image file.

 

Image Information

  • Enable automatic configuration: It is selected by default.
  • Function: Select ECS system disk image.
  • Architecture: Select x86 or ARM.
  • Boot Mode: Select BIOS or UEFI.
  • OS: Select an OS the same as that in the image file.
  • System Disk:  Set the system disk capacity. The value must be no less than the system disk size in the image file.
  • Data Disk: Add data disks to the image. You need to prepare a data disk image file in advance.
  • Name: Enter a name for the image.
  • Encryption: If you want to encrypt the image, select KMS encryption and select the key to be used.
  • Enterprise Project: Select an enterprise project from the drop-down list.
  • Tag: Add tags for the image to easily identify and manage it.
  • Description: Enter a description of the image.

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 has been registered successfully.

1

Register the image file (1)

Obtain the instance's connection address.

2

Register the image file (2)

Download and install a client.

View Image

Step 4: Use the Image to Create ECSs

Create ECSs as instructed in Creating an ECS from an Image.

Note the following when setting the parameters:

  • Region: Select the region where the private image is located.

  • Specifications: Select a flavor based on the OS type in the image file and the descriptions in OSs Supported by Different Types of ECSs.

  • Image: Select Private image and then the created system disk image from the drop-down list.

1

Select the region

Obtain the instance's connection address.

2

Select the image

Download and install a client.

View Image

Operation Tutorials

helpcenter-videoicon Created with Sketch.

Create a System Disk Image from a Linux Image File

helpcenter-videoicon Created with Sketch.

Create a System Disk Image from a Windows ECS

helpcenter-videoicon Created with Sketch.

Video Name Example