From 32e1603e9581746d0a4020b2db9f5b399c1a26c8 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Mon, 29 Jul 2013 15:51:43 +0100 Subject: [PATCH] Default to xenserver driver if xenserver-core is installed Fixes bug 1209205 Change-Id: I63085cc87610a59fc48e519e4351c9233b3961be --- stackrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stackrc b/stackrc index 1e08d1614d..c81906ac8c 100644 --- a/stackrc +++ b/stackrc @@ -180,8 +180,11 @@ SPICE_BRANCH=${SPICE_BRANCH:-master} # Nova hypervisor configuration. We default to libvirt with **kvm** but will # drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can -# also install an **LXC**, **OpenVZ** or **XenAPI** based system. -VIRT_DRIVER=${VIRT_DRIVER:-libvirt} +# also install an **LXC**, **OpenVZ** or **XenAPI** based system. If xenserver-core +# is installed, the default will be XenAPI +DEFAULT_VIRT_DRIVER=libvirt +is_package_installed xenserver-core && DEFAULT_VIRT_DRIVER=xenserver +VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER} case "$VIRT_DRIVER" in libvirt) LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm}