Make devstack work with xcp-xapi package on Ubuntu 12.04

- allow you to configure the xenapi_user (often other than root)
- allow you to disable the guest installer network
- install the plugins in the xcp-xapi location
- use alternate webserver location when adding the preseed file
- skip the centos specific ip forwarding configuration
- make use xcp inventory, if no xensource-inventory is found
- correctly deal with kpartx to mount the VM VDI in manage_vdi

Change-Id: I8d51725fc97f0bcaa27a46f7a7ced13c369c809e
diff --git a/tools/xen/build_xva.sh b/tools/xen/build_xva.sh
index 1803504..fdc6a60 100755
--- a/tools/xen/build_xva.sh
+++ b/tools/xen/build_xva.sh
@@ -118,6 +118,13 @@
     sed -e "s,@ETH3_NETMASK@,$PUB_NETMASK,g" -i $INTERFACES
 fi
 
+if [ "$ENABLE_GI" == "true" ]; then
+    cat <<EOF >>$INTERFACES
+auto eth0
+iface eth0 inet dhcp
+EOF
+fi
+
 # Gracefully cp only if source file/dir exists
 function cp_it {
     if [ -e $1 ] || [ -d $1 ]; then