Lets go ahead and look at how to connect KVM virtual Machines to the logical switches in NSX-T. In my previous post, we have discussed about how to connect the vSphere virtual Machines to the logical switches. In a vSphere environment, you will see the NSX-T Logical Switches as Opaque network, and the vSphere administrator will connect the Virtual Machine Network adapter(s) to these Opaque network like connecting the Virtual network adapter to the Virtual Machine portgroups.
Steps to connect KVM Virutal machines to Logical Switches:
- Get the Virtual Interface ID
- Create a Switch port with the VIF ID and Save the configuration
Connect KVM VIrtual Machines to Logical Switches:
Login to the KVM host as root and then run the following command to list the virtual machine running on KVM hypervisor
root@kvm-01a:~# virsh list --all Id Name State ---------------------------------------------------- - T1-DB-01 shut off
The above command shows you the list of Virtual Machines running and the State of the virtual Machine.
To start any Shut off virtual machines, you can run the following command:
root@kvm-01a:~# virsh start T1-DB-01 Domain T1-DB-01 started
You can collect the interface ID from the configuration with the following command:
root@kvm-01a:~# virsh dumpxml T1-DB-01 | grep interfaceid
<parameters interfaceid='57601300-2e82-48c4-8c27-1e961ac70e81'/>
Now log in to the NSX Manager with the admin credentials, navigate to Switching > Ports > click on +ADD
On the Add New Logical Port, you must enter the following details to connect the virtual machine to logical Switch.
Name | Enter the Logical Swith Port Name |
Description | Optional Description |
Logical Switch | Select the Logical Switch |
Admin Status: | Up/Down |
Attachment Type | VIF |
Attach ID: The interface ID of KVM Virtual Machine. | VIF ID |
Click SAVE
These steps will now connect the KVM virtual Machine to the Logical Switch.
Logical Switch Port Status:
Repeat these steps to connect the other KVM VMs to Logical Switches.
Please refer to the VMware Documentation for more information on NSX-T Data Center product at https://docs.vmware.com/en/VMware-NSX-T/index.html
Related Posts:
- NSX-T 2.1 Complete video series:
- Introduction to NSX-T
- NSX-T Architecture
- Deploy NSX-T Manager Virtual Machine on ESXi host
- Configure NSX-T Control cluster
- Prepare ESXi host as fabric node in NSX-T
- Prepare KVM hosts as fabric Node in NSX-T
- How to add vCenter Server as Compute Manager?
- What is N-VDS or hostSwitch in NSX-T?
- How to create Transport Zones in NSX-T?
- What is Uplink Profile and how to Create in NSX-T?
- Create an IP pools for TEP in NSX-T
- Verify hostswitch configuration on ESXi and KVM
- How to create Logical Switches in NSX-T?