[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] BUG: [?] host-only networking under HVM is broken with custom script

  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Ray Barnes" <tical.net@xxxxxxxxx>
  • Date: Mon, 2 Jun 2008 02:37:29 -0400
  • Delivery-date: Sun, 01 Jun 2008 23:37:52 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bPBXQVxc4rsvwU1xwiKCkO1Nk9brLOKwfpB8lhBNts5MtTdT9cFvJUtQB6GTjOG0xm+LikiApA7kNEBGxpYNXZ4MWY3bcPPS6UT1wOYJ6tstlhEMVM7cJPim1JnhhAAWuCwRGkfA18VJo6XYTw7ukQ63JcIKwrV2Dr1kme7lVaw=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Resending this to xen-devel since no one rendered a response on xen-users


I'm bumping into a problem which looks like a bug.  Perhaps it's for
lack of knowledge (and _documentation_ of HVM).  If I do the

brctl addbr bmette31
ifconfig bmette31 netmask
xm create bmette31

Where "bmette31" has a config file that has a vif entry like: vif = [
'type=ioemu, mac=00:16:3e:00:00:07, bridge=bmette31']  this works
*just fine*.  I'm able to route through the host to the HVM domain
which is set to  However, whenever I use a script which is
loosely based on a vif-bridge script that I got from /etc/xen/scripts
running Xen 3.2.1 compiled from source, it does not work.
Specifically, I can reach from the outside but not  As far as I can tell, the problem is that whenever 'brctl
addbr bmette31' is invoked from outside the script, networking between
the host and the HVM guest works fine, but when invoked from within
the script, networking between the host and the HVM guest does not
work.  Note that while the domain is running (and using the script
below), 'brctl show' indicates that I have a bridge called bmette31
and that 'ifconfig bmette31' shows the right IP.  So just to recap -
if I comment out 'brctl addbr bmette31' from the script below and run
it manually then start the HVM guest, networking is fine, but if I run
that from within the script it does not work.

One thing I notice immediately is that when I create the bridge from
the command-line, the bridge starts out with all zeros in the MAC
address, and once the custom script runs upon starting the domU, it
gets a MAC address like so:

bridge name     bridge id               STP enabled     interfaces
bmette31                8000.8a10ff068f3f       no              vif61.0

That's the working scenario as seen by 'brctl show'.  The non-working
scenario (invoking 'brctl addbr bmette31' from within the script) look
like this:

bridge name     bridge id               STP enabled     interfaces
bmette31                8000.feffffffffff       no              vif62.0

FYI, I only care about this because I'm trying to make my domUs
extremely portable (relying only on a config file and a vif script),
i.e. for live migration.  Staticly creating hundreds (thousands?) of
bridges across all nodes isn't an option.  Any ideas?


#vif bridge script for HVMs
#invoke like this:
#vif = [ 'type=ioemu, mac=00:16:3e:00:00:07, bridge=bmette31,
script=vif-bmette31' ]

/usr/sbin/brctl addbr bmette31

dir=$(dirname "$0")
. "$dir/vif-common.sh"

bridge=$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")

ip link show $bridge 1>/dev/null 2>&1 || RET=1
if [ "$RET" -eq 1 ]
#       do_without_error brctl addbr "$bridge"
    fatal "Could not find bridge device $bridge"

case "$command" in
        setup_bridge_port "$vif"
        add_to_bridge "$bridge" "$vif"
        sleep 2
        ifconfig "$bridge" netmask

        do_without_error ifconfig "$bridge" down
        do_without_error brctl delbr "$bridge"

log debug "Successful vif-bridge $command for $vif, bridge $bridge."
if [ "$command" == "online" ]

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.