3

I am using xen 4.4.1 on an Ubuntu 14.04 server, my DomU is running Ubuntu 14.04 Server as well. I've run this DomU in bridge-mode previously no problems. However I want to switch to a routed setup.

I changed the DomU config vif to:

vif=['10.0.1.2,script=vif-route']

and in /etc/xen/xend-config.sxp:

#(vif-script vif-bridge)
#(network-script network-bridge
(network-script network-route)
(vif-script vif-route)

However when I try to bring up the VM it will throw this error:

libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
libxl: error: libxl_create.c:1226:domcreate_attach_vtpms: unable to add nic devices
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge remove [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0

Why would it still try to run the vif-bridge script even tho I commented it out in xend-config.sxp?

user280054
  • 31
  • 1
  • 3
  • What toolstack are you using? From xen 4.4 onwards "xend/xm" is deprecated. xl is the default toolstack. Your errors indicate you are using "xl" but looks like you are changing "xend" config files. Can you elaborate? – 0x0 Jan 26 '16 at 18:39

4 Answers4

2

We had the exact same problem here after updating from xen 4.1 to 4.4 on a debian dom0 (wheezy->jessie).

Solution was to change the xl.conf:

# default vif script to use if none is specified in the guest config
vif.default.script="vif-route"
Frank
  • 21
  • 2
0

To expand felipe's answer:

Warning! When you create the new xenbr0 interface, you loose network connection to the host machine, so you need to have (physical or virtual) terminal connection available.

Use this command to see bridge status. On my machine it was empty:

brctl show
  1. Create bridge

    brctl addbr xenbr0

  2. Add physical interface to the bridge. Note! Now you loose the internet connection, unless e.g. you have multiple network cards:

See interfaces

ip link

or

ifconfig

Add interface to the bridge (on my machine the interface name was enp5s3, it can be also e.g. eth0)

brctl addif xenbr0 enp5s3

After this I think the virtual machines will get IPs. But if you need to restore network connection also to the host machine, you can assign an ip to the bridge interface like this:

  1. Bring interface up and assign IP

    ifconfig xenbr0 10.1.2.3/24 up

  2. Finally you should persist the settings by editing

On newer machines

/etc/netplan/01-netcfg.yaml

On older machines

/etc/network/interfaces
PHZ.fi-Pharazon
  • 261
  • 1
  • 10
0

create xenbr0 interface with ip, use eth0 to bridge=xenbr0.

configure vif.default.gatewaydev @ xl.conf

felipe
  • 1
0

I continue to have a similar problem when moving SLES 10.x guest VMs to the later XEN hypervisor versions shipped with SLES 12, SLES 12.3. The vif-bridge hack below includes searching the br# subdirectories for the bridge:

zeus:/etc/xen/scripts # diff -u vif-bridge vif-bridge-hack
--- vif-bridge  2017-09-08 05:26:04.000000000 -0400
+++ vif-bridge-hack     2017-09-28 21:36:32.461458890 -0400
@@ -70,6 +70,9 @@
      if [ -e "/sys/class/net/eth${bridge#xenbr}/bridge" ]
      then
         bridge="eth${bridge#xenbr}"
+     elif [ -e "/sys/class/net/br${bridge#xenbr}/bridge" ]
+     then
+        bridge="br${bridge#xenbr}"
      fi
   fi
 fi
zeus:/etc/xen/scripts #
bvj
  • 101
  • 2