dom0: catch error when no VM found by libxc (assume not running)

This commit is contained in:
Marek Marczykowski 2011-06-04 02:46:12 +02:00
parent f5751bfea7
commit 7b2ac4b279

View File

@ -391,7 +391,11 @@ class QubesVm(object):
start_xid = self.xid
if start_xid < 0:
start_xid = 0
try:
domains = xc.domain_getinfo(start_xid, qubes_max_xid-start_xid)
except xen.lowlevel.xc.Error:
return None
for dominfo in domains:
domname = xl_ctx.domid_to_name(dominfo['domid'])
if domname == self.name: