
On 03/24/2014 11:16 AM, Michal Privoznik wrote:
On 22.03.2014 08:37, Avanti Ajay wrote:
Hi..
I compiled event-test.c as : gcc event-test.c -o events -lvirt and then running as : ./events
But I am getting this output and the code terminates without detecting events :
main:471: Registering domain event cbs myFreeFunc: Freeing [tray change] libvir: XML-RPC error : internal error unsupported event ID 10
I think the problem is you're running an ancient libvirtd which doesn't understand any of tray change, pmwakeup, pmsuspend, balloonchange events. And in the way thaat the event-test demo program is written, it just closes the connection and exits.
You might also be interested in trying 'virsh event --all --loop', added in libvirt 1.2.2, which is a bit nicer client than event-test in that it explicitly ignores failures to register newer events from too-old servers. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org