Merge "xenapi: xe network-attach for OVS bridge creation"
This commit is contained in:
commit
25d3ecf23e
@ -250,3 +250,21 @@ function destroy_all_vifs_of()
|
|||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function have_multiple_hosts() {
|
||||||
|
xe host-list --minimal | grep -q ","
|
||||||
|
}
|
||||||
|
|
||||||
|
function attach_network() {
|
||||||
|
local bridge_or_net_name
|
||||||
|
|
||||||
|
bridge_or_net_name="$1"
|
||||||
|
|
||||||
|
local net
|
||||||
|
local host
|
||||||
|
|
||||||
|
net=$(_network_uuid "$bridge_or_net_name")
|
||||||
|
host=$(xe host-list --minimal)
|
||||||
|
|
||||||
|
xe network-attach uuid=$net host-uuid=$host
|
||||||
|
}
|
||||||
|
@ -50,6 +50,15 @@ xe_min()
|
|||||||
|
|
||||||
cd $THIS_DIR
|
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
|
# Install plugins
|
||||||
|
|
||||||
## Nova plugins
|
## Nova plugins
|
||||||
@ -256,7 +265,7 @@ $THIS_DIR/build_xva.sh "$GUEST_NAME"
|
|||||||
# is created by XenServer). This is required for Neutron. Also pass that as a
|
# is created by XenServer). This is required for Neutron. Also pass that as a
|
||||||
# kernel parameter for DomU
|
# kernel parameter for DomU
|
||||||
if is_service_enabled neutron; then
|
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")
|
XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
|
||||||
append_kernel_cmdline \
|
append_kernel_cmdline \
|
||||||
|
@ -35,7 +35,6 @@ GUEST_PASSWORD=${GUEST_PASSWORD:-secrete}
|
|||||||
MGT_DEV_NR=0
|
MGT_DEV_NR=0
|
||||||
VM_DEV_NR=1
|
VM_DEV_NR=1
|
||||||
PUB_DEV_NR=2
|
PUB_DEV_NR=2
|
||||||
XEN_INT_DEV_NR=3
|
|
||||||
|
|
||||||
# Host Interface, i.e. the interface on the nova vm you want to expose the
|
# Host Interface, i.e. the interface on the nova vm you want to expose the
|
||||||
# services on. Usually the device connected to the management network or the
|
# services on. Usually the device connected to the management network or the
|
||||||
|
Loading…
Reference in New Issue
Block a user