Error: "Unable to get NSX related data from inventory" during NSX Edge deployment in SDDC Manager
search cancel

Error: "Unable to get NSX related data from inventory" during NSX Edge deployment in SDDC Manager

book

Article ID: 430413

calendar_today

Updated On:

Products

VMware SDDC Manager

Issue/Introduction

NSX Edge deployment through SDDC Manager fails during the "Obtain SDDC Manager Inventory Data" task.

The following error details are observed in the SDDC Manager UI: 

Message: Unable to get NSX related data from inventory
Cause: Cannot invoke "com.vmware.vim.binding.vmodl.ManagedObjectReference.getValue()" because the return value of "com.vmware.evo.sddc.common.client.vmware.vsphere.VcManagerBase.getDatastoreMorByName(String)" is null

In the /var/log/vmware/vcf/domainmanager/domainmanager.log:

INFO  [vcf_dm,1234abcd,e653] [c.v.e.s.c.c.v.v.VcManagerBase,dm-exec-15] [1234abcd] Attempting to retrieve MoRef for Datastore: <Datastore Name>
ERROR [vcf_dm,1234abcd,e653] [c.v.e.s.o.model.error.ErrorFactory,dm-exec-15] [1234abcd] FAILED_TO_FETCH_NSXT_DATA_FROM_INVENTORY Unable to get NSX related data from inventory
com.vmware.evo.sddc.orchestrator.exceptions.OrchTaskException: Unable to get NSX related data from inventory
Caused by: java.lang.NullPointerException: Cannot invoke "com.vmware.vim.binding.vmodl.ManagedObjectReference.getValue()" because the return value of "com.vmware.evo.sddc.common.client.vmware.vsphere.VcManagerBase.getDatastoreMorByName(String)" is null

Cause

The datastore intended for the NSX Edge deployment was renamed directly in vCenter Server creating a mismatch of data in the SDDC Manager deployment workflow. When the SDDC Manager Domain Manager service attempts to retrieve the Managed Object Reference (MoRef) using the original datastore name, vCenter Server returns null.

Resolution

To resolve the issue, follow the below steps:

  1. Log in to the SDDC Manager appliance via SSH as the vcf user and switch to root.
  2. Inspect the Domain Manager logs to identify the exact datastore name the workflow expects by executing the following command:
    grep -i -C 5 "getDatastoreMorByName" /var/log/vmware/vcf/domainmanager/domainmanager.log
  3. Identify the target datastore string from the command output.
  4. Log in to the vSphere Client and navigate to the Storage view.
  5. Locate the target datastore and rename it to exactly match the string identified in step 2 so it matches the expected state in the SDDC Manager database.
  6. Return to the SDDC Manager UI and retry the failed NSX Edge deployment task.

Additional Information

Note: Components of vSAN should not be changed manually. SDDC expects the vSAN datastore to follow a strict naming convention (usually vsanDatastore or <ClusterName>-vsanDatastore depending on SDDC version.

From SDDC 5.2 onwards, VMware Cloud Foundation 5.2 Release Notes Out of Band changes from vCenter can be manually synced with SDDC Manager. This includes inventory changes (for example, adding a host to a cluster) and object name changes (for example, datacenter name, datastore name, port group name).