utils/QubesWatch: register domain watches on VIR_DOMAIN_EVENT_RESUMED
QubesVM.start() first creates domain as paused, completes its setup (including starting qubesdb-daemon and creating appropriate entries), then resumes the domain. So wait for that resume to be sure that `qubesdb-daemon` is already running and populated. QubesOS/qubes-issues#1110
This commit is contained in:
parent
5f0d564051
commit
ef6095662e
@ -835,7 +835,9 @@ class QubesWatch(object):
|
||||
del(self._qdb[name])
|
||||
|
||||
def _domain_list_changed(self, conn, domain, event, reason, param):
|
||||
if event == libvirt.VIR_DOMAIN_EVENT_STARTED:
|
||||
# use VIR_DOMAIN_EVENT_RESUMED instead of VIR_DOMAIN_EVENT_STARTED to
|
||||
# make sure that qubesdb daemon is already running
|
||||
if event == libvirt.VIR_DOMAIN_EVENT_RESUMED:
|
||||
self._register_watches(domain)
|
||||
elif event == libvirt.VIR_DOMAIN_EVENT_STOPPED:
|
||||
self._unregister_watches(domain)
|
||||
|
Loading…
Reference in New Issue
Block a user