Error when connecting Virtual Machine to NSX-T Segments

When you try to connect an NSX-T based Segment to a virtual machine, the task fails with the following error message:

Reconfigure virtual machine - An error occurred during host configuration

In the nsx logfile on the ESXi host where the VM is located, the following error is displayed:

/var/log/nsx-syslog.log
2021-03-13T19:00:36Z nsx-opsagent[527252]: NSX 527252 - [nsx@6876 comp="nsx-esx" subcomp="opsagent" s2comp="nsxa" tid="527596" level="ERROR" errorCode="MPA44211"] [PortOp] Failed to create port 780b915d-1479-4eed-8e29-2364d9563f95 with VIF f3f605f2-38a1-4263-bbbd-81b189077f69 because DVS id is not found by transport-zone id 1b3a2f36-bfd1-443e-a0f6-4de01abc963e
2021-03-13T19:00:36Z nsx-opsagent[527252]: NSX 527252 - [nsx@6876 comp="nsx-esx" subcomp="opsagent" s2comp="nsxa" tid="527596" level="ERROR" errorCode="MPA42001"] [CreateLocalDvPort] createPort(uuid=780b915d-1479-4eed-8e29-2364d9563f95, zone=1b3a2f36-bfd1-443e-a0f6-4de01abc963e) failed: Failed to create port 780b915d-1479-4eed-8e29-2364d9563f95 with VIF f3f605f2-38a1-4263-bbbd-81b189077f69 because DVS id is not found by transport-zone id 1b3a2f36-bfd1-443e-a0f6-4de01abc963e

 

From the error message above, we can extract 3 IDs that can be verified with the NSX-T Manager:

"Failed to create
port 780b915d-1479-4eed-8e29-2364d9563f95 with
VIF f3f605f2-38a1-4263-bbbd-81b189077f69
because DVS id is not found by
transport-zone id 1b3a2f36-bfd1-443e-a0f6-4de01abc963e"

The Port and VIF ID have been successfully created in NSX-T. You can find NSX-T objects very quickly using the search option.

The Transport Zone is available and connected to the ESXi Host (using Transport Node Profiles).

From NSX-T, everything looks fine. Also, the segment itself has Ports.

Using the Manager Mode, you can identify the operational status of logical ports. As you can see, multiple ports have been created (Every attempt to connect the VM to the switch creates a new logical port) and the operational state is down.

There seems to be a communication problem between ESXi and NSX-T. I'm not sure what the root cause of the issue is, but from my observations, it happens when you reboot ESXi hosts while the NSX-T Manager is not available. To fix the problem you can either reboot the ESXi host or reconfigure its Transport Zones.

Disclaimer: If you encounter this problem in production, please open an SR with VMware GSS and ask for assistance.

  1. Navigate to System > Configuration > Fabric > Host Transport Nodes
  2. Select all ESXi hosts that are suspected to have the issue
  3. Press Actions > Manage Transport Zones
  4. Without changing anything, press ADD

You should now be able to connect the segment to your Virtual Machine but there are still orphaned ports in the logical switch configuration which need to be removed.

Delete orphaned logical ports:

 

  1. Navigate to Networking and activate Manager mode
  2. Navigate to Logical Switches > Switches and select the Segment
  3. Identify ports that are not connected to Virtual Machines. In this example, there are 4 ports that need to be deleted. Please note that the operational state is also down when the Virtual Machine is powered off. If you mouse-over the Attachment and you do only see a VIF, the port is stale.
  4. Click on the Logical Port to change to Port Mode
  5. Press the Delete icon
  6. Repeat Step 3-5 until all stale ports are deleted

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.