[CentOS-virt] Xen not applying custom network script on startup

Christopher G. Stach II cgs at ldsys.net
Sun Dec 9 06:25:38 UTC 2007


Timothy Selivanow wrote:
> I'm seeing an issue with xend not running a custom network script
> automatically, but works when I run it manually.
> In /etc/xen/xend-config.sxp I've changed:
> 
> (network-script network-bridge)
> 
> TO:
> (network-script network-custom)

I've found that configuring the bridges using the Red Hat method
(/etc/sysconfig/network-scripts) is easier and more straightforward than
finagling around in the Xen scripts.  Then you just disable Xen's method
with ``(network-script /bin/true)''.  The great thing about this is that
you can handle bonding, VLANs, and bridges all in the same spot and at
the same time.

Example bridge interface /etc/sysconfig/network-scripts/ifcfg-xenbr0:

DEVICE=xenbr0
TYPE=Bridge
BOOTPROTO=none
NETWORK=192.168.0.0
NETMASK=255.255.255.0
IPADDR=192.168.0.1
ONBOOT=yes
DELAY=0
STP=on

Example bridge port interface /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
BRIDGE=xenbr0

> Here is /etc/xen/scripts/network-custom:
> 
> # !/bin/bash
> # network-custom

Maybe your shebang is busted?

-- 
Christopher G. Stach II



More information about the CentOS-virt mailing list