Help Center> Bare Metal Server> User Guide> Image> Creating a Private Image from an External Image File

Creating a Private Image from an External Image File

Scenarios

You can create and register a private image using an external image file. Figure 1 shows the procedure.

Figure 1 Creating a private image from an external image file

The procedure contains the following steps:

  1. Prepare an image file. For details, see Bare Metal Server Private Image Creation Guide.
  2. Upload the image file to your OBS bucket. For details, see Upload an External Image File.
  3. On the management console, select the uploaded image file and register it as a private image. For details, see Register a Private Image.

Upload an External Image File

You can import an image file in VHD, VMDK, QCOW2, RAW, VHDX, QCOW, VDI, QED, ZVHD, or ZVHD2 format to create a private image.

Use OBS Browser+ to upload external image files. For details, see OBS Browser+ Best Practices.

When uploading the external image file, you must select an OBS bucket with standard storage.

Download OBS Browser+ from the following link:

https://support.huaweicloud.com/en-us/browsertg-obs/obs_03_1003.html

Register a Private Image

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

    The IMS console is displayed.

  3. Click Create Image in the upper right corner.
  4. Configure the following information:

    Image Type and Source

    • Type: Select System disk image.
    • Source: Select Image file.

      In the bucket list, select the bucket that stores the image file and select the image file.

    Image Information

    • Function: Select BMS system disk image.

      Ensure that you have completed initialization configuration on the image file by following the instructions in Bare Metal Server Private Image Creation Guide.

    • OS: (Optional) Select the OS of the image file.

      To ensure that the image can be created and used properly, select the OS consistent with that of the image file.

    • System Disk (GB): Set the system disk size. You are advised to set the value to the image system disk size plus 2 GB.
    • Name: Enter a name for the image to be created. The value can contain only letters, digits, spaces, hyphens (-), underscores (_), and periods (.), and cannot start or end with a space.
    • Enterprise Project: Select an enterprise project from the drop-down list. This parameter is available only when you have enabled the enterprise project function, or your account is an enterprise account. To enable this function, contact your customer manager.
    • Tag: (Optional) Add a tag to the image to identify and manage the image more easily.
    • Description: (Optional) Enter description of the image.
  5. Click Next.

    On the displayed Details page, confirm the configuration and click Submit.

  6. Return to the image list. If the status of the private image changes to Normal, the private image is registered successfully.

    The time required for registering a private image varies depending on the size of the image file.

Follow-up Operations

You can use the private image to create a BMS by following the instructions in Creating a BMS Using a Private Image.

If the private image is used to create a c6.22xlarge.physical BMS, you need to add the __support_c6_22xl_physical tag for the image through an API.

  1. Obtain the token. For details, see Authentication.
  2. Add the __support_c6_22xl_physical tag for the image. For details, see Updating Image Information.
    1. Add X-Auth-Token to the request header.

      The value of X-Auth-Token is the token obtained in 1.

    2. The request URI is in the following format:

      PATCH /v2/cloudimages/{image_id}

      The request body is as follows:
      [
          {
              "op": "add",
              "path": "/__support_c6_22xl_physical",
              "value": "true"
          }
      ]