Always snapshot in the FILE pool

We must snapshot a VM’s disk before exporting it.  Otherwise, we will
likely corrupt the VM’s filesystem.

Fixes https://github.com/QubesOS/qubes-issues/issues/4324
This commit is contained in:
Demi Marie Obenour 2020-11-20 16:48:28 -05:00
parent 2c8057c43a
commit cee8201989
No known key found for this signature in database
GPG Key ID: 28A45C93B0B5B6E0

View File

@ -265,9 +265,7 @@ class FileVolume(qubes.storage.Volume):
return self
def export(self):
# FIXME: this should rather return snapshot(self.path, self.path_cow)
# if domain is running
return self.path
return snapshot(self.path, self.path_cow)
@asyncio.coroutine
def import_volume(self, src_volume):