<DIV>Hi,</DIV>
<DIV> thanks for you repply ,</DIV>
<DIV> I have changed those commnd to full path in the ebtables-xen script , but it did not work. the following is my script :</DIV>
<DIV> </DIV>
<DIV><includetail>
<DIV>
<TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: black 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1" vAlign=top width=568>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#!/usr/bin/env ruby<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># -------------------------------------------------------------------------- #<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># Copyright 2002-2009, Distributed Systems Architecture Group, Universidad<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># Complutense de Madrid (dsa-research.org)<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># Licensed under the Apache License, Version 2.0 (the "License"); you may<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># not use this file except in compliance with the License. You may obtain<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># a copy of the License at<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># http://www.apache.org/licenses/LICENSE-2.0<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># Unless required by applicable law or agreed to in writing, software<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># distributed under the License is distributed on an "AS IS" BASIS,<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># See the License for the specific language governing permissions and<SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># limitations under the License.<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>#<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#--------------------------------------------------------------------------- #<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>VM_NAME=ARGV[0]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri># Uncomment to act only on the listed bridges.<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>#FILTERED_BRIDGES = ['beth0']<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>def activate(rule)<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>system "sudo /usr/local/sbin/ebtables -A #{rule}"<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>def get_bridges<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges = Hash.new<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>brctl_exit=`/usr/sbin/brctl show`<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>cur_bridge = ""<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>brctl_exit.split("\n")[1..-1].each do |l| <o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>l = l.split<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>if l.length > 1<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>cur_bridge = l[0]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges[cur_bridge] = Array.new<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges[cur_bridge] << l[3]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>else<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges[cur_bridge] << l[0]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>def get_interfaces<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges = get_bridges<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>if defined? FILTERED_BRIDGES<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>FILTERED_BRIDGES.collect {|k,v| bridges[k]}.flatten<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>else<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>bridges.values.flatten<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>vm_id=`sudo /usr/sbin/xm domid #{VM_NAME}`.strip<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>networks=`sudo /usr/sbin/xm network-list #{vm_id}`.split("\n")[1..-1]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>interfaces = get_interfaces<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri>networks.each {|net|<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>n=net.split<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>iface_id=n[0]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>iface_mac=n[2]<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>tap="vif#{vm_id}.#{iface_id}"<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>if interfaces.include? tap<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>mac=iface_mac.split(':')<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>mac[-1]='00'<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>net_mac=mac.join(':')<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>in_rule="FORWARD -s ! #{net_mac}/ff:ff:ff:ff:ff:00 -o #{tap} -j DROP"<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>out_rule="FORWARD -s ! #{iface_mac} -i #{tap} -j DROP"<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><o:p><FONT face=Calibri color=#4f81bd><STRONG><EM> </EM></STRONG></FONT></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>activate(in_rule)<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>activate(out_rule)<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><FONT color=#4f81bd><STRONG><EM><FONT face=Calibri><SPAN style="mso-spacerun: yes"> </SPAN>end<o:p></o:p></FONT></EM></STRONG></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=MsoIntenseEmphasis><SPAN lang=EN-US><STRONG><EM><FONT color=#4f81bd><FONT face=Calibri>}<o:p></o:p></FONT></FONT></EM></STRONG></SPAN></SPAN></P></TD></TR></TBODY></TABLE></DIV>
<DIV> </DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------ 原始邮件 ------------------</DIV>
<DIV style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>发件人:</B> "Jaime Melis"<jmelis@opennebula.org>;</DIV>
<DIV><B>发送时间:</B> 2011年5月6日(星期五) 晚上6:24</DIV>
<DIV><B>收件人:</B> "高建平"<13810416995@qq.com>; <WBR></DIV>
<DIV><B>抄送:</B> "users"<users@lists.opennebula.org>; <WBR></DIV>
<DIV><B>主题:</B> Re: [one-users] problem with ebtables-xen OpenNebula</DIV></DIV>
<DIV> </DIV>Hi,
<DIV><BR></DIV>
<DIV>change lines 54 and 55 of ebtables-xen script to reflect the full path of the xm binary (typically /usr/sbin/xm).</DIV>
<DIV><BR></DIV>
<DIV>I suggest you migrate to OpenNebula 2.2</DIV>
<DIV><BR></DIV>
<DIV>regards,</DIV>
<DIV>Jaime<BR><BR>
<DIV class=gmail_quote>2011/5/6 高建平 <SPAN dir=ltr><<A href="mailto:13810416995@qq.com">13810416995@qq.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV>
<DIV>Dear </DIV>
<DIV> </DIV>
<DIV dir=ltr> I have some problem when I using ebtables to isolate vlans. My OpenNebula version is 1.4,and i'm using Xen(3.0.3) and centos(5.4;nodes os). and I have done sone configuration according to Private Cloud Computing with OpenNebula 1.4 document:</DIV>
<DIV dir=ltr> 1. install ebtables and configure sudoers on every nodes. </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">oneadmin ALL=(ALL) NOPASSWD: /usr/local/sbin/ebtables*</SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr> 2. modify my one configure, <SPAN lang=EN-US style="FONT-SIZE: 10.5pt">/opt/nebula/ONE/etc/oned.conf:</SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">VM_HOOK = [<BR> name ="ebtables-start",<BR> on ="running",<BR> command ="/opt/nebula/ONE/share/hooks/ebtables-xen",<BR> arguments ="one-$VMID",<BR> remote ="yes" ]</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">VM_HOOK = [<BR> name ="ebtables-flush",<BR> on ="done",<BR> command ="/opt/nebula/ONE/share/hooks/ebtables-flush",<BR> arguments ="",<BR> remote ="yes" ]</SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt"> <FONT size=4>but when VM is created the ebtables rules is empty,and the oned.log has this msg:</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:41 2011 [HKM][D]: Message received: LOG - 10 CQ_TEST## ssh node30 '/opt/nebula/ONE/share/hooks/ebtables-xen one-10' ; echo ExitCode: $? 1>&2</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 Command execution fail: '/opt/nebula/ONE/share/hooks/ebtables-xen one-10'</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 STDERR follows.</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 sudo: xm: command not found</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 sudo: xm: command not found</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 /opt/nebula/ONE/share/hooks/ebtables-xen:80: command not found: brctl show</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 /opt/nebula/ONE/share/hooks/ebtables-xen:33:in `get_bridges': undefined method `each' for nil:NilClass (NoMethodError)</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 from /opt/nebula/ONE/share/hooks/ebtables-xen:47:in `get_interfaces'</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 from /opt/nebula/ONE/share/hooks/ebtables-xen:58</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: LOG - 10 ExitCode: 1</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt">Thu May 5 15:59:42 2011 [HKM][D]: Message received: EXECUTE FAILURE 10 ebtables-start</SPAN></DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt"></SPAN> </DIV>
<DIV dir=ltr><SPAN lang=EN-US style="FONT-SIZE: 10.5pt"><SPAN style="WORD-SPACING: 0px; FONT: medium Simsun; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><PRE><SPAN style="WORD-SPACING: 0px; FONT: medium Simsun; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><PRE>can you help me to fix this problem, thanks for your time.</PRE> </SPAN></PRE><PRE>Best Regards</PRE><PRE>gaojp</PRE></SPAN></SPAN></DIV></BLOCKQUOTE>
<DIV> </DIV></DIV></DIV><BR>_______________________________________________<BR>Users mailing list<BR><A href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</A><BR><A href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target=_blank>http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV><BR clear=all><BR>-- <BR>Jaime Melis, Cloud Technology Engineer/Researcher<BR>Major Contributor<BR>OpenNebula - The Open Source Toolkit for Cloud Computing<BR><A href="http://www.opennebula.org/" target=_blank>www.OpenNebula.org</A> | <A href="mailto:jmelis@opennebula.org" target=_blank>jmelis@opennebula.org</A><BR></DIV></includetail></DIV>