Browse code

Default to xenserver driver if xenserver-core is installed

Fixes bug 1209205

Change-Id: I63085cc87610a59fc48e519e4351c9233b3961be

Bob Ball authored on 2013/07/29 23:51:43
Showing 1 changed files
... ...
@@ -180,8 +180,11 @@ SPICE_BRANCH=${SPICE_BRANCH:-master}
180 180
 
181 181
 # Nova hypervisor configuration.  We default to libvirt with **kvm** but will
182 182
 # drop back to **qemu** if we are unable to load the kvm module.  ``stack.sh`` can
183
-# also install an **LXC**, **OpenVZ** or **XenAPI** based system.
184
-VIRT_DRIVER=${VIRT_DRIVER:-libvirt}
183
+# also install an **LXC**, **OpenVZ** or **XenAPI** based system.  If xenserver-core
184
+# is installed, the default will be XenAPI
185
+DEFAULT_VIRT_DRIVER=libvirt
186
+is_package_installed xenserver-core && DEFAULT_VIRT_DRIVER=xenserver
187
+VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER}
185 188
 case "$VIRT_DRIVER" in
186 189
     libvirt)
187 190
         LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm}