[libvirt] Error while running event-test.c from libvirt

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 myFreeFunc: Freeing [pmwakeup] libvir: XML-RPC error : internal error unsupported event ID 11 myFreeFunc: Freeing [pmsuspend] libvir: XML-RPC error : internal error unsupported event ID 12 myFreeFunc: Freeing [callback balloonchange] libvir: XML-RPC error : internal error unsupported event ID 13 main:580: Closing connection done Please help Thank you avanti

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 myFreeFunc: Freeing [pmwakeup] libvir: XML-RPC error : internal error unsupported event ID 11 myFreeFunc: Freeing [pmsuspend] libvir: XML-RPC error : internal error unsupported event ID 12 myFreeFunc: Freeing [callback balloonchange] libvir: XML-RPC error : internal error unsupported event ID 13 main:580: Closing connection done
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. Try to build the libvirt from the sources and you should be all good again. BTW: there's no need to build the event-test.c like that (but you can, if you want to). You can just: make -C examples/object-events/ event-test Michal

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
participants (3)
-
Avanti Ajay
-
Eric Blake
-
Michal Privoznik