安裝好 Open vSwitch 後,將主機重開機,但再次啟動OVS時會有如下的Error產生

 

Problem:

#ovs-vsctl show


FATAL: Error inserting brcompat_mod (/lib/modules/3.2.0-29-generic-pae/kernel/brcompat_mod.ko): Invalid module format
 * Inserting brcompat module
Module has probably not been built for this kernel.
For instructions, read
/usr/share/doc/openvswitch-datapath-source/README.Debian
FATAL: Error inserting brcompat_mod (/lib/modules/3.2.0-29-generic-pae/kernel/brcompat_mod.ko): Invalid module format
 * Inserting brcompat module


Solution:

1. #lsmod | grep brcom

發現 brcom 並沒有被載入成功!!


2. #lsmod | grep bridge

但Ubuntu預設的bridge模組卻被載入了,但它不是我要的,且因為bridge模組造成brcom模組無法被載入!!

(因為bridge module 在開機時就已經載入,是它造成brcompat無法載入的唷!!)

(the bridge module was already loaded and prevented the brcompat module from loading.)

所以我們要把 bridge 模組給刪除掉

#rmmod bridge

Then restart OVS.

#/etc/init.d/openvswitch-switch restart

 

此後,#ovs-vsctl show 成功出現我們之前建立的 bridge 和加入到此 bridge 的網卡與虛擬網卡了~

# ovs-vsctl show
28d2b5f2-9607-4173-959f-c2920c9ad17a
    Bridge "virbr0"
        Port "virbr0"
            Interface "virbr0"
                type: internal
    Bridge br-int
        Controller "tcp:XXX.XXX.XXX.XXX:XXX"
        Port "eth0" (對外的網卡)
            Interface "eth0"
        Port "vnet0" (虛擬網卡)
            Interface "vnet0"
        Port "vnet1"
            Interface "vnet1"
        Port br-int
            Interface br-int
                type: internal
        Port "tap1"
            Interface "tap1"
    ovs_version: "1.4.0+build0"

參考:

http://networkstatic.net/openvswitch-configure-from-packages-and-attaching-to-a-floodlight-openflow-controller/

http://networkstatic.net/installing-openvswitch-on-ubuntu-11-10-with-kvm/

http://blog.allanglesit.com/2012/03/linux-kvm-ubuntu-12-04-with-openvswitch/

 

創作者介紹
創作者 Wayne Technique Study 的頭像
Wayne

Wayne Technique Study

Wayne 發表在 痞客邦 留言(0) 人氣( 126 )