[libvirt] detection of events in kvm

Hello, I am student and doing a project in virtualization.My project requires detection of events in kvm like start of a virtual machine,shutoff of a virtual machine. So I want to know if there is any way by which I can detect these events.As in I want to write a code which will detect these events and then handle them.I am using ubuntu 13.04. I would be glad if anyone can help me. Thanks

On 01/04/2014 12:27 AM, rash wrote:
Hello, I am student and doing a project in virtualization.My project requires detection of events in kvm like start of a virtual machine,shutoff of a virtual machine.
Yes, libvirt supports various events for asynchronous feedback when certain actions have happened in a guest, including when a guest i started or stopped. See examples/object-events/events-test.c for an example of how to use them from a C program; there are also bindings in other languages such as libvirt-python. I'm also in the process of adding a new API that allows developers to query arbitrary QMP events from qemu, even if those events have not yet been ported to libvirt events. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
rash