core: treat absence of libvirt domain as 'Halted' state

If the domain isn't defined in libvirt, it surely isn't running. This is
needed for DispVM, which compares with exactly this state.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-30 05:32:29 +02:00
parent b61aef2bef
commit 5c59067676

View File

@ -802,7 +802,7 @@ class QubesVm(object):
return 'Halted'
except libvirt.libvirtError:
if vmm.libvirt_conn.virConnGetLastError()[0] == libvirt.VIR_ERR_NO_DOMAIN:
return "NA"
return "Halted"
else:
raise