| ... | ... |
@@ -76,15 +76,7 @@ SPICE_DIR=$DEST/spice-html5 |
| 76 | 76 |
# -------------------------- |
| 77 | 77 |
|
| 78 | 78 |
# Set defaults according to the virt driver |
| 79 |
-if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 80 |
- PUBLIC_INTERFACE_DEFAULT=eth2 |
|
| 81 |
- GUEST_INTERFACE_DEFAULT=eth1 |
|
| 82 |
- # Allow ``build_domU.sh`` to specify the flat network bridge via kernel args |
|
| 83 |
- FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 84 |
- if is_service_enabled neutron; then |
|
| 85 |
- XEN_INTEGRATION_BRIDGE=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 86 |
- fi |
|
| 87 |
-elif [ "$VIRT_DRIVER" = 'baremetal' ]; then |
|
| 79 |
+if [ "$VIRT_DRIVER" = 'baremetal' ]; then |
|
| 88 | 80 |
NETWORK_MANAGER=${NETWORK_MANAGER:-FlatManager}
|
| 89 | 81 |
PUBLIC_INTERFACE_DEFAULT=eth0 |
| 90 | 82 |
FLAT_INTERFACE=${FLAT_INTERFACE:-eth0}
|
| ... | ... |
@@ -535,16 +527,12 @@ function create_nova_conf() {
|
| 535 | 535 |
SPICEHTML5PROXY_URL=${SPICEHTML5PROXY_URL:-"http://$SERVICE_HOST:6082/spice_auto.html"}
|
| 536 | 536 |
iniset $NOVA_CONF spice html5proxy_base_url "$SPICEHTML5PROXY_URL" |
| 537 | 537 |
fi |
| 538 |
- if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 539 |
- VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
|
|
| 540 |
- else |
|
| 541 |
- VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
|
| 542 |
- fi |
|
| 543 | 538 |
|
| 544 | 539 |
if is_service_enabled n-novnc || is_service_enabled n-xvnc; then |
| 545 | 540 |
# Address on which instance vncservers will listen on compute hosts. |
| 546 | 541 |
# For multi-host, this should be the management ip of the compute host. |
| 547 | 542 |
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
|
| 543 |
+ VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
|
| 548 | 544 |
iniset $NOVA_CONF DEFAULT vnc_enabled true |
| 549 | 545 |
iniset $NOVA_CONF DEFAULT vncserver_listen "$VNCSERVER_LISTEN" |
| 550 | 546 |
iniset $NOVA_CONF DEFAULT vncserver_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS" |
| 551 | 547 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,85 @@ |
| 0 |
+# lib/nova_plugins/hypervisor-xenserver |
|
| 1 |
+# Configure the XenServer hypervisor |
|
| 2 |
+ |
|
| 3 |
+# Enable with: |
|
| 4 |
+# VIRT_DRIVER=xenserver |
|
| 5 |
+ |
|
| 6 |
+# Dependencies: |
|
| 7 |
+# ``functions`` file |
|
| 8 |
+# ``nova`` configuration |
|
| 9 |
+ |
|
| 10 |
+# install_nova_hypervisor - install any external requirements |
|
| 11 |
+# configure_nova_hypervisor - make configuration changes, including those to other services |
|
| 12 |
+# start_nova_hypervisor - start any external services |
|
| 13 |
+# stop_nova_hypervisor - stop any external services |
|
| 14 |
+# cleanup_nova_hypervisor - remove transient data and cache |
|
| 15 |
+ |
|
| 16 |
+# Save trace setting |
|
| 17 |
+MY_XTRACE=$(set +o | grep xtrace) |
|
| 18 |
+set +o xtrace |
|
| 19 |
+ |
|
| 20 |
+ |
|
| 21 |
+# Defaults |
|
| 22 |
+# -------- |
|
| 23 |
+ |
|
| 24 |
+PUBLIC_INTERFACE_DEFAULT=eth2 |
|
| 25 |
+GUEST_INTERFACE_DEFAULT=eth1 |
|
| 26 |
+# Allow ``build_domU.sh`` to specify the flat network bridge via kernel args |
|
| 27 |
+FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 28 |
+if is_service_enabled neutron; then |
|
| 29 |
+ XEN_INTEGRATION_BRIDGE=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 30 |
+fi |
|
| 31 |
+ |
|
| 32 |
+VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
|
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+# Entry Points |
|
| 36 |
+# ------------ |
|
| 37 |
+ |
|
| 38 |
+# clean_nova_hypervisor - Clean up an installation |
|
| 39 |
+function cleanup_nova_hypervisor() {
|
|
| 40 |
+ # This function intentionally left blank |
|
| 41 |
+ : |
|
| 42 |
+} |
|
| 43 |
+ |
|
| 44 |
+# configure_nova_hypervisor - Set config files, create data dirs, etc |
|
| 45 |
+function configure_nova_hypervisor() {
|
|
| 46 |
+ if [ -z "$XENAPI_CONNECTION_URL" ]; then |
|
| 47 |
+ die $LINENO "XENAPI_CONNECTION_URL is not specified" |
|
| 48 |
+ fi |
|
| 49 |
+ read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." |
|
| 50 |
+ iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver" |
|
| 51 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_url "$XENAPI_CONNECTION_URL" |
|
| 52 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_username "$XENAPI_USER" |
|
| 53 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_password "$XENAPI_PASSWORD" |
|
| 54 |
+ iniset $NOVA_CONF DEFAULT flat_injected "False" |
|
| 55 |
+ # Need to avoid crash due to new firewall support |
|
| 56 |
+ XEN_FIREWALL_DRIVER=${XEN_FIREWALL_DRIVER:-"nova.virt.firewall.IptablesFirewallDriver"}
|
|
| 57 |
+ iniset $NOVA_CONF DEFAULT firewall_driver "$XEN_FIREWALL_DRIVER" |
|
| 58 |
+} |
|
| 59 |
+ |
|
| 60 |
+# install_nova_hypervisor() - Install external components |
|
| 61 |
+function install_nova_hypervisor() {
|
|
| 62 |
+ # This function intentionally left blank |
|
| 63 |
+ : |
|
| 64 |
+} |
|
| 65 |
+ |
|
| 66 |
+# start_nova_hypervisor - Start any required external services |
|
| 67 |
+function start_nova_hypervisor() {
|
|
| 68 |
+ # This function intentionally left blank |
|
| 69 |
+ : |
|
| 70 |
+} |
|
| 71 |
+ |
|
| 72 |
+# stop_nova_hypervisor - Stop any external services |
|
| 73 |
+function stop_nova_hypervisor() {
|
|
| 74 |
+ # This function intentionally left blank |
|
| 75 |
+ : |
|
| 76 |
+} |
|
| 77 |
+ |
|
| 78 |
+ |
|
| 79 |
+# Restore xtrace |
|
| 80 |
+$MY_XTRACE |
|
| 81 |
+ |
|
| 82 |
+# Local variables: |
|
| 83 |
+# mode: shell-script |
|
| 84 |
+# End: |
| ... | ... |
@@ -981,25 +981,6 @@ if is_service_enabled nova; then |
| 981 | 981 |
configure_nova_hypervisor |
| 982 | 982 |
|
| 983 | 983 |
|
| 984 |
- # XenServer |
|
| 985 |
- # --------- |
|
| 986 |
- |
|
| 987 |
- elif [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 988 |
- echo_summary "Using XenServer virtualization driver" |
|
| 989 |
- if [ -z "$XENAPI_CONNECTION_URL" ]; then |
|
| 990 |
- die $LINENO "XENAPI_CONNECTION_URL is not specified" |
|
| 991 |
- fi |
|
| 992 |
- read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." |
|
| 993 |
- iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver" |
|
| 994 |
- iniset $NOVA_CONF DEFAULT xenapi_connection_url "$XENAPI_CONNECTION_URL" |
|
| 995 |
- iniset $NOVA_CONF DEFAULT xenapi_connection_username "$XENAPI_USER" |
|
| 996 |
- iniset $NOVA_CONF DEFAULT xenapi_connection_password "$XENAPI_PASSWORD" |
|
| 997 |
- iniset $NOVA_CONF DEFAULT flat_injected "False" |
|
| 998 |
- # Need to avoid crash due to new firewall support |
|
| 999 |
- XEN_FIREWALL_DRIVER=${XEN_FIREWALL_DRIVER:-"nova.virt.firewall.IptablesFirewallDriver"}
|
|
| 1000 |
- iniset $NOVA_CONF DEFAULT firewall_driver "$XEN_FIREWALL_DRIVER" |
|
| 1001 |
- |
|
| 1002 |
- |
|
| 1003 | 984 |
# OpenVZ |
| 1004 | 985 |
# ------ |
| 1005 | 986 |
|