[one-users] help: with 8021q driver, network configuration won't work, after host reboot (???)

于长江 yuchj at neusoft.com
Fri Nov 30 04:58:32 PST 2012


1. First, I create a vm on computer14, i saw network interfaces below:
[oneadmin at computer14 ~]$ ifconfig  
eth0      Link encap:Ethernet  HWaddr E8:39:35:18:A1:60  
          inet addr:10.72.24.216  Bcast:10.72.24.255  Mask:255.255.255.0
          inet6 addr: fe80::ea39:35ff:fe18:a160/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:21587155 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8407735 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22927887802 (21.3 GiB)  TX bytes:667899749 (636.9 MiB)
          Memory:fbe60000-fbe80000 

eth0.100  Link encap:Ethernet  HWaddr E8:39:35:18:A1:60  
          inet6 addr: fe80::ea39:35ff:fe18:a160/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:784568 (766.1 KiB)

onebr100  Link encap:Ethernet  HWaddr E8:39:35:18:A1:60  
          inet6 addr: fe80::acb0:e4ff:fe95:6f08/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13746 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:398936 (389.5 KiB)  TX bytes:468 (468.0 b)

vnet0     Link encap:Ethernet  HWaddr FE:00:DD:67:22:02  
          inet6 addr: fe80::fc00:ddff:fe67:2202/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 b)  TX bytes:732 (732.0 b)

2. Then, i reboot computer14
[oneadmin at computer14 ~]$ sudo shutdown -r now 

3. After this operation,i saw vconfig network interface has gone (eth0.100, onebr100)
[oneadmin at computer14 ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr E8:39:35:18:A1:60  
          inet addr:10.72.24.216  Bcast:10.72.24.255  Mask:255.255.255.0
          inet6 addr: fe80::ea39:35ff:fe18:a160/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:122 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13317 (13.0 KiB)  TX bytes:12829 (12.5 KiB)
          Memory:fbe60000-fbe80000 

4. When I create that vm, error occurred below:
[root at computer14 images]# pwd
/one_images/25/images
[root at computer14 images]# ls
deployment.0  disk.0  disk.1
[root at computer14 images]# virsh create deployment.0 
error: Failed to create domain from deployment.0
error: Failed to add tap interface to bridge 'onebr100': No such device




于长江 |  东软

From: Andreas Calvo Gómez
Date: 2012-11-30 20:33
To: yuchj at neusoft.com
CC: users at lists.opennebula.org
Subject: Re: help: with 8021q driver, network configuration won't work, after host reboot (???)
We've been using 802.1Q under CentOS 6 without problems for quite a long 
time.
Can you post a detailed description of what is happening?

Thanks
On 30/11/12 07:57, users-request at lists.opennebula.org wrote:
>
> Message: 2
> Date: Fri, 30 Nov 2012 14:56:47 +0800
> From: ??? <yuchj at neusoft.com>
> To: users <users at lists.opennebula.org>
> Subject: [one-users] help: with 8021q driver, network configuration
>  won't work after host reboot
> Message-ID: <201211301456470519356 at neusoft.com>
> Content-Type: text/plain; charset="gb2312"
>
> As i said, with 8021q driver, network configuration won't work after host reboot. Does One notice this?
>
> Here is my solution for rhel below: (Is this ok?)
> # cat $ONE_LOCATION/var/remotes/vnm/802.1Q/HostManaged.rb
> require 'OpenNebulaNetwork'
> ...
> def create_bridge(bridge)
>      OpenNebula.exec_and_log_no_exit("#{COMMANDS[:brctl]} addbr #{bridge}")
>      OpenNebula.exec_and_log_no_exit("sudo sh -c 'echo brctl addbr #{bridge} >> /etc/rc.d/rc.local'")
> end
> ...
> def create_dev_vlan(dev, vlan)
>      OpenNebula.exec_and_log("#{COMMANDS[:vconfig]} add #{dev} #{vlan}")
>      OpenNebula.exec_and_log("sudo sh -c 'echo vconfig add #{dev} #{vlan} >> /etc/rc.d/rc.local'")
> end
> ...
> def attach_brigde_dev(bridge, dev, vlan=nil)
>      dev = "#{dev}.#{vlan}" if vlan
>      OpenNebula.exec_and_log("#{COMMANDS[:brctl]} addif #{bridge} #{dev}")
>      OpenNebula.exec_and_log("sudo sh -c 'echo brctl addif #{bridge} #{dev} >> /etc/rc.d/rc.local'")
> end
> ...
> def ifup(dev, vlan=nil)
>      dev = "#{dev}.#{vlan}" if vlan
>      OpenNebula.exec_and_log("#{COMMANDS[:ip]} link set #{dev} up")
>      OpenNebula.exec_and_log("sudo sh -c 'echo ip link set #{dev} up >> /etc/rc.d/rc.local'")
> end
> ...
>
>
>
>
> ??? |  ??
> ---------------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
> is intended only for the use of the intended recipient and may be confidential and/or privileged of
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
> not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying
> is strictly prohibited, and may be unlawful.If you have received this communication in error,please
> immediately notify the sender by return e-mail, and delete the original message and all copies from
> your system. Thank you.
> ---------------------------------------------------------------------------------------------------
>

-- 
Andreas Calvo Gómez
Systems Engineer
Scytl Secure Electronic Voting
Plaça Gal·la Placidia, 1-3, 1st floor · 08006 Barcelona
Phone: + 34 934 230 324
Fax:   + 34 933 251 028
http://www.scytl.com

NOTICE: The information in this e-mail and in any of its attachments is
confidential and intended solely for the attention and use of the named
addressee(s). If you are not the intended recipient, any disclosure,
copying,
distribution or retaining of this message or any part of it, without the
prior
written consent of Scytl Secure Electronic Voting, SA is prohibited and
may be
unlawful. If you have received this in error, please contact the sender
and
delete the material from any computer.
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121130/593c4555/attachment-0002.htm>


More information about the Users mailing list