[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt-users] Event&Callback in QEMU

Hi buddy,
I wanna to monitor a domain's life cycle event, so i register a event an a

virConnectDomainEventCallback, the code segment is as below:
int DomainEventCallback(virConnectPtr conn,
virDomainPtr dom,
int event,
int detail,
void * opaque){
/*My code */

int main(){

/* .....*/
virDomainPtr dom = domain.getDomains("xp");
virFreeCallback freecb = NULL;
void *opaque =NULL;
virConnectDomainEventCallback cb =DomainEventCallback;
virConnectDomainEventRegisterAny(conn, dom, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(cb),opaque,freecb);
/* .....*/

but such a error happened:
libvir: Remote error : this function is not supported by the connection driver: no event support

and the libvirt version is 0.9; the driver is QEMU-KVM ,version is 0.14.0.

I want to know why this Error will happen? Is the QEMU not support the
LIFECYCLE Event ? If it is , how can i monitor the domain's life cycle event( such as started,defined and stopped..)

Pls help~~

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]