[one-users] Problem with Openvswitch on OpenNebula3.8

Valentin Bud valentin.bud at gmail.com
Thu Oct 3 00:03:32 PDT 2013


Hey there,

I have the following setup working really well.

OS
--

$ uname -a 
Linux godzilla 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64
GNU/Linux


KVM LIBVIRT
--

dpkg -l | egrep "libvirt|kvm"
ii  libsys-virt-perl                      0.9.12-2
amd64        Perl module providing an extension for the libvirt library
ii  libvirt-bin                           0.9.12-11+deb7u1
amd64        programs for the libvirt library
ii  libvirt0                              0.9.12-11+deb7u1
amd64        library for interfacing with different virtualization
systems
ii  qemu-kvm                              1.1.2+dfsg-6
amd64        Full virtualization on x86 hardware


OPENVSWITCH
--

$ dpkg -l | grep openvswitch
ii  openvswitch-common                    1.11.0-1
amd64        Open vSwitch common components
ii  openvswitch-datapath-dkms             1.11.0-1
all          Open vSwitch datapath module source - DKMS version
ii  openvswitch-switch                    1.11.0-1
amd64        Open vSwitch switch implementations


OPENNEBULA
--
 
$ dpkg -l | grep opennebula
ii  opennebula                            4.2.0-1
amd64        controller which executes the OpenNebula cluster services
ii  opennebula-common                     4.2.0-1
all          empty package to create OpenNebula users and directories
ii  opennebula-node                       4.2.0-1
all          empty package to prepare a machine as OpenNebula Node
ii  opennebula-sunstone                   4.2.0-1
all          web interface to which executes the OpenNebula cluster
services
ii  opennebula-tools                      4.2.0-1
all          Command-line tools for OpenNebula Cloud
ii  ruby-opennebula                       4.2.0-1
all          Ruby bindings for OpenNebula Cloud API (OCA)


On Thu, Oct 03, 2013 at 09:53:44AM +0800, 木易@'4武  wrote:
> Thank you very much,
> It work ,I forgot to define the network of the host.
> And last,one question,can openvswitch 1.10 or higher be used for openNebula? 3.8 and 4.2
> I found that brcompat mod is no longer exist.

The 3.8 Open vSwitch documentation [1] does mention that the bridge
compatibility layer be installed.

The 4.2 Open vSwitch documentation [2] says that KVM doesn't need Linux
bridge compatibility layer. Although XEN does need it and a different
network manager driver, ovswitch_brcompat, is provided for this scenario.

Previous the above setup I've ran Debian Squeeze with libvirt, qemu from
backports and Open vSwitch 1.10 with OpenNebula 3.8 branch. It worked
without bridge compatibility layer.

I suggest you use the latest version from OpenNebula. I have noticed
that Open vSwitch releases are stable and easy to package for DEB/RPM
systems so I try to keep up with the latest release. 


[1]: http://opennebula.org/documentation:archives:rel3.8:openvswitch
[2]: http://opennebula.org/documentation:rel4.2:openvswitch

Good Will,
Valentin

> 
> 
> ------------------ 原始邮件 ------------------
> 发件人: "Valentin Bud";<valentin.bud at gmail.com>;
> 发送时间: 2013年10月3日(星期四) 凌晨0:05
> 收件人: "木易@'4武 "<yangzb09 at qq.com>; 
> 抄送: "users"<users at lists.opennebula.org>; 
> 主题: Re: 回复: [one-users] Problem with Openvswitch on OpenNebula3.8
> 
> 
> 
> Hi there,
> 
> You should create the second host on the frontend with something like the following:
> 
> 
> # onehost create second_host -i kvm -v kvm -n ovswitch
> 
>  
> Have you done that already?
> 
> 
> Then on the second machine you must have an OVS bridge created with the name as specified in
> the vnet you have inside OpenNebula.
>  
>  Good Will,
> 
> On Wed, Oct 2, 2013 at 6:39 PM, 木易@'4武 <yangzb09 at qq.com> wrote:
>  Thanks for your reply,
> 1、Should I configure the driver in the second host? The network drive only be set in the frontend.
>  I had configure lieted bellow environment in the second host,
> ruby environment;
> kvm environment;
> oneadmin user with no password to use sudo;
> no password access frontend each other;
>  ovs 1.9.0 version with brcompat;
> 2、Yes, I can make ovs bridge create on the second machine, Using no-password ssh.
> Normally,the network driver dedined in the frontend,and frontend use ssh to  execute the ovs command through ssh.
>  but, when I build a VM in the second host frontend.It did nothing about it.
> ---------------- 原始邮件 ------------------
>  发件人: "Valentin Bud";<valentin.bud at gmail.com>;
> 发送时间: 2013年10月2日(星期三) 晚上10:57
>  收件人: "木易@'4武 "<yangzb09 at qq.com>; 
> 抄送: "users"<users at lists.opennebula.org>; 
>  主题: Re: [one-users] Problem with Openvswitch on OpenNebula3.8
> 
> 
> 
> Hello,
> Is your second host configured to use the ovswitch network driver? Is the ovs bridge created on the second machine with 
>  the name used in the vnet you've defined? Is you sudo configured to allow oneadmin to issue ovs-* commands without password?
>  
> On Wed, Oct 2, 2013 at 5:38 PM, 木易@'4武 <yangzb09 at qq.com> wrote:
>  Hi,   I’m trying to Configure OVS network in OpenNebula3.8,and has been succeed it in the frontend host(frontend&host-end together).But When I build a VM in another host,it can't add a ovs bridge.
>  In normal, it will use ovs cmd to build it.
>  The VM log is here.
> “Tue Apr 23 06:37:08 2013 [DiM][I]: New VM state is DONE.
> Mon Sep 30 11:11:20 2013 [DiM][I]: New VM state is ACTIVE.
> Mon Sep 30 11:11:20 2013 [LCM][I]: New VM state is PROLOG.
>  Mon Sep 30 11:11:20 2013 [VM][I]: Virtual Machine has no context
> Mon Sep 30 11:11:21 2013 [TM][I]: clone: Cloning /var/lib/one/datastores/1/af1f67b5da1befd1c585413de8aa17ea in host_old:/var/lib/one//datastores/0/80/disk.0
>  Mon Sep 30 11:11:21 2013 [TM][I]: ExitCode: 0
> Mon Sep 30 11:11:21 2013 [LCM][I]: New VM state is BOOT
> Mon Sep 30 11:11:21 2013 [VMM][I]: Generating deployment file: /var/lib/one/80/deployment.0
>  Mon Sep 30 11:11:21 2013 [VMM][I]: ExitCode: 0
> Mon Sep 30 11:11:21 2013 [VMM][I]: Successfully execute network driver operation: pre.
> Mon Sep 30 11:11:22 2013 [VMM][I]: ExitCode: 0
> Mon Sep 30 11:11:22 2013 [VMM][I]: Successfully execute virtualization driver operation: deploy.
>  
> Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-vsctl set Port vnet9 tag=302".
> Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=249,dl_src=02:00:c0:a8:b6:7f,priority=40000,actions=normal
>  Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=250,dl_src=02:00:63:09:09:7b,priority=40000,actions=normal".
> Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=250,priority=39000,actions=drop".
>  Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-vsctl set Port vnet11 tag=150".
> Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=251,dl_src=02:00:c0:a8:b4:4e,priority=40000,actions=normal".
>  Mon Sep 30 11:11:22 2013 [VMM][I]: post: Executed "sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=251,priority=39000,actions=drop".
> Mon Sep 30 11:11:22 2013 [VMM][I]: ExitCode: 0
> Mon Sep 30 11:11:22 2013 [VMM][I]: Successfully execute network driver operation: post.
>  Mon Sep 30 11:11:22 2013 [LCM][I]: New VM state is RUNNING
> 
> ". ”
> 
> ################################################################
> # ovs-vsctl show|less
>     Bridge "ovsbr0"
>          Port "vnet9"
>             tag: 302
>             Interface "vnet9"
> 
> ################################################################
> But when I build a VM in another host,it just build a VM, nothing for network.
>  "
> Wed Oct  2 20:46:50 2013 [DiM][I]: New VM state is ACTIVE.
> Wed Oct  2 20:46:50 2013 [LCM][I]: New VM state is PROLOG.
> Wed Oct  2 20:46:50 2013 [VM][I]: Virtual Machine has no context
>  Wed Oct  2 20:46:52 2013 [TM][I]: clone: Cloning host_old:/var/lib/one/datastores/1/af1f67b5da1befd1c585413de8aa17ea in /var/lib/one/datastores/0/82/disk.0
> Wed Oct  2 20:46:52 2013 [TM][I]: ExitCode: 0
>  Wed Oct  2 20:46:52 2013 [LCM][I]: New VM state is BOOT
> Wed Oct  2 20:46:52 2013 [VMM][I]: Generating deployment file: /var/lib/one/82/deployment.0
> Wed Oct  2 20:46:52 2013 [VMM][I]: ExitCode: 0
>  Wed Oct  2 20:46:52 2013 [VMM][I]: Successfully execute network driver operation: pre.
> Wed Oct  2 20:46:53 2013 [VMM][I]: ExitCode: 0
> Wed Oct  2 20:46:53 2013 [VMM][I]: Successfully execute virtualization driver operation: deploy.
>  Wed Oct  2 20:46:53 2013 [VMM][I]: ExitCode: 0
> Wed Oct  2 20:46:53 2013 [VMM][I]: Successfully execute network driver operation: post.
> Wed Oct  2 20:46:53 2013 [LCM][I]: New VM state is RUNNING" 
>  
> ################################################################
> Can anyboye help me to solve this problem?
> 
> 
> It looks like the network driver pre operation and also post operation executed successfully. I tend to think that your
>  second host is not configured to use the ovswitch network driver. Can you check that?
> 
> 
> Good Will,
> 
> -- 
> Valentin Budhttp://databus.pro | valentin at databus.pro
>  
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Valentin Budhttp://databus.pro | valentin at databus.pro



More information about the Users mailing list