In this post, I will show you how to deploy NSX-T Manager on Ubuntu KVM hypervisor. I have already covered the NSX-T Manager installation on the ESXi hosts in the following blog posts. You may go through the following posts on how to do the installation on ESXi.
Yes, the NSX-T manager deployment is supported on the KVM hypervisor. In a heterogeneous environment you may choose to deploy it on the ESXi or KVM hypervisors, both are supported
NSX-T supports KVM in two ways:
- As a host transport node
- As a host for NSX Manager and NSX Controller. [NSX Edges deployment on KVM is NOT SUPPORTED]
Supported KVM Versions to Deploy NSX-T Manager:
- RHEL 7.4
- Ubuntu 16.04.2 LTS
Preparing Ubuntu KVM host to deploy NSX-T Manager:
Required packages on Ubuntu:
Once the Ubuntu is installed install the following packages on the Ubuntu OS.
root@kvm-03a:~# # apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virtinst virt-manager virt-viewer libguestfs-tools
Check the host hardware compatibility:
Check the hardware virtualization compatibility with the following command:
root@kvm-03a:~# cat /proc/cpuinfo | egrep "vmx|svm"
Verify the KVM Module:
root@kvm-03a:~# kvm-ok INFO: /dev/kvm exists KVM acceleration can be used
Configuring the KVM host Networking:
For KVM to be used as a host for NSX Manager or NSX Controller, prepare the bridge network, management interface, and NIC interfaces.
Edit the /etc/network/interfaces configuration file
auto lo iface lo inet loopback auto ens160 iface eth0 inet manual iface br0 inet static address 192.168.110.56 netmask 255.255.255.0 network 192.168.110.0 broadcast 192.168.110.255 gateway 192.168.110.1 dns-nameservers 192.168.110.10 dns-search corp.local bridge_ports ens160 bridge_stp off bridge_fd 0 bridge_maxwait 0 auto ens192 iface ens192 inet manual auto br0
The ens160 interface is used for management connectivity and the ens192 interface will be used for the Overlay traffic.
Defining bridge on Ubuntu host:
Create a network definition xml file for the bridge. For example, create a /var/lib/libvirt/images/bridge.xml with the following lines:
root@kvm-03a:/var/lib/libvirt/images# vi bridge.xml <network> <name>bridge</name> <forward mode='bridge'/> <bridge name='br0'/> </network>
Define and start the bridge network:
root@kvm-03a:/var/lib/libvirt/images/# virsh net-define /var/lib/libvirt/images/bridge.xml root@kvm-03a:/var/lib/libvirt/images/# virsh net-start bridge root@kvm-03a:/var/lib/libvirt/images/# virsh net-autostart bridge
Check bridge network status:
root@kvm-03a:/var/lib/libvirt/images/# virsh net-list --all Name State Autostart Persistent ---------------------------------------------------------- bridge active yes yes default active yes yes
To Configure KVM as a transport node, prepare the network bridge.
Edit /etc/network/interfaces:
auto lo iface lo inet loopback auto ens160 iface eth0 inet manual iface br0 inet static address 192.168.110.56 netmask 255.255.255.0 network 192.168.110.0 broadcast 192.168.110.255 gateway 192.168.110.1 dns-nameservers 192.168.110.10 dns-search corp.local bridge_ports ens160 bridge_stp off bridge_fd 0 bridge_maxwait 0 auto ens192 iface ens192 inet manual auto br0
Deploying NSX-T Manager on Ubuntu KVM
Prerequisites:
- Install all the required packages
- Prepare the host Networking
- Privileges to deploy a QCOW2 image
- Download NSX Manager QCOW2 image
Step 1: Download the NSX Manager QCOW2 image:
Click the below link to download the NSX-T Manager QCOW2 image:
https://my.vmware.com/web/vmware/info/slug/networking_security/vmware_nsx_t_data_center/2_x
Step 2: Add the currently logged in user as a libvirtd user on Ubuntu KVM host
Note: Adding root user to the libvirtd group is only for KVM running on Ubuntu
root@kvm-03a:/var/lib/libvirt/images# adduser $USER libvirtd
In the same directory where you saved the QCOW2 image, create a file called guestinfo (with no file extension) and populate it with the NSX Manager VM’s properties.
Example for the guestinfo file:
root@kvm-03a:/var/lib/libvirt/images# vi guestinfo
<?xml version="1.0" encoding="UTF-8"?> <Environment xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"> <PropertySection> <Property oe:key="nsx_allowSSHRootLogin" oe:value="True"/> <Property oe:key="nsx_cli_passwd_0" oe:value="VMware1!"/> <Property oe:key="nsx_passwd_0" oe:value="VMware1!"/> <Property oe:key="nsx_dns1_0" oe:value="192.168.110.10"/> <Property oe:key="nsx_domain_0" oe:value="corp.local"/> <Property oe:key="nsx_gateway_0" oe:value="192.168.110.1"/> <Property oe:key="nsx_hostname" oe:value="nsxmgr-01a"/> <Property oe:key="nsx_role" oe:value="nsx-manager"/> <Property oe:key="nsx_ip_0" oe:value="192.168.110.201"/> <Property oe:key="nsx_isSSHEnabled" oe:value="True"/> <Property oe:key="nsx_netmask_0" oe:value="255.255.255.0"/> <Property oe:key="nsx_ntp_0" oe:value="192.168.110.10"/> </PropertySection> </Environment>
Step 4: Use guestfish to write the guestinfo file into the QCOW2 image.
root@kvm-03a:/var/lib/libvirt/images# guestfish --rw -i -a /var/lib/libvirt/images/nsx-unified-appliance-2.2.0.0.0.8680778.qcow2 upload /var/lib/libvirt/images/guestinfo /config/guestinfo
Step 5: Deploy the QCOW2 image with the virt-install command
root@kvm-03a:/var/lib/libvirt/images# virt-install --import --name nsxmgr-01a --ram 16348 --vcpus 4 --network=bridge:br0,model=e1000 --disk path=/var/lib/libvirt/images/nsx-unified-appliance-2.2.0.0.0.8680778.qcow2,format=qcow2 --nographics Starting install... Creating domain... Connected to domain nsxmgr-01a Escape character is ^] VMware NSX Unified Appliance 2.2.0.0.0.8680778 - release - ttyS0 nsxmgr-01a login: admin Password:
We have successfully deployed the NSX-T Manager on the KVM running Ubuntu.
Login with the admin credentials to connect to NSX-T Manager via CLI or connect to the NSX-T manager via browser to manage through the GUI.
I hope this is informative for you and thank you for reading…
Hi, What are the HW platforms on which NSX will KVM? I am specifically looking for support for KVM on IBM z platform (s390)