From 3dab5193c695633daac3d34fba7cde1906c2d902 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Fri, 15 Apr 2016 20:40:48 +0200 Subject: [PATCH] XenPool add snapshot handling --- qubes/storage/xen.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubes/storage/xen.py b/qubes/storage/xen.py index bf3e4ad6..144082a3 100644 --- a/qubes/storage/xen.py +++ b/qubes/storage/xen.py @@ -299,6 +299,11 @@ class XenPool(Pool): } if volume_type not in known_types: raise StoragePoolException("Unknown volume type " + volume_type) + + if volume_type == 'snapshot': + path = qubes.storage.get_pool(volume_config['pool'], self.vm.template).target_dir + volume_config['vid'] = os.path.join(path, volume_config['name'] + '.img') + return known_types[volume_type](**volume_config)