If you have a ESXi host that is managed in vCenter Server, you can access the host VMs through the Web-based vSphere Web Client. In this case, you can use this procedure to attach VMs to NSX-T Data Center logical switches.

The example shown in this procedure shows how to attach a VM called app-vm to a logical switch called app-switch.

The installation-based vSphere Client application does not support attaching a VM to an NSX-T Data Center logical switch. If you do not have the (Web-based) vSphere Web Client, see Attach a VM Hosted on Standalone ESXi to an NSX-T Data Center Logical Switch.


  • The VMs must be hosted on hypervisors that have been added to the NSX-T Data Center fabric.
  • The fabric nodes must have NSX-T Data Center management plane (MPA) and NSX-T Data Center control plane (LCP) connectivity.
  • The fabric nodes must be added to a transport zone.
  • A logical switch must be created.


  1. In the vSphere Web Client, edit the VM settings, and attach the VM to the NSX-T Data Center logical switch.

    For example:

  2. Click OK.


After attaching a VM to a logical switch, logical switch ports are added to the logical switch. You can view logical switch ports on the NSX Manager in Switching > Ports.

In the NSX-T Data Center API, you can view NSX-T Data Center-attached VMs with the GET https://<nsx-mgr>/api/v1/fabric/virtual-machines API call

In the NSX-T Data Center Manager UI under Switching > Ports, the VIF attachment ID matches the ExternalID found in the API call. Find the VIF attachment ID matching the VM's externalId and make sure that the Admin and Operational status are Up/Up.

If two VMs are attached to the same logical switch and have IP addresses configured in the same subnet, they should be able to ping each other.

What to do next

Add a logical router.

You can monitor the activity on the logical switch port to troubleshoot problems. See "Monitor a Logical Switch Port Activity" in the NSX-T Data Center Administration Guide.