xenapi: xe network-attach for OVS bridge creation
For Neutron we need an additional OVS bridge to be present. The xe
network-create command did not create the bridge immediately. A
workaround was applied to attach a network interface to that network,
forcing xapi to create the underlying OVS bridge. It turned out, that
the xe network-attach command could be used instead, so the workaround
is removed and replaced with the proper solution by this patch.
Fixes bug 1197305
Change-Id: I10cc763531b71238f0bc12a12de985f8f35d7e27
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index 21aa729..6eb3013 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -50,6 +50,15 @@
cd $THIS_DIR
+# Die if multiple hosts listed
+if have_multiple_hosts; then
+ cat >&2 << EOF
+ERROR: multiple hosts found. This might mean that the XenServer is a member
+of a pool - Exiting.
+EOF
+ exit 1
+fi
+
# Install plugins
## Nova plugins
@@ -256,7 +265,7 @@
# is created by XenServer). This is required for Neutron. Also pass that as a
# kernel parameter for DomU
if is_service_enabled neutron; then
- add_interface "$GUEST_NAME" "$XEN_INT_BRIDGE_OR_NET_NAME" $XEN_INT_DEV_NR
+ attach_network "$XEN_INT_BRIDGE_OR_NET_NAME"
XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
append_kernel_cmdline \