Help Center/ Huawei Cloud Flexus_Huawei Cloud Flexus L Instance/ FAQs/ OS and Image/ What Should I Do If a Private Image Cannot Be Used to Create a FlexusL Instance or Change the OS of a FlexusL Instance Because the Password Reset Plug-in Is Not Installed on the Image or the Image's onekey_resetpasswd Tag Is Missing?
Updated on 2024-12-04 GMT+08:00

What Should I Do If a Private Image Cannot Be Used to Create a FlexusL Instance or Change the OS of a FlexusL Instance Because the Password Reset Plug-in Is Not Installed on the Image or the Image's onekey_resetpasswd Tag Is Missing?

Symptom

When you use a private image to create a FlexusL instance or change the OS, the message "This image has no password reset plug-in installed or onekey_resetpasswd tagged." is displayed.

If your private image is not displayed in the private image list of the FlexusL instance, check whether the private image and the FlexusL instance are in the same region. Images are regional resources. FlexusL instances can only be created from private images that are in the same region with them.

Possible Causes

If a private image is created from a server on another cloud platform or downloaded from a third party, the private image may fail to be used to create a FlexusL instance or change the OS of an instance because the password reset plug-in is not installed on the image or the onekey_resetpasswd tag is missing. Perform the following steps to rectify the fault:

Step 1: Check Whether the Private Image Lacks the onekey_resetpasswd Tag

  1. Query and copy the ID of the private image on the IMS console.

  2. Locate the ListImages API in API Explorer. Enter the image ID to check whether the private image contains the onekey_resetpasswd tag.
    1. Set the following parameters:
      • Region: Select the region where the private image is located.
      • ID: Enter the private image ID.
      Figure 1 Selecting a region
      Figure 2 Entering the private image ID
    2. Click Debug to view the result.

      If the __os_feature_list parameter is displayed in the response body and its value contains \"onekey_resetpasswd\": \"true\", the private image contains the onekey_resetpasswd tag. Otherwise, the onekey_resetpasswd tag is not contained, as shown in the following figure.

      If the private image does not contain the onekey_resetpasswd tag, add the tag to the private image by referring to 3.

      Figure 3 The onekey_resetpasswd tag not contained in the private image
  3. Add the onekey_resetpasswd tag for the private image.
    1. Set the following parameters in the UpdateImage API:
      • Region: Select the region where the private image is located.
      • image_id: Enter the private image ID.
      • Body: Click Edit Code and enter the following content:
      [
        {
          "op": "add",
          "path": "/__os_feature_list",
          "value": "{\"nic_hotplug\":\"true\", \"disk_hotplug\": \"true\", \"user_data\": \"true\", \"ssh_key\":\"true\", \"hostname_inject\": \"true\", \"onekey_resetpasswd\": \"true\"}"
        }
      ]
    2. Click Debug and then view the result.

      The __os_feature_list parameter is displayed in the response body and its value contains \"onekey_resetpasswd\": \"true\", which means that the private image contains the onekey_resetpasswd tag.

  4. Refresh the page for creating a FlexusL instance or changing the OS of an instance, and select the private image again.

    Refresh the page before you select the private image.

Step 2: Check Whether the Password Reset Plug-in Is Installed in the Private Image

After using a private image to create a FlexusL instance or change the OS of an instance, set the password of the FlexusL instance on the console.