core/storage: fix disk handling for HVM template
Currently HVM template do not have root-cow.img (also do not use 2-layer device-mapper as PV VMs), so vm.is_template() check isn't enough.
This commit is contained in:
parent
678ccdfaa0
commit
dbb43f6035
@ -70,7 +70,8 @@ class QubesXenVmStorage(QubesVmStorage):
|
||||
params=params)
|
||||
|
||||
def _get_rootdev(self):
|
||||
if self.vm.is_template():
|
||||
if self.vm.is_template() and \
|
||||
os.path.exists(os.path.join(self.vmdir, "root-cow.img")):
|
||||
return self._format_disk_dev(
|
||||
"{dir}/root.img:{dir}/root-cow.img".format(
|
||||
dir=self.vmdir),
|
||||
|
Loading…
Reference in New Issue
Block a user