OpenNebula - KVM - OpenVSwitch Cannot Ping in or out

Hi,

I have attempted to follow the documentation here for configuring Open Nebula, KVM and OpenVSwitch:

http://docs.opennebula.org/4.4/administration/networking/openvswitch.html

Unfortunately, my virtual machine is unable to ping out, and I am unable to ping the virtual machine. I have attempted creating the virtual machine several times with several different configurations, disabling IPTables. My node/host is running on Ubuntu 14.04 LTS.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        down ifconfig $IFACE down

auto br0
iface br0 inet static
        address 192.168.3.4
        netmask 255.255.255.0
        gateway 192.168.3.1
        broadcast 192.168.3.255
        dns-nameservers  192.168.3.1
        dns-search ailab.wsu.edu
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

I add the oneadmin to the /etc/sudoers:

visudo
oneadmin  ALL = NOPASSWD: ALL

My list of bridges: brctl show

root@vm-node-02:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.003048bbb1a5	no		eth0

ovs-vsctl show

root@vm-node-02:~# ovs-vsctl show
4b3b8d84-9606-4ee4-b63d-f330fcd0562f
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "eth0"
            Interface "eth0"
        Port "vnet0"
            Interface "vnet0"
    ovs_version: "2.0.2"

ovs-ofctl show br0

ovs-ofctl show br0
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000da532db53e4c
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
 1(vnet0): addr:fe:00:c0:a8:03:50
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

ovs-ofctl dump-ports br0

root@vm-node-02:~# ovs-ofctl dump-ports br0
OFPST_PORT reply (xid=0x2): 1 ports
  port  1: rx pkts=33, bytes=1602, drop=0, errs=0, frame=0, over=0, crc=0
           tx pkts=0, bytes=0, drop=0, errs=0, coll=0

What am I missing here? The symptoms seem like there is no network connectivity. In the VM I see

<interface type='bridge'>
  <mac address='02:00:c0:a8:03:50'/>
  <source bridge='br0'/>
  <virtualport type='openvswitch'>
    <parameters interfaceid='19cbdb92-82cd-431e-a30e-36f419e45020'/>
  </virtualport>
  <model type='rtl8139'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

And I have an active virsh network???

root@vm-node-02:~# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes

I have attempted to destroy this with:

  162  virsh net-destroy default
  164  virsh net-autostart --disable default

So my question is what am I missing. This seems like it is pretty straight forward?

Any advice appreciated!

---- Additional Information —

Followed the tutorial here:

My qemu command is:

/usr/bin/qemu-system-x86_64 -name one-108 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -m 4096 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid fda40786-52d0-4e36-beff-2b13fbd7eae6 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/one-108.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/one//datastores/100/108/disk.0,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/var/lib/one//datastores/100/108/disk.1,if=none,id=drive-ide0-0-1,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=02:00:c0:a8:03:50,bus=pci.0,addr=0x3 -vnc 0.0.0.0:108 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

You can see that i am using virtio…The funny thing is that i have this working on another system no problem. I am not sure what is different from this system…

Another forum question lost in the abyss…

I am following this tutorial now…can anyone at least comment whether this will work or not?

Hi Randall, I’m not sure if there’s some kind of conflict with you creating a bridge with the same name both in the Linux kernel and in Open vSwitch. You should either use Open vSwitch or Linux kernel but not both, as far as I understand…

Could you try again without the Linux kernel br0 (that is, don’t define br0 in /etc/network/interfaces and assign the IP to eth0 directly)

And then, after a prophylactic reboot, create the bridge with Open vSwitch and try again?

Don’t mind the libvirt network, you can ignore it or remove it, it doesn’t really affect our setup.

1 Like

Thanks, I will give this a try.

Credit goes to Jaimie Melis!

/etc/network/interfaces

The primary network interface

auto eth0
iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down

auto br0
iface br0 inet static
address 192.168.3.200
netmask 255.255.255.0

The important distinction is that i created the bridge using osv-svctl first using the add-br and then associating the bridge with eth0. Then I define the address of the bridge in /etc/network/interfaces. Lesson learned, osv bridges are not kernel bridges.

1 Like