Installing vWLC and KVM with Fedora

This chapter contains the following topics:

Installing Fedora OS

To install Fedora OS, perform the following steps:


    Step 1   Install Fedora 21 or later. Click the following link to download Fedora.

    https:/​/​getfedora.org/​en/​server/​download/​

    Step 2   After installing Fedora, configure IP address to go to internet.

    In this scenario, two dedicated Linux interfaces/ports are used for vWLC.

    Step 3   Find out your interface using ifconfig.
    Example
    • 1st Interface —for uplink (service-port of WLC); no IP address is required to this interface but should be connected and up.

    • 2nd Interface—for WLC Management interface; no IP address is required to this interface but should be connected and up.

    • 3rd or 4th Interface—for Linux accessibility; provide IP address to this interface, so that there is a network connectivity to the Linux box.

    Note   

    By default, KVM uses first interface as service-port for vWLC.

    Step 4   Configure IP address to the 3rd or 4th interface to access Linux and access internet to get update.
    vi /etc/sysconfig/network-scripts/ifcfg-enp2s0f3
    Note   

    You will need to change BOOTPROTO from DHCP to static and add IPADDR, NETMASK, BROADCAST, and NETWORK variables. It is recommended to choose the static IP address.

    Example

    NM_CONTROLLED="yes"
    BOOTPROTO=static
    DEVICE=eth1
    ONBOOT=yes
    IPADDR=192.168.8.248
    NETMASK=255.255.255.0
    BROADCAST=192.168.8.255
    NETWORK=192.168.8.0
    GATEWAY=192.168.8.1
    TYPE=Ethernet
    PEERDNS=no
    Step 5   Save the file.

    OR

    ifconfig <interface_name> <IP_address>
    ifconfig <interface_name> netmask <netmask_address>
    ifconfig <interface_name> broadcast <broadcast_address>

    OR

    ifconfig <interface_name> <IP_address> netmask <netmask_address> broadcast <broadcast_address>
    Note   

    Configure proxy and DNS information if required. Make sure internet is accessible after configuration.


    Updating Fedora OS

    To update Fedora OS after installation, perform the following steps:


      Step 1   Update Fedora OS:
      yum install update
      Step 2   Install GUI:
      yum install @gnome-desktop -y
      Step 3   Install VNC server -- http:/​/​www.namhuy.net/​3134/​install-vnc-server-on-fedora-20.html:
      yum install tigervnc-server -y
      Step 4   Install x11:
      yum groupinstall "X Software Development"

      Installing KVM and openvswitch with supporting packages

      yum install -y @standard @virtualization openvswitch
      systemctl enable network.service
      systemctl start network.service
      systemctl enable openvswitch.service
      systemctl start openvswitch.service

      Verifying the Installation of KVM

      lsmod | grep kvm

      Example output on Intel processor:

      [root@localhost system]# lsmod | grep kvm
      kvm_intel             147785  0
      kvm                   464964  1 kvm_intel

      Network Configuration

      Creating a Bridge and Mapping it to Port (Ethernet Interface)

      ovs-vsctl add-br ov_10nw
      ovs-vsctl add-port ov_10nw enp2s0f0
      ovs-vsctl add-br ov_9nw
      ovs-vsctl add-port ov_9nw en

      The bridge name must be the same as created in the XML file.

      Viewing the Bridge Mapping

      ovs-vsctl show

      Example

      [root@localhost ~]# ovs-vsctl show
      099e8b7e-bf00-4071-be62-ec55f9b543cc
          Bridge "ov_9nw"
              Port "ov_9nw"
                  Interface "ov_9nw"
                      type: internal
              Port "enp2s0f1"
                  Interface "enp2s0f1"
          Bridge "ov_10nw"
              Port "ov_10nw"
                  Interface "ov_10nw"
                      type: internal
              Port "enp2s0f0"
                  Interface "enp2s0f0"
          ovs_version: "2.3.1-git3282e51"

      Creating XML Files

      Create two XML files; one for service-nw (10nw) and the other for management (9nw).

      Example

      10nw_eth0_ov.xml
      9nw_eth1_ov.xml

      Both XML files contain VLAN information based on the network, or based on what you want to allow.

      Example: To Allow All VLANs

      <network>
        <name>10-nw</name>
        <forward mode='bridge'/>
        <bridge name='ov_10nw'/>
        <virtualport type='openvswitch'/>
        <portgroup name='vlan-any' default='yes'>
        </portgroup>
      </network>
      

      The bridge name must be the same as created during "ovs-vsctl" command.

      If only specific VLANs need to be allowed, use the following format.

      <network>
        <name>ov-nw</name>
        <forward mode='bridge'/>
        <bridge name='bridge_1'/>
        <virtualport type='openvswitch'/>
        <portgroup name='all_vlans' default='yes'>
        </portgroup>
        <portgroup name='vlan-152-untagged'>
          <vlan>
              <vlan mode='native-untagged'/>
         <tag id='152'/>
          </vlan>
        </portgroup>
        <portgroup name='vlan-153'>
          <vlan>
            <tag id='153'/>
          </vlan>
        </portgroup>
        <portgroup name='two-vlan'>
          <vlan trunk='yes'>
            <tag id='152'/>
            <tag id='153'/>
          </vlan>
        </portgroup>
      </network>
      
      In the above configuration:
      • portgroup name='all_vlans' → allows all VLANs.

      • portgroup name='vlan-152-untagged' → allows only untagged VLAN that is 152.

      • portgroup name='vlan-153' → allows only 153 VLAN.

      • portgroup name='two-vlan' → allows only two VLANs, that is, 152 and 153.

      Allowing CDP Packets to Forward from Open vSwitch

      ovs-vsctl set bridge ov_9nw other-config:forward-bpdu=true

      Viewing the Virtual Network

      virsh net-list --all

      Deleting the Default Network

      virsh net-undefine default

      Creating Virtual Network

      virsh net-define <xml_file_name>

      Viewing the Virtual Network

      virsh net-list --all

      Starting the Virtual Network

      virsh net-start <network_name_that is in the list>

      Example

      [root@localhost ~]# virsh net-list --all
       Name                 State      Autostart     Persistent
      ----------------------------------------------------------
       default              inactive   no            yes
      [root@localhost ~]# virsh net-undefine default
      Network default has been undefined
      [root@localhost ~]# virsh net-define 10nw_eth0_ov.xml
      Network 10-nw defined from 10nw_eth0_ov.xml
      
      [root@localhost ~]# virsh net-define 9nw_eth1_ov.xml
      Network 9-nw defined from 9nw_eth1_ov.xml
      [root@localhost ~]# virsh net-list --all
       Name                 State      Autostart     Persistent
      ----------------------------------------------------------
       10-nw                inactive   no            yes
       9-nw                 inactive   no            yes
      [root@localhost ~]# virsh net-start 10-nw
      Network 10-nw started
      [root@localhost ~]#
      [root@localhost ~]# virsh net-start 9-nw
      Network 9-nw started
      [root@localhost ~]# virsh net-list --all
       Name                 State      Autostart     Persistent
      ----------------------------------------------------------
       10-nw                active     no            yes
       9-nw                 active     no            yes

      Installing vWLC Using Virtual Machine Manager (VMM)

      To install vWLC using VMM in Fedora, perform the following steps:

      Note


      Console to Fedora. GUI is required for VMM.



        Step 1   Open the terminal (command prompt).
        Step 2   Execute the command virt-manager. The Virt Manager (VMM) pop-up window appears.

        Step 3   Create a new virtual machine (VM).

        Step 4   Select the path.

        Step 5   Select the ISO file of vWLC.

        Step 6   Select the memory and CPU.

        Step 7   Select the disk space.

        Step 8   Name the VM.

        Step 9   Check the Customize configuration before install check box and then click Finish. (This helps to configure other options)

        Step 10   Click Add Hardware.

        The Add New Virtual Hardware window appears.
        This window helps you to configure service port, management interface, and serial connection:
        1. Click Network and do the following:
          • From the Network source drop-down list, choose the virtual network. (It is recommended to select the virtual network of service port of vWLC)

          • From the Portgroup drop-down list, choose the portgroup configured in xml if there are many.

          • From the Device model drop-down list, choose virtio (only this is supported as of now) and then click Finish.

        2. Repeat again by selecting Add Hardware > Network for virtual network of management interface.

          Note   

          vWLC supports only two physical ports; one for service port and the other for management/dynamic interface. The management interface is mapped to management/dynamic interface.

        3. Click Add Hardware > Serial and then click Finish.

          Note   

          Fedora 21 has "Virt-Manager" version 1.1, which has the portgroup option. Older version does not have it.

        Step 11   Click Begin Installation.

        Step 12   Wait for WLC prompt for initial configuration.

        Accessing vWLC's Console

        To access vWLC's console, perform the following steps:


          Step 1   From the terminal, execute the following command:
          virsh console <vm_name eg. vm1>
          Step 2   Reboot vWLC through virt-manager.
          Note   

          To find out the vnet mapped to vWLC, execute the following command on vWLC:

          show interface detail management

          Match the last six octet with "ifconfig" output.

          This is how, you get your targeted "vnet", if there are multiple vWLCs configured.