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
This commit is contained in:
Marek Marczykowski-Górecki 2016-01-11 21:53:33 +01:00
parent 78b63eb21a
commit 8b9049d8c6
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

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