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 logical switches.
About this task
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 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 Logical Switch.
The VMs must be hosted on hypervisors that have been added to the NSX-T fabric.
The fabric nodes must have NSX-T management plane (MPA) and NSX-T control plane (LCP) connectivity.
The fabric nodes must be added to a transport zone.
A logical switch must be created.
- In the vSphere Web Client, edit the VM settings, and attach the VM to the NSX-T logical switch.
- 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 API, you can view NSX-T-attached VMs with the GET https://<nsx-mgr>/api/v1/fabric/virtual-machines API call
In the NSX-T 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.