Create missing private.img when needed

Not only for HVM, but any VM type which support private.img.
This commit is contained in:
Marek Marczykowski-Górecki 2013-08-02 20:59:45 +02:00
parent 21c908b9b2
commit 392b70a4d8
2 changed files with 5 additions and 5 deletions

View File

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

View File

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