devstack: Add paths specific to XenServer Core
* XenServer Core keeps its Xapi plugins in a different path to XenServer,
in order to comply with the Filesystem Hierarchy Standard.
* XenServer Core mounts devices under /dev/xen/blktap-2 in dom0,
whereas XenServer mounts them under /dev/sm.
Change-Id: I0a66cd03f000f19c8ff63a8ae4231c00fda88380
diff --git a/tools/xen/scripts/manage-vdi b/tools/xen/scripts/manage-vdi
index 05c4b07..381e671 100755
--- a/tools/xen/scripts/manage-vdi
+++ b/tools/xen/scripts/manage-vdi
@@ -32,7 +32,7 @@
vbd_uuid=$1
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
- if [[ "$dev" =~ "sm/" ]]; then
+ if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
DEBIAN_FRONTEND=noninteractive \
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes \
install kpartx &> /dev/null || true
@@ -49,7 +49,7 @@
function clean_dev_mappings() {
dev=$(xe_min vbd-list params=device uuid="$vbd_uuid")
- if [[ "$dev" =~ "sm/" ]]; then
+ if [[ "$dev" =~ "sm/" || "$dev" =~ "blktap-2/" ]]; then
kpartx -dv "/dev/$dev"
fi
}