From 355ea0c2a8cc390c34b9309fe6e20232463b84cd Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Sun, 28 Aug 2016 23:52:27 +0200 Subject: [PATCH] Fix lvm AppVM startup from lvm --- qubes/storage/lvm.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index eae0e2cd..1ecae93b 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -217,8 +217,10 @@ class ThinPool(qubes.storage.Pool): def stop(self, volume): if volume.save_on_stop: self._commit(volume) - - if volume._is_volatile: + if volume._is_snapshot: + cmd = ['remove', volume._vid_snap] + qubes_lvm(cmd, self.log) + elif volume._is_volatile: cmd = ['remove', volume.vid] qubes_lvm(cmd, self.log) else: @@ -227,6 +229,12 @@ class ThinPool(qubes.storage.Pool): return volume def _snapshot(self, volume): + try: + cmd = ['remove', volume._vid_snap] + qubes_lvm(cmd, self.log) + except: + pass + if volume.source is None: cmd = ['clone', volume.vid, volume._vid_snap] else: