From 2ec08734dd3395e6f8db240fa317ed5ca02057f0 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 28 Apr 2012 02:51:43 +0200 Subject: [PATCH] dom0/core: guid for HVM is connected to stubdom - respect it when checking its state (#25 pro) --- dom0/qvm-core/qubes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 671e9946..e882ff77 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -2375,6 +2375,14 @@ class QubesHVm(QubesVm): xc.domain_unpause(self.stubdom_xid) super(QubesHVm, self).unpause() + def is_fully_usable(self): + xid = self.stubdom_xid + if xid < 0: + return False + if not os.path.exists('/var/run/qubes/guid_running.%d' % xid): + return False + return True + class QubesVmCollection(dict): """ A collection of Qubes VMs indexed by Qubes id (qid)