qvm-tools: do not assume that every template VM must have root-cow.img

Especially HVM templates do not have (at least for now).
This commit is contained in:
Marek Marczykowski-Górecki 2013-11-19 18:39:22 +01:00
parent 1756ab33e9
commit 25fd41aa2f

View File

@ -49,7 +49,7 @@ def do_list(vm):
print fmt.format ("pcidevs", vm.pcidevs)
if vm.template is None:
print fmt.format ("root img", vm.root_img)
if vm.is_template():
if hasattr(vm, "rootcow_img") and vm.rootcow_img is not None:
print fmt.format ("root COW img", vm.rootcow_img)
if vm.template is not None:
print fmt.format ("root img", vm.template.root_img)