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 inventoryCause: 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 inventorycom.vmware.evo.sddc.orchestrator.exceptions.OrchTaskException: Unable to get NSX related data from inventoryCaused 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
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.
To resolve the issue, follow the below steps:
SSH as the vcf user and switch to root.grep -i -C 5 "getDatastoreMorByName" /var/log/vmware/vcf/domainmanager/domainmanager.logNote: 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).