From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Knorr Subject: Re: Cannot create domU Date: Mon, 26 Sep 2005 16:59:48 +0200 Message-ID: <43380CE4.6010909@suse.de> References: <5d7aca9505092307156e0c7f00@mail.gmail.com> <20050923173759.GA25613@vrable.net> <623652d5050923153973b9804c@mail.gmail.com> <7d249e777fd88c08faab74751b15fca6@cl.cam.ac.uk> <623652d50509240354750991d3@mail.gmail.com> <9f173d1d7dea2ed7b9d458acd070f552@cl.cam.ac.uk> <623652d505092413006f3950b@mail.gmail.com> <20050926124707.GA13414@kroah.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080409040504010602030004" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Greg KH , xen-devel , Chris Bainbridge List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080409040504010602030004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, > At the moment, installing our script at /etc/hotplug/xen-backend.agent > 'just works' for us. Doesn't work on SUSE Linux 10.0 as well, as all the agents are gone here as well. The huge stack of shell scripts was replaced with a few udev rules, so it's easier to see what's going on and it also is much faster. I've attached my current configuration. ifup-xen goes to /sbin, the rules file into /etc/udev/rules.d. With those two files in place auto-adding interfaces to the bridge WorksForMe[tm]. The script is sort of a hack though, quickly created from the vif-bridge script, with no way to configure stuff at the moment. cheers, Gerd --------------080409040504010602030004 Content-Type: text/plain; name="32-net-xen.rules" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="32-net-xen.rules" SUBSYSTEM=="net", KERNEL=="vif*", ACTION=="add", RUN+="/sbin/ifup-xen %k" --------------080409040504010602030004 Content-Type: text/plain; name="ifup-xen" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ifup-xen" #!/bin/sh netdev="$1" bridge="${bridge:-xenbr0}" PATH="/sbin:/bin:/usr/sbin:/usr/bin" # Usage: create_bridge bridge create_bridge () { local bridge=$1 # Don't create the bridge if it already exists. if brctl show | grep -q ${bridge}; then return fi brctl addbr ${bridge} brctl stp ${bridge} off brctl setfd ${bridge} 0 ip link set ${bridge} up } # Usage: add_to_bridge bridge dev add_to_bridge () { local bridge=$1 local dev=$2 # Don't add $dev to $bridge if it's already on a bridge. if brctl show | grep -q ${dev} ; then return fi brctl addif ${bridge} ${dev} ip link set ${dev} arp off ip link set ${dev} up } create_bridge ${bridge} add_to_bridge ${bridge} ${netdev} echo "$(date): $0: ${bridge} ${netdev}" >> /tmp/net-xen env >> /tmp/net-xen --------------080409040504010602030004 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080409040504010602030004--