From 392b70a4d89b2727d84765f85970b41732395efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 2 Aug 2013 20:59:45 +0200 Subject: [PATCH] Create missing private.img when needed Not only for HVM, but any VM type which support private.img. --- core-modules/01QubesHVm.py | 4 ---- core/storage/__init__.py | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core-modules/01QubesHVm.py b/core-modules/01QubesHVm.py index 39fe6dba..01407da9 100644 --- a/core-modules/01QubesHVm.py +++ b/core-modules/01QubesHVm.py @@ -284,10 +284,6 @@ class QubesHVm(QubesVm): return self.storage.verify_files() - if not os.path.exists (self.private_img): - print >>sys.stderr, "WARNING: Creating empty VM private image file: {0}".\ - format(self.private_img) - self.storage.create_on_disk_private_img(verbose=False) # fire hooks for hook in self.hooks_verify_files: diff --git a/core/storage/__init__.py b/core/storage/__init__.py index 33f3b5fe..8b0935d7 100644 --- a/core/storage/__init__.py +++ b/core/storage/__init__.py @@ -194,4 +194,8 @@ class QubesVmStorage(object): def prepare_for_vm_startup(self, verbose): self.reset_volatile_storage(verbose=verbose) - pass + + if self.private_img and not os.path.exists (self.private_img): + print >>sys.stderr, "WARNING: Creating empty VM private image file: {0}".\ + format(self.private_img) + self.storage.create_on_disk_private_img(verbose=False)