[libvirt-users] Python API and events, how to deal with libvirtd stop/start

Jasper js at i32.nl
Tue Mar 8 22:47:00 UTC 2011


Hi list,

I'm using the Python API to check for libvirt events. Works well, but 
when libvirtd is restarted, or stopped completely, the events are no 
longer seen. I guess this is logical, but how would I deal with this 
situation ?

I can re-open the connection to libvirt and re-register the callbacks, 
but this does not work. If I call virEventLoopPureRegister() again, the 
app crashes with a glibc error.

Any ideas ? You can reproduce this by using the event-test.py supplied 
with libvirt. Fire it up, restart libvirtd and see what happens when you 
start or stop a domain for example.

Many thanks for any pointers.

- Jasper




More information about the libvirt-users mailing list