diff --git a/nova/virt/disk/nbd.py b/nova/virt/disk/nbd.py index 029fecaf2e0..1839b2d9031 100644 --- a/nova/virt/disk/nbd.py +++ b/nova/virt/disk/nbd.py @@ -54,6 +54,9 @@ class Mount(mount.Mount): _DEVICES = ['/dev/nbd%s' % i for i in range(FLAGS.max_nbd_devices)] def _allocate_nbd(self): + if not os.path.exists("/sys/block/nbd0"): + self.error = _('nbd unavailable: module not loaded') + return None while True: if not self._DEVICES: # really want to log this info, not raise