XenAPI: Get the management network dynamically
xenbr0 is correct for most installations, but not all. Notable xenserver-core may use a differently named device. Since we can auto detect this, remove the config and do so. Change-Id: I989f6ddd5ffb526ab350f263ef6fc402c596304a
This commit is contained in:
parent
f5c7abde55
commit
78ef1f3b2c
@ -96,6 +96,10 @@ create_directory_for_images
|
|||||||
#
|
#
|
||||||
# Configure Networking
|
# Configure Networking
|
||||||
#
|
#
|
||||||
|
|
||||||
|
MGT_NETWORK=`xe pif-list management=true params=network-uuid minimal=true`
|
||||||
|
MGT_BRIDGE_OR_NET_NAME=`xe network-list uuid=$MGT_NETWORK params=bridge minimal=true`
|
||||||
|
|
||||||
setup_network "$VM_BRIDGE_OR_NET_NAME"
|
setup_network "$VM_BRIDGE_OR_NET_NAME"
|
||||||
setup_network "$MGT_BRIDGE_OR_NET_NAME"
|
setup_network "$MGT_BRIDGE_OR_NET_NAME"
|
||||||
setup_network "$PUB_BRIDGE_OR_NET_NAME"
|
setup_network "$PUB_BRIDGE_OR_NET_NAME"
|
||||||
@ -203,6 +207,7 @@ if [ -z "$templateuuid" ]; then
|
|||||||
#
|
#
|
||||||
# Install Ubuntu over network
|
# Install Ubuntu over network
|
||||||
#
|
#
|
||||||
|
UBUNTU_INST_BRIDGE_OR_NET_NAME=${UBUNTU_INST_BRIDGE_OR_NET_NAME:-"$MGT_BRIDGE_OR_NET_NAME"}
|
||||||
|
|
||||||
# always update the preseed file, incase we have a newer one
|
# always update the preseed file, incase we have a newer one
|
||||||
PRESEED_URL=${PRESEED_URL:-""}
|
PRESEED_URL=${PRESEED_URL:-""}
|
||||||
|
@ -20,9 +20,7 @@ OSDOMU_VDI_GB=8
|
|||||||
# differ across localised versions of XenServer. If a given bridge/network
|
# differ across localised versions of XenServer. If a given bridge/network
|
||||||
# was not found, a new network will be created with the specified name.
|
# was not found, a new network will be created with the specified name.
|
||||||
|
|
||||||
# The management network is specified by the bridge name. xenbr0 is usually
|
# Get the management network from the XS installation
|
||||||
# the name of the bridge of the network associated with the hypervisor's eth0.
|
|
||||||
MGT_BRIDGE_OR_NET_NAME="xenbr0"
|
|
||||||
VM_BRIDGE_OR_NET_NAME="OpenStack VM Network"
|
VM_BRIDGE_OR_NET_NAME="OpenStack VM Network"
|
||||||
PUB_BRIDGE_OR_NET_NAME="OpenStack Public Network"
|
PUB_BRIDGE_OR_NET_NAME="OpenStack Public Network"
|
||||||
XEN_INT_BRIDGE_OR_NET_NAME="OpenStack VM Integration Network"
|
XEN_INT_BRIDGE_OR_NET_NAME="OpenStack VM Integration Network"
|
||||||
@ -72,7 +70,6 @@ UBUNTU_INST_HTTP_PROXY=""
|
|||||||
UBUNTU_INST_LOCALE="en_US"
|
UBUNTU_INST_LOCALE="en_US"
|
||||||
UBUNTU_INST_KEYBOARD="us"
|
UBUNTU_INST_KEYBOARD="us"
|
||||||
# network configuration for ubuntu netinstall
|
# network configuration for ubuntu netinstall
|
||||||
UBUNTU_INST_BRIDGE_OR_NET_NAME=${UBUNTU_INST_BRIDGE_OR_NET_NAME:-"$MGT_BRIDGE_OR_NET_NAME"}
|
|
||||||
UBUNTU_INST_IP="dhcp"
|
UBUNTU_INST_IP="dhcp"
|
||||||
UBUNTU_INST_NAMESERVERS=""
|
UBUNTU_INST_NAMESERVERS=""
|
||||||
UBUNTU_INST_NETMASK=""
|
UBUNTU_INST_NETMASK=""
|
||||||
|
Loading…
Reference in New Issue
Block a user