소스 검색

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
Demi Marie Obenour 3 년 전
부모
커밋
cee8201989
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      qubes/storage/file.py

+ 1 - 3
qubes/storage/file.py

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