Fix lvm AppVM startup from lvm
This commit is contained in:
parent
24bbc971b0
commit
355ea0c2a8
@ -217,8 +217,10 @@ class ThinPool(qubes.storage.Pool):
|
|||||||
def stop(self, volume):
|
def stop(self, volume):
|
||||||
if volume.save_on_stop:
|
if volume.save_on_stop:
|
||||||
self._commit(volume)
|
self._commit(volume)
|
||||||
|
if volume._is_snapshot:
|
||||||
if volume._is_volatile:
|
cmd = ['remove', volume._vid_snap]
|
||||||
|
qubes_lvm(cmd, self.log)
|
||||||
|
elif volume._is_volatile:
|
||||||
cmd = ['remove', volume.vid]
|
cmd = ['remove', volume.vid]
|
||||||
qubes_lvm(cmd, self.log)
|
qubes_lvm(cmd, self.log)
|
||||||
else:
|
else:
|
||||||
@ -227,6 +229,12 @@ class ThinPool(qubes.storage.Pool):
|
|||||||
return volume
|
return volume
|
||||||
|
|
||||||
def _snapshot(self, volume):
|
def _snapshot(self, volume):
|
||||||
|
try:
|
||||||
|
cmd = ['remove', volume._vid_snap]
|
||||||
|
qubes_lvm(cmd, self.log)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
if volume.source is None:
|
if volume.source is None:
|
||||||
cmd = ['clone', volume.vid, volume._vid_snap]
|
cmd = ['clone', volume.vid, volume._vid_snap]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user