HCX OSAM Migration fails with Error "JSONArray[0] not found"
search cancel

HCX OSAM Migration fails with Error "JSONArray[0] not found"

book

Article ID: 441046

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

 

  • You are attempting to migrate a virtual machine system using HCX OS Assisted Migration (OSAM).

  • The migration fails during the initial source collection phase.

  • The HCX user interface or API returns the error: "Failed to obtain source VM configuration. JSONArray[0] not found."

 

Environment

Vmware HCX 

Cause

This issue occurs due to a known race condition within the Sentinel agent code running on the source Guest OS. During initialization, this race condition causes the agent to fail to capture the /boot/efi partition details.

Because the /boot/efi mount point is missing from the generated sentinel.json configuration file, the HCX Manager cannot parse the partition array (resulting in the JSONArray[0] not found exception) and safely aborts the migration.

Resolution

To resolve this issue, you must manually restart the HCX Sentinel service on the source RedHat 9.4 virtual machine to force it to regenerate the configuration file.

  1. SSH or log in to the console of the source virtual machine Guest OS.

  2. Execute the following command with root privileges to restart the Sentinel service:

    systemctl restart vmware-hcx-osam-sentinel.service
  3. Once the service restarts, return to the HCX UI and retry the OSAM migration.

Verification

You can verify the workaround was successful by inspecting the /opt/vmware/hcx-osam/sentinel.json file on the source Guest OS after restarting the service. You should now see the /boot/efi filesystem block properly populated:

{
            "fsName" : "/boot/efi",
            "baseBlockdevId" : "####-####-####-####-####",
            "fsType" : "FAT32",
            "fsLabel" : null,
            "fsUuid" : "####-####",
            "fsSize" : 973948,
            "fsUsage" : 1,
            "fsAttributes" : [ {
              "provider" : "__system__",
              "attributes" : [ {
                "attrValue" : "redhat",
                "attrName" : "__DISTRO__"
              }, {
                "attrValue" : "9",
                "attrName" : "__MAJOR__"
              }, {
                "attrValue" : "4",
                "attrName" : "__MINOR__"
              } ]
            } ]
          }