VMware NSX Edge VMs not present in both NSX and vCenter
search cancel

VMware NSX Edge VMs not present in both NSX and vCenter

book

Article ID: 317801

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You are running NSX-T 3.2.1.
  • You encounter an alarm: "Edge VM Not Present In Both NSX Inventory And vCenter".

  • There is no impact to the environment, unless the Edge VM is used in the dataplane while the Edge VM is not present in vCenter.

Environment

VMware NSX-T Data Center

Cause

This check was introduced to VMware NSX-T 3.2.1 to compare the Edge VM details in the NSX inventory and the vCenter (VC) inventory. There are 3 scenarios where this error can be presented: 

  1. The Edge VM is present in VC with a different moref id:
    • This can happen when the Edge VM is removed from the VC inventory and added back. When added back, the VM will obtain a new moref id from VC, however this will differ from the id in the NSX database. To confirm, use the VC MOB (managed object browser) via the URL https://hostname.yourcompany.com/mob and confirm if the VM moref id is different from the id shown in NSX alarm description.
  2. The Edge VM is no longer present in vCenter:
    • In this instance the Edge VM has been deleted from the VC, so the referenced VM in the NSX database cannot be found.
  3. Connectivity between the Edge and NSX manager was lost:
    • In certain scenarios whereby there is a loss of communication between the NSX Manager and the Edge this alarm is thrown however the periodic refresh task is skipped, so this alarm is not cleared. This can be confirmed from the NSX manager logs in var/log/proton/nsxapi.log by searching for the below error:
nsxapi.log:2022-06-27T17:21:15.160Z INFO l3-tasks1 EdgeNodeRefreshTask #### FABRIC [nsx@#### comp="nsx-manager" level="INFO" subcomp="manager"] EdgeNodeRefreshTask has started
nsxapi.log:2022-06-27T17:21:15.166Z INFO l3-tasks1 EdgeNodeRefreshTask #### FABRIC [nsx@#### comp="nsx-manager" level="INFO" subcomp="manager"] Edge node /infra/sites/default/enforcement-points/default/edge-transport-node/########-####-####-####-############ is having reconfiguration errors {VM_PLACEMENT_REFRESH_FAILED=[Fabric] Refresh edge /infra/sites/default/enforcement-points/default/edge-transport-node/########-####-####-####-############ placement configuration failed. Check network connectivity of the edge node.} so skipping refresh activity

NOTE: The preceding log excerpts are only examples. Date, time and environmental variables may vary depending on your environment.

Resolution

The issue outlined in scenario 3 is resolved in NSX-T 3.2.2 and NSX 4.1 available at Broadcom Downloads.


Workaround:

To workaround each scenario, please use the below API calls:

  • Scenario 1: The Edge VM is present in vCenter (VC) with a different moref id:
    • Use the NSX add or update placement API call. First gather to NSX inventory information using the GET https://<manager-ip>/api/v1/transport-nodes/<tn-id> API. Use the body of this API call and change the vm_id and vm_deployment_config  fields to match the new vm moref id and vSphere deployment parameters. Following these alternations, use the following POST API call:
    • POST https://<manager-ip>/api/v1/transport-nodes/<tn-id>?action=addOrUpdatePlacementReferences
  • Scenario 2: The Edge VM is no longer present in vCenter:
    • Use the redeploy API call to create a new VM to replace the missing Edge. 
    • POST https://<manager-ip>/api/v1/transport-nodes/<tn-id>?action=redeploy
  • Scenario 3: Connectivity between the Edge and NSX manager was lost:
    • In the case where the refresh task is skipped, run the following API call to clear the alarms: 
    • POST https://<manager-ip>/api/v1/transport-nodes/<tn-id>?action=refresh_node_configuration&resource_type=EdgeNode&read_only=true