Browse Source

core/hvm: create `root-cow.img` if it's missing

It should be created at VM creation time (or template changes commit).
But for example for HVM templates created before implementing
QubesOS/qubes-issues#1573, there would be no such image. So create it
when needed, just before VM startup

Fixes QubesOS/qubes-issues#1602
Marek Marczykowski-Górecki 8 years ago
parent
commit
8b9049d8c6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/storage/xen.py

+ 2 - 0
core/storage/xen.py

@@ -226,6 +226,8 @@ class XenStorage(QubesVmStorage):
                     raise QubesException(
                         "VM '{}' holding '{}' does not exists".format(
                             drive_domain, drive_path))
+        if self.rootcow_img and not os.path.exists(self.rootcow_img):
+            self.commit_template_changes()
 
 
 class XenPool(Pool):