From 8b9049d8c66160eeb3b7ea60be3c34a752b5fce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 11 Jan 2016 21:53:33 +0100 Subject: [PATCH] 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 --- core/storage/xen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/storage/xen.py b/core/storage/xen.py index 3edf0f22..9ea7ba73 100644 --- a/core/storage/xen.py +++ b/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):