xenapi - cleanup

Add error on unitialised variable to the scripts. This way some issues
were identified. Also modify README with fresh variables. The patch
includes:
 - Add SWIFT_HASH to the README
 - Add XENAPI_CONNECTION_URL to the README
 - Add VNCSERVER_PROXYCLIENT_ADDRESS to the README
 - Introduce UBUNTU_INST_IFACE which is the OpenStack VM interface used
   for the netinstall. It defaults to eth3. Previously this parameter
   was set by the combination of HOST_IP_IFACE and the undocumented
   NETINSTALL_IP
 - get rid of NETINSTALL_IP
 - xenrc includes CLEAN_TEMPLATES
 - xenrc no longer tries to change directory
 - remove chrooting from prepare_guest.sh (STAGING_DIR was always / )
 - remove DO_TGZ variable from prepare_guest.sh
 - use arguments to call prepare_guest.sh, instead of env vars
 - Fix backslash escaping in prepare_guest_template.sh

NOTE: networking is about to be addressed in a separate change.

Related to blueprint xenapi-devstack-cleanup

Change-Id: Ie9a75321c7f41cc9a0cc051398d1e6ec2c88adfa
diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh
index 19bd2f8..6ea6f63 100755
--- a/tools/xen/prepare_guest_template.sh
+++ b/tools/xen/prepare_guest_template.sh
@@ -15,9 +15,8 @@
 # The resultant image is started by install_os_domU.sh,
 # and once the VM has shutdown, build_xva.sh is run
 
-# Exit on errors
 set -o errexit
-# Echo commands
+set -o nounset
 set -o xtrace
 
 # This directory
@@ -75,7 +74,8 @@
 
 # run prepare_guest.sh on boot
 cat <<EOF >$STAGING_DIR/etc/rc.local
-GUEST_PASSWORD=$GUEST_PASSWORD STAGING_DIR=/ \
-    DO_TGZ=0 XS_TOOLS_PATH=$XS_TOOLS_PATH \
-    bash /opt/stack/prepare_guest.sh > /opt/stack/prepare_guest.log 2>&1
+#!/bin/sh -e
+bash /opt/stack/prepare_guest.sh \\
+    "$GUEST_PASSWORD" "$XS_TOOLS_PATH" "$STACK_USER" \\
+    > /opt/stack/prepare_guest.log 2>&1
 EOF