CentOS 6.5 – Openvswitch 1.9.3 LTS installation

Happy new year!

I’ve just installed CentOS 6.5 and I wanted to use Openvswitch. I’ve succeded installing the 1.9.3 LTS version using the instructions included by Nicira.

#yum install wget openssl-devel
#yum groupinstall "Development Tools"

#adduser ovswitch
#su ovswitch

$cd
$wget http://openvswitch.org/releases/openvswitch-1.9.3.tar.gz
$tar xvfz openvswitch-1.9.3.tar.gz
$cd openvswitch-1.9.3
$mkdir -p /home/ovswitch/rpmbuild/SOURCES
$ cp ../openvswitch-1.9.3.tar.gz /home/ovswitch/rpmbuild/SOURCES/
$cp rhel/openvswitch-kmod.files /home/ovswitch/rpmbuild/SOURCES/
$rpmbuild -bb rhel/openvswitch.spec
$rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
$exit

#yum localinstall /home/ovswitch/rpmbuild/RPMS/x86_64/kmod-openvswitch-1.9.3-1.el6.x86_64.rpm
#yum localinstall /home/ovswitch/rpmbuild/RPMS/x86_64/openvswitch-1.9.3-1.x86_64.rpm

And that’s all, openvswitch 1.9.3 is ready in CentOS 6.5

I’ve tried to use the latest stable version 2.0.0 but I’ve found some problems building the kernel module with netdev:

“error: conflicting types for ‘netdev_features_t'”

It seems that Jesse Gross from Nicira wrote a patch for this problem, but I must be doing something wrong and I can’t get the module built so I’ll try again in a few days and I’ll update this post if I get it working.

Of course you can always use the latest version from Git where that patch must be already applied so I suggest you to read Tyler Bishop’s post about how to use the latest openvswitch’s git version with CentOS 6.5

See ya!

Advertisements

10 thoughts on “CentOS 6.5 – Openvswitch 1.9.3 LTS installation

  1. pn says:

    i’ve problem

    $ rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
    error: Failed build dependencies:
    kernel-devel is needed by openvswitch-kmod-1.9.3-1.el6.x86_64

    Like

    • n40lab says:

      Hi,
      have you run the following command: yum groupinstall “Development Tools”? It should include the kernel-devel package also you can try: yum install kernel-devel and then try to generate the rpm package.

      Thanks for your feedback

      Like

    • n40lab says:

      Hi,
      thanks for your comment. My guide was created after a clean installation of CentOS 6.5, but it seems that I ran yum install update after the installation, as my kernel version is 2.6.32-431.el6.x86_64, could you try to update your kernel (if possible) and check if that’s the problem (maybe a conflict with the existing openvswitch module?)?.

      If you want maybe I can install again CentOS 6.5 in my lab and try to reproduce your error, let me know if you want me to do this.

      Cheers,

      Miguel

      Like

  2. Gemeiner says:

    Hey,
    I’ve got a problem when I issue: rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec

    When I execute it, it exits with the following error: Bad exit status from /var/tmp/rpm-tmp.59sp3x (%build)

    paste: http://pastebin.com/p1Lnt4jy

    Can you tell me what I’m doin’ wrong? All the other commands worked like a charm… BTW im using CentOS 6.7 (hopefully that dosen’t matter).

    Hope you can help me 😀

    Like

    • n40lab says:

      Hi there!,
      it seems you have problems trying to create the kernel module. In recent posts I avoid to compile it because CentOS kernel already has an openvswitch kernel module so only the binaries to control its behaviour are needed. There are some lines in code preventing the kernel module compilation. Please try to use the steps in https://n40lab.wordpress.com/2015/06/28/centos-7-installing-openvswitch-2-3-2-lts/, it should work with older openvswitch and CentOS 6.X (try running service openvswitch start instead of systemctl start openvswitch.service). If you have problems just let me know and I’ll prepare the steps for you in a CentOS 6.7 VM right away. Cheers!

      Like

      • Gemeiner says:

        Hey,
        thanks for the link to your tutorial – we now got openvswitch up and running.
        Thank You!

        Now we have a network related question, we are running opennebula (single node setup, we did not install the kvm node yet…) on our Dedicated Server running at Hetzner (datacenter) the problem ist that we only got 1 IP-Address that we use for the Dedicated (Physical) Server at the moment. Do you know if its possible to share the IP with the VM’s running (Bridging?). Or do you know how to setup a separate network for our VM’s themselves (NAT?). Excuse me but im not the brightest when it comes to networking 😀

        Hope you’ll be able to help.

        Like

      • n40lab says:

        Glad you got it. About the networking question I’d be willing to help, maybe we can chat tomorrow, so please use my contact form at artemit.com.es and tell me if you prefer skype or google hangout and what time aprox you’d like to chat. Cheers!

        Like

  3. Anonymous says:

    yum localinstall /home/ovswitch/rpmbuild/RPMS/x86_64/kmod-openvswitch-1.9.3-1.el6.x86_64.rpm
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Local Package Process
    Cannot open: /home/ovswitch/rpmbuild/RPMS/x86_64/kmod-openvswitch-1.9.3-1.el6.x86_64.rpm. Skipping.
    Nothing to do

    what to do????????????????????

    Like

    • n40lab says:

      Hi!, this is a quite old post. Let’s see if I can help you.

      What’s the content of the /home/ovswitch/rpmbuild/RPMS/x86_64 folder?

      Are you using CentOS 6 or CentOS 7?, do you need the 1.9.3 version specifically? because there are more recent versions for the LTS.

      Cheers

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s