ERROR [vcf_dm,#############,e653] [c.v.e.s.o.model.error.ErrorFactory,dm-exec-15] [1Q9B66] 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.IllegalArgumentException: Expected 1 but did not find any MORs of a type DistributedVirtualPortgroup and name VCF-edge_stale_nsx_portgroup-External-1
VMware Cloud Foundation 5.x
To resolve the issue remove the stale PortGroup from the VCF inventory using the steps below:
IMPORTANT NOTE: Make sure that backup/snapshots of the SDDC manager have been taken prior to any modification.
curl -s localhost/inventory/vds | jq
curl -s localhost/inventory/vds?id=<ID> | jq ".[0]" > vds_info.json
Example:
curl -s localhost/inventory/vds?id=######-####-####-####-##########| jq ".[0]" > vds_info.json
This should create a json with the VDS that we want to update under a file called vds_info.json.
vds_info.json with a vi editor (vi vds_info.json) and remove the json entries with the name of the stale portgroup(To edit the file, press ESC, then press i.). The information that we want to delete should be like the excerpt below. Please make sure there are no extra commas or brackets left over when removing these entries.
{
"name": "VCF-edge_stale_nsx_portgroup-External-1",
"transportType": "EXTERNAL",
"type": "EPHEMERAL",
"vlanId": 0,
"activeUplinks": [
"uplink1"
],
"standbyUplinks": [
"uplink2"
]
},
Once done save the file (ESC + :wq!)
cat vds_info.json | jq
If there is no error, it should print the json outputUpdate the vds table in the Inventory using the updated vds_info.json file using the following command:
curl localhost/inventory/vds/<id> -X PUT -d @vds_info.json -H 'Content-Type: application/json'
Example:
curl localhost/inventory/vds/######-####-####-######### -X PUT -d @vds_info.json -H 'Content-Type: application/json'
In case it still fails on the next workflow with below error:
VCF_ERRORS_GENERIC_INPUT_PARAM_ERROR Invalid parameter: {0}
Use the script to cleanup VMware Cloud Foundation NSX-T Edge Cluster Deployment Removal Tool