WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Cannot create domU

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Cannot create domU
From: Chris Bainbridge <chris.bainbridge@xxxxxxxxx>
Date: Fri, 30 Sep 2005 15:48:01 +0100
Delivery-date: Fri, 30 Sep 2005 14:45:39 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sx0y2Ippllc0P1W0DbZaylkIrSQ3wQpgEZkImhO1aO7+0C5OLlDFn6kL3kbLXxjTwOHOFrqf92t3hv7qrTJq/Nab1Qobz121qkSR43HFi3kzKYJCvNNSzmkdlf0g8x35QhtU8T4q7snQRGhHDO9XSNYLwh5Tx9uKnF7tPNPiyxk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <623652d5050927083376275f75@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7d249e777fd88c08faab74751b15fca6@xxxxxxxxxxxx> <623652d505092413006f3950b@xxxxxxxxxxxxxx> <20050926124707.GA13414@xxxxxxxxx> <fe13108c1a010f99eb1dd063df18e4d9@xxxxxxxxxxxx> <20050926141407.GA15384@xxxxxxxxx> <22f2b04bae14c3efa4833ce013cc4542@xxxxxxxxxxxx> <20050926150135.GA15781@xxxxxxxxx> <a4d4285ca44d6c97c1e2110e668fb9ca@xxxxxxxxxxxx> <20050926212200.GB18670@xxxxxxxxx> <623652d5050927083376275f75@xxxxxxxxxxxxxx>
Reply-to: Chris Bainbridge <chris.bainbridge@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I finally got it working under Gentoo by abandoning all the hotplug
stuff and just using a few udev rules:

xen udev # cat rules.d/49-xen.rules
SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="online",
RUN+="/etc/xen/scripts/launch up"
SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ACTION=="add",
RUN+="/etc/xen/scripts/vbd-add %k"
SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ACTION=="remove",
RUN+="/etc/xen/scripts/vbd-remove %k"
SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="remove",
RUN+="/etc/xen/scripts/vif-remove %k"

xen udev # cd /etc/xen/scripts/
xen scripts # cat launch
#!/bin/sh

# the script is specified in xend config
# and passed to us. we just call it.
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:$PATH"

#echo "$(date): launch $1"
#env

#echo "Running ${script} $1"
${script} $1

xen scripts # cat vbd-add
#!/bin/sh
t=$(xenstore-read "$XENBUS_PATH"/type)
params=$(xenstore-read "$XENBUS_PATH"/params)
[ -x /etc/xen/scripts/block-"$t" ] && \
    /etc/xen/scripts/block-"$t" bind $params

xen scripts # cat vbd-remove
#!/bin/sh
t=$(xenstore-read "$XENBUS_PATH"/type)
node=$(xenstore-read "$XENBUS_PATH"/node)
[ -x /etc/xen/scripts/block-"$t" ] && \
/etc/xen/scripts/block-"$t" unbind $node
# remove device backend store entries
xenstore-rm "$XENBUS_PATH"

xen scripts # cat vif-remove
#!/bin/sh
# remove device backend store entries
xenstore-rm "$XENBUS_PATH"
/sbin/ip link set ${dev} down
/sbin/brctl delif ${bridge} ${dev}

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>