If you plan to use KVM as a transport node or as a host for NSX Manager and NSX Controller guest VMs, but you do not already have KVM setup, you can use the procedure described here.

About this task

Note:

The Geneve encapsulation protocol uses UDP port 6081. You must allow this port access in the firewall on the KVM host.

Procedure

  1. Open the /etc/yum.conf file.
  2. Search for the line exclude.
  3. Add the line "kernel* redhat-release*" to configure yum to avoid any unsupported RHEL upgrades.

    exclude=[existing list] kernel* redhat-release*

    The supported RHEL version is 7.3.

  4. Install KVM and bridge utilities.

    Linux Distribution

    Commands

    Ubuntu

    apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virtinst virt-manager virt-viewer libguestfs-tools

    RHEL

    yum groupinstall "Virtualization Hypervisor"
    yum groupinstall "Virtualization Client"
    yum groupinstall "Virtualization Platform"
    yum groupinstall "Virtualization Tools"
  5. Check the hardware virtualization capability.
    cat /proc/cpuinfo | egrep "vmx|svm"

    The output should contain vmx.

  6. Verify that the KVM module is installed.

    Linux Distribution

    Commands

    Ubuntu

    kvm-ok
    
    INFO: /dev/kvm exists
    KVM acceleration can be used

    RHEL

    lsmod | grep kvm
    
    kvm_intel              53484  6
    kvm                   316506  1 kvm_intel
  7. For KVM to be used as a host for NSX Manager or NSX Controller, prepare the bridge network.

    In the following example, the first Ethernet interface (eth0 or ens32) is used for connectivity to the Linux machine itself. Depending on your deployment environment, this interface can use DHCP or static IP settings.

    Note:

    Interface names might vary in different environments.

    Linux Distribution

    Network Configuration

    Ubuntu

    Edit /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet manual
    
    auto br0
    iface br0 inet static
        address 192.168.110.51
        netmask 255.255.255.0
        network 192.168.110.0
        broadcast 192.168.110.255
        gateway 192.168.110.1
        dns-nameservers 192.168.3.45
        dns-search example.com
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
    
    

    Create a network definition xml file for the bridge. For example, create /tmp/bridge.xml with the following lines:

    <network>
      <name>bridge</name>
      <forward mode='bridge'/>
      <bridge name='br0'/>
    </network>
    
    

    Define and start the bridge network with the following commands:

    virsh net-define 
    bridge.xml
    virsh net-start bridge
    virsh net-autostart bridge
    
    

    You can check the status of the bridge network with the following command:

    virsh net-list --all
    
    Name                 State      Autostart     Persistent
    ----------------------------------------------------------
    bridge               active     yes           yes
    default              active     yes           yes

    RHEL

    Edit /etc/sysconfig/network-scripts/ifcfg-management_interface:

    DEVICE="ens32"
      TYPE="Ethernet"
      NAME="ens32"
      UUID="<something>"
      BOOTPROTO="none"
      HWADDR="<something>"
      ONBOOT="yes"
      NM_CONTROLLED="no"
      BRIDGE="br0"
    
    

    Edit /etc/sysconfig/network-scripts/ifcfg-br0:

    DEVICE="br0"
       BOOTPROTO="dhcp"
       NM_CONTROLLED="no"
       ONBOOT="yes"
       TYPE="Bridge"
  8. For KVM to be used as a transport node, prepare the network bridge.

    In the following example, the first Ethernet interface (eth0 or ens32) is used for connectivity to the Linux machine itself. Depending on your deployment environment, this interface can use DHCP or static IP settings.

    Configure one more interface than in the previous step.

    Note:

    Interface names may vary in different environments.

    Linux Distribution

    Network Configuration

    Ubuntu

    Edit /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet manual
    
    auto eth1
    iface eth1 inet manual
    
    auto br0
    iface br0 inet dhcp
      bridge_ports eth0
    

    RHEL

    Edit /etc/sysconfig/network-scripts/ifcfg-ens32:

    DEVICE="ens32"
      TYPE="Ethernet"
      NAME="ens32"
      UUID="<something>"
      BOOTPROTO="none"
      HWADDR="<something>"
      ONBOOT="yes"
      NM_CONTROLLED="no"
      BRIDGE="br0"
    
    

    Edit /etc/sysconfig/network-scripts/ifcfg-ens33:

    DEVICE="ens33"
      TYPE="Ethernet"
      NAME="ens33"
      UUID="<something>"
      BOOTPROTO="none"
      HWADDR="<something>"
      ONBOOT="yes"
      NM_CONTROLLED="no"
    
    

    Edit /etc/sysconfig/network-scripts/ifcfg-br0:

    DEVICE="br0"
       BOOTPROTO="dhcp"
       NM_CONTROLLED="no"
       ONBOOT="yes"
       TYPE="Bridge"
    Important:

    For Ubuntu, all network configurations must be specified in /etc/network/interfaces. Do not create individual network configuration files such as /etc/network/ifcfg-eth1, which can lead to transport node creation failure.

    Once the KVM host is configured as a transport node, the bridge interface "nsx-vtep0.0" is created. In Ubuntu, /etc/network/interfaces has entries such as the following:

    iface nsx-vtep0.0 inet static
    pre-up ip addr flush dev nsx-vtep0.0
    address <IP_pool_address>
    netmask <subnet_mask>
    mtu 1600
    down ifconfig nsx-vtep0.0 down
    up ifconfig nsx-vtep0.0 up

    In RHEL, nsxa creates a configuration file called ifcfg-nsx-vtep0.0, which has entries such as the following:

    DEVICE=nsx-vtep0.0
    BOOTPROTO=static
    NETMASK=<IP address>
    IPADDR=<subnet mask>
    MTU=1600
    ONBOOT=yes
    USERCTL=no
    NM_CONTROLLED=no
    
  9. To make the networking changes take effect, restart networking service systemctl restart network or reboot the Linux server.