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 a Logical Switch in Manager Mode.

Prerequisites

  • 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.

Procedure

  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.

Results

After attaching a VM to a logical switch, logical switch ports are added to the logical switch. You can view logical switch ports and the VIF attachment ID on the NSX Manager UI. In Manager mode, select Networking > Logical Switches > Ports.

Use the GET https://<mgr-ip>/api/v1/logical-ports/ API call to view port details and Admin status for the corresponding VIF attachment ID. To view the Operational status, use the https://<mgr-ip>/api/v1/logical-ports/<logical-port-id>/status API call with the appropriate logical port ID.

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.