• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. User Guide
  4. Creating a Private Image
  5. Creating a Linux System Disk Image Using an External Image File
  6. Overview

Overview

Application Scenarios

If you have an external Linux image file that meets the type and OS requirements listed in External Image Files and Supported OSs, you can use it to create a private Linux image.

Creation Process

To initialize an image, delete network rule files, configure the NIC attribute, and install and configure Cloud-Init.

For details, see What Initial Configuration Needs to Be Performed on the Server or Image File Before It Is Used to Create an Image?

The procedure for creating a private image using an external image file varies depending on whether the image file has been initialized.

  • If the external image file has been initialized, the procedure for creating a private image is as follows.
    Figure 1 Initialized image file

    The procedure is as follows:

    1. Upload the external image file to your OBS bucket. For details, see Uploading an External Image File.
    2. On the management console, select the uploaded image file and register it as a private image. For details, see Registering an Image File as a Private Image.
  • If the external image file has not been initialized, the procedure for creating a private image is as follows.
    Figure 2 Uninitialized image file

    The procedure is as follows:

    1. Upload the external image file to your OBS bucket. For details, see Uploading an External Image File.
    2. On the management console, select the uploaded image file and register it as a private image that has not been initialized. For details, see Registering an Image File as a Private Image.
    3. Use the private image to create an ECS. For details, see Creating an ECS.
    4. Log in to the ECS created in 3 remotely and configure it. For details, see Configuring an ECS.
      NOTE:

      For Linux ECSs, you must install the xen-pv and VirtIO drivers and load them in initrd.

    5. Create a private image using the ECS. For details, see Creating a Linux Private Image from an ECS.

Constraints

  • External image files in QCOW2 format cannot be encrypted.
  • The size of external image files must not exceed 1 TB. If an image file is larger than 128 GB, you need to change the file format to ZVHD2 or RAW and use the fast image creation function.
    • The fast image creation function is only available for image files in RAW or ZVHD2, and the size of image files must be less than 1 TB.
    • Before using fast image creation to import RAW image files, ensure that image files have been optimized and that bitmap files have been generated for each image file.
    • Before using fast image creation to import ZVHD2 image files, ensure that image files have been optimized.
  • For a Linux OS, the /etc/fstab file cannot contain configuration items for automatic data disk attaching. Otherwise, ECSs created using the private image cannot be logged in to.
  • The system disk size in external image files is from 1 GB to 1024 GB.
  • Ensure that each image file contains the password or certificate used to log in to the ECS created using the image, or ensure that Cloud-Init has been installed and configured in the image file.
  • Each external image file must contain user root and its password. In subsequent operations, you may use the username and password to log in to and configure the ECS.
  • To protect ECSs created from an external image file against attacks, ensure that the initial password of the image file contains at least the following types of characters:
    • Uppercase letters
    • Lowercase letters
    • Digits
    • Special characters, including !@$%^-_=+[{}]:,./?
  • External image files must support the Integrated Drive Electronics (IDE) and ParaVirtual OPerationS (PVOPS) device driver, which is automatically loaded when the system starts.
  • To create high-performance ECSs, ensure that external image files support VirtIO drivers, and the drivers automatically load upon system boot.
  • The boot partition and system partition of external image files must be on the same disk.
  • BIOS must be selected as the boot mode during image creation.
  • If disks in an external image file use specific encryption mechanisms, ECSs created using the private image registered from the external image file may become unavailable.
  • Some default drivers are not supported on the cloud platform. Therefore, you cannot use external image files with OEM OSs to create private images.
  • OSs in external image files cannot be bound to specified hardware.
  • OSs in external image files must support full virtualization.
  • If an external image file uses Logical Volume Manager (LVM) as the system disk, ECSs created using the private image registered from the external image file do not support file injection.
  • When uploading external image files to an OBS bucket, you must select one with Standard storage.