 +        client, ioctx = driver._connect_to_rados(pool)
 +        try:
 +            snap_name = snapshot.encode('utf8') if snapshot else None
-+            self.volume = driver.rbd.Image(ioctx, name.encode('utf8'),
-+                                           snapshot=snap_name,
-+                                           read_only=read_only)
-+        except driver.rbd.ImageNotFound:
++            self.volume = rbd.Image(ioctx, name.encode('utf8'),
++                                    snapshot=snap_name,
++                                    read_only=read_only)
++        except rbd.ImageNotFound:
 +            with excutils.save_and_reraise_exception():
 +                LOG.debug("rbd image %s does not exist", name)
 +                driver._disconnect_from_rados(client, ioctx)
-+        except driver.rbd.Error:
++        except rbd.Error:
 +            with excutils.save_and_reraise_exception():
 +                LOG.exception(_("error opening rbd image %s"), name)
 +                driver._disconnect_from_rados(client, ioctx)

+        self.driver = rbd_utils.RBDDriver(
+            pool=self.pool,
+            ceph_conf=self.ceph_conf,
+            rbd_user=self.rbd_user,
+            rbd_lib=kwargs.get('rbd'),
+            rados_lib=kwargs.get('rados'))
 
         self.path = 'rbd:%s/%s' % (self.pool, self.rbd_name)
         if self.rbd_user:
@@ -563,52 +533,6 @@ class Rbd(Image):
         if self.ceph_conf:
             self.path += ':conf=' + self.ceph_conf
 

 
 class Raw(Image):
     def __init__(self, instance=None, disk_name=None, path=None):
@@ -353,6 +368,10 @@ class Raw(Image):
     def snapshot_extract(self, target, out_format):
         images.convert_image(self.path, target, out_format)
 
+    @staticmethod
+    def is_file_in_instance_path():
+        return True
+
 
 class Qcow2(Image):
     def __init__(self, instance=None, disk_name=None, path=None):
@@ -417,6 +436,10 @@ class Qcow2(Image):
                                        target,
                                        out_format)
 
+    @staticmethod
+    def is_file_in_instance_path():
+        return True
+
 
 class Lvm(Image):
     @staticmethod
@@ -491,51 +514,6 @@ class Lvm(Image):
                              run_as_root=True)
 
 
