Enable nbd if you're running an lxc virt_type without an lvm backend
If nbd isn't enabled you can't boot instances with libvirt using lxc
(unless you're using an lvm backend).
Closes-Bug: #1487195
Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>
Change-Id: I08c4d498ed35166f566291d9530ca1ecfae05625
diff --git a/lib/nova b/lib/nova
index 6441a89..087cac6 100644
--- a/lib/nova
+++ b/lib/nova
@@ -354,6 +354,12 @@
sudo mount /cgroup
fi
fi
+
+ # enable nbd for lxc unless you're using an lvm backend
+ # otherwise you can't boot instances
+ if [[ "$NOVA_BACKEND" != "LVM" ]]; then
+ sudo modprobe nbd
+ fi
fi
fi
fi