Set template field before check its correctness.
Backup from Aplha3 with updateable VMs contains case, when updateable VM have template. So set this template (to make qvm-backup-restore working), but give error message. Also fix typo.
This commit is contained in:
parent
97403a8e45
commit
156778fcd7
@ -237,10 +237,11 @@ class QubesVm(object):
|
||||
|
||||
self.memory = memory
|
||||
|
||||
self.template_vm = template_vm
|
||||
if template_vm is not None:
|
||||
if updateable:
|
||||
print "ERROR: Template based VM cannot be updateable!"
|
||||
return false
|
||||
return False
|
||||
if not template_vm.is_template():
|
||||
print "ERROR: template_qid={0} doesn't point to a valid TemplateVM".\
|
||||
format(template_vm.qid)
|
||||
@ -250,8 +251,6 @@ class QubesVm(object):
|
||||
else:
|
||||
assert self.root_img is not None, "Missing root_img for standalone VM!"
|
||||
|
||||
self.template_vm = template_vm
|
||||
|
||||
# By default allow use all VCPUs
|
||||
if vcpus is None:
|
||||
qubes_host = QubesHost()
|
||||
|
Loading…
Reference in New Issue
Block a user