XenPool add snapshot handling

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-04-15 20:40:48 +02:00
parent 792d94959f
commit 3dab5193c6

View File

@ -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)