From 7b2ac4b2795bb7e363d3ccf11d0735f4ed49e626 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 4 Jun 2011 02:46:12 +0200 Subject: [PATCH] dom0: catch error when no VM found by libxc (assume not running) --- dom0/qvm-core/qubes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index d289f9d6..aaf3c696 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -391,7 +391,11 @@ class QubesVm(object): start_xid = self.xid if start_xid < 0: start_xid = 0 - domains = xc.domain_getinfo(start_xid, qubes_max_xid-start_xid) + 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: