Installing vWLC and KVM with Ubuntu

This chapter contains the following topics:

Installing Ubuntu and KVM

To install Ubuntu and KVM, perform the following steps:


    Step 1   Install Ubuntu Server 13.10 or later, select virtualization module/package during installation.
    Step 2   Install QEMU/KVM/Open vSwitch packages:
    apt-get install qemu-kvm qemu-utils uml-utilities bridge-utils socat vnc4server vncviewer
    apt-get install kvm libvirt-bin virtinst
    apt-get install openvswitch-controller  openvswitch-switch openvswitch-datapath-source
    Step 3   Start the open vswitch service.
    service openvswitch-switch start
    Step 4   Reboot the system.

    One Time Network Configuration on Ubuntu

    To execute one time network configuration on Host Linux, perform the following steps:


      Step 1   Create two open vswitch bridges and map eth0, eth1 to the corresponding bridges:
      ovs-vsctl add-br ovsbr0 [bridge name] 
      ovs-vsctl add-port ovsbr0 eth0
      ovs-vsctl add-br ovsbr1[bridge name]
      ovs-vsctl add-port ovsbr1 eth1
      ovs-vsctl set bridge ovsbr1 other-config:forward-bpdu=true [Required for CDP packets forwarding from Open Vswitch]
      Step 2   To define a management network, create an XML file [mgmt.xml] as follows:
      <network>
        <name>VM-Mgmt-Nw</name>
        <forward mode='bridge'/>
        <bridge name='ovsbr'/>
        <virtualport type='openvswitch'/>
          <!--
            If the linux host port[For eg, eth1] is connected in trunk mode to the
            downstream switch[which is also connected to the openvswitch bridge ovsbr],
            then by choosing the following portgroup,traffic from all vlan is passed up
            to the vWLC.The management interface should be in vlan tagged mode. And
            multiple interfaces can also be created with different vlans.
            If the linux host port is connected in untagged mode to the downstream switch,
            then on choosing this portgroup,untagged frames are passed up to the vWLC.
            Hence management interface has to be untagged.
          -->
          <portgroup name='default-portgroup' default='yes'>
          </portgroup>
         <!--
            If the linux host port is connected in trunk mode to the downstream switch
            [which is also connected to openvswitch bridge ovsbr],and if only certain
            vlans are to be allowed, choose this portgroup.
            Uncomment the following portgroup and edit the tag ids to the vlans allowed.
            You are free to add as many vlan ids as needed.
          -->
          <!--
          <portgroup name='Management-Portgroup'>
            <vlan trunk='yes'>
              <tag id='4092'/>
              <tag id='4093'/>
            </vlan>
          </portgroup>
          -->
      </network>
      
      Note   

      Edit the vlan tags as per requirement.

      Step 3   Run the following commands to create the management network:
       virsh net-define mgmt.xml
       virsh net-start  VM-Mgmt-Network
      Step 4   Repeat step 2 for creating a service port network. To define the service port network, create an XML file [service.xml] as follows:
      <network>
        <name>VM-SP-Nw</name>
        <forward mode='bridge'/>
        <bridge name='ovsbr'/>
        <virtualport type='openvswitch'/>
          <!--
              If this portgroup is chosen, it is presumed that the linux host port
              [For eg :eth0, connected to the openvswitch bridge "ovsbr"] is connected in access
              mode to the neighboring switch.
          -->
          <portgroup name='default-portgroup' default='yes'>
          </portgroup>
         <!--
              If the same linux host port[connected to the openvswitch bridge "ovsbr"]
              as that of management interface is mapped to Service interface in vWLC
              and if the linux host port is in trunk mode ,then choose the following
              portgroup to have untagged packets for service port access.
              Uncomment the following portgroup and create the network.
              Also, edit the native-vlan as per your network settings.
         -->
         <!--
          <portgroup name='Service-portgroup'>
            <vlan>
              <vlan mode='native-untagged'/>
                <tag id='4094'/>
            </vlan>
          </portgroup>
          -->
      </network>
      
      Note   

      Edit the vlan tags as per requirement.

      Step 5   Run the following commands to create the service network:
       virsh net-define mgmt.xml
       virsh net-start  VM-Service-Network
      Step 6   Check the virtual network status by using the following command:
      virsh net-list --all

      All the created networks are listed as active.


      Launching vWLC Using VMM

      To launch vWLC using VMM, perform the following steps:


      Note


      This is similar to installation using Fedora.



        Step 1   Launch Virtual Machine Manager (VMM):
        1. Launch VMM from GUI or type virt-manager from shell. The GUI takes you through the following steps to create the vWLC instance easily.
        2. Choose an ISO image.
        3. Choose Memory = 4 GB.
        4. Choose CPU = 1.
        5. Provide a qcow2 image or raw image.
        6. Click Customize configuration before install.
        7. Click NIC, change device model to virtio, and change host device to VM-Service-Network.
        8. Click Add hardware.
        9. In the new window, click Network, and change host device to VM-Mgmt-network and device model to virtio.
        10. Click Begin installation.
        Step 2   From the command prompt, vWLC can be instantiated from shell as well with the following command (modify the filename and path as needed):

        virt-install --connect=qemu:///system --network=network:VM-Service-network,model=virtio --network=network:VM-Mgmt-network,model=virtio --name=vm1 --cdrom=/home/user/vWLC/images/<AS_CTVM_8_1_xx_xx.iso> --disk path=/var/lib/libvirt/images/4.img,size=8 --ram 2048 --vcpus=1 --vnc --vncport=5926


        Accessing vWLC

        Virtual WLC (vWLC) can be accessed in following ways:


          Step 1   virsh console <Virtual Machine name>
          Step 2   VNCviewer: For example, check the VNC details of vWLC through"virsh vncviewer <VirtualMachine name>" and then use that VNC connection details and access vWLC as "vncviewer 127.0.0.1:11".
          Step 3   Console from VMM.