Apache CloudStack 4.4 with Advanced Networking Setup Pt. 2 – Open vSwitch


In this post I show how to install Open vSwitch on CentOS 6.5. This is the second post that gets into the Apache CloudStack 4.4 with Advanced Networking Setup. You can find the first one here.

First we have to build the rpms from source.

  1. On a system that you can use for the build process follow the steps below.
    yum -y groupinstall “Development Tools”
    yum -y install wget openssl-devel
    
  2. Let’s get the files organized in the right place.
    cd ~
    mkdir -p rpmbuild/SOURCES
    wget http://openvswitch.org/releases/openvswitch–2.3.0.tar.gz
    tar xvfz openvswitch–2.3.0.tar.gz
    cd openvswitch–2.3.0/
    cp ../openvswitch–2.3.0.tar.gz ~/rpmbuild/SOURCES/
    cp rhel/openvswitch-kmod.files ~/rpmbuild/SOURCES/
    
  3. Now lets buildtherpms.
    rpmbuild -bb rhel/openvswitch.spec
    rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
    
  4. You can find the files in ~/rpmbuild/RPMS/x86_64/. The you can install them using the command below. Copy these files to the systems you need to install them on then run the commands below.
    yum -y localinstall kmod-openvswitch–2.3.0–1.el6.x86_64.rpm
    yum -y localinstall openvswitch–2.3.0–1.x86_64.rpm
    reboot
    
  5. After the machine reboots you can verify theopenvswitch using the commands below.
    ovs-vsctl -V
    ovs-vsctl show

You can check out the video as well.

The next post will be out soon if it is not already.


13 Comments

Add yours
  1. Abe Hoffman

    Hi Antone,

    Thanks for the very clear walk-through! I don’t see the script you mentioned in the video posted here. Would you mind uploading it?

    Thanks!

    Abe

  2. Michael

    Hi Antone,

    Your video additionally had the following two lines that are missing in your script:
    echo “network.bridge.type=openvswitch” >> /etc/cloudstack/agent/properties
    echo “libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.OvsVifDriver” >> /etc/cloudstack/agent/agent.properties

  3. Michael

    I installed this on VMWare workstation 11 on windows 8.1 using the NAT network type GW 192.168.88.2. I used a static ip for the management server and dhcp for the kvm hosts.

    Anyway, it works up until the point of spawning an instance. I get the following error:
    Job failed due to exception Resource [Host:1] is unreachable: Host 1: Unable to start instance due to Failed to add VPC router VM[DomainRouter|r-3-VM] to guest network Ntwk[4fbf7d0d-687d-415a-8628-51a790f4d513|Guest|11]

    I’m curious if the network has to support VLANS for it to work? I’m attempting again with everything running dhcp and using my physical bridge connection with my homes router 192.168.0.1 — I’ve seemed to have the best luck installing advanced cloudstack with the NAT network for some reason. I’m also using the newest openvswitch 3.2.1? i believe).

  4. Michael

    I should note, template downloaded, VPC setup properly, hosts added with out issue. Error only arrives only spawning instance.

  5. Michael

    Antone, is there anything special about your physical router in regards to vlans adn is it running dns? With the network script you have attached to a physcial network I’m unable to ping google.com however i can reach 8.8.8.8 on kvm host. Tried changing nameservers, etc.. management server can reach dns inquires. I don’t believe my router is running dns.. maybe it is required?

    • Antone Heyward

      I do have a switch that supports vlans but I doubt that’s the issue. I see you mentioned that your using NAT, this could be your problem. Try to use bridge networking or physical hardware that can support running kvm host.

  6. Michael

    Alright, one of my problems was I had a typo:
    echo “network.bridge.type=openvswitch” >> /etc/cloudstack/agent/properties

    should be:
    echo “network.bridge.type=openvswitch” >> /etc/cloudstack/agent/agent.properties

    I’m still seeing large packet lose with two nic’s using dhcp one the same network with the network script you provided.

  7. Michael

    Thanks Antone, I believe I discovered my error in labeling cloudbr0 and cloudbr1 and not properly allocating nics with these bridges. Thanks for the very helpful deployment tool. It works great!

    • Antone Heyward

      It depends on the level of complexity that you need for the network. OVS brings remote programming possibilities, vxlan, OpenFlow, GRE, integrated QoS, NetFlow and more, so it’s more flexible. If all you need is a trunk with multiple vlans the bridge should work fine if your physical switch supports it.

Comments are closed.