If you have a KVM host, 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.

Diagram of VMs attached to a logical switch

Prerequisites

  • The VM 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. From the KVM CLI, run the virsh dumpxml <your vm> | grep interfaceid command.
  2. In the NSX Manager UI, add a logical switch port, and use the VM's interface ID for the VIF attachment.

Results

In the NSX Manager UI in Manager mode, select Networking > Logical Switches > Ports. Find the VIF attachment ID 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.