search for: vir_domain_event_id_lifecycl

Displaying 20 results from an estimated 25 matches for "vir_domain_event_id_lifecycl".

2013 Aug 20
2
virConnectDomainEventRegisterAny problem
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 good day. i trying to make callback function for VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering callback, but it never called, i need to know when domain started, stopped or crashed, i have write following code static int domain_event_handler(virConnectPtr conn, virDomainPtr dom, int event, int detail, void * opaque) { switch(event) { } re...
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 21.08.2013 09:32, Martin Kletzander пишет: > On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: >> >> good day. i trying to make callback function for >> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering >> callback, but it never called, i need to know when domain >> started, stopped or crashed, i have write following code >> >> static int domain_event_handler(virConnectPtr conn, >> virDomainPtr dom, int event, int detail, void * o...
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
...MESSAGE----- > Hash: SHA1 > > 21.08.2013 09:46, Alexandr пишет: > > 21.08.2013 09:32, Martin Kletzander пишет: > >> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: > >>> > >>> good day. i trying to make callback function for > >>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering > >>> callback, but it never called, i need to know when domain > >>> started, stopped or crashed, i have write following code > >>> > >>> static int domain_event_handler(virConnectPtr conn, > >>> v...
2013 Aug 22
1
Re: virConnectDomainEventRegisterAny problem
...;> 21.08.2013 09:46, Alexandr пишет: >>>> 21.08.2013 09:32, Martin Kletzander пишет: >>>>> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: >>>>>> >>>>>> good day. i trying to make callback function for >>>>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully >>>>>> registering callback, but it never called, i need to >>>>>> know when domain started, stopped or crashed, i have >>>>>> write following code >>>>>> >>>>>> static int domain_ev...
2013 Oct 14
2
event handler
...; 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to register event implementation: %s\n", err && err->message ? err->message: "Unknown error"); return -1; } { int callback = virConnectDomainEventRegisterAny(libvirt_connection, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); if(callback == -1) { std::cout<<"Error: failed to register domain event handle callback\n"; return -1; } } boost::thread(boost::bind(&libvirt_eventloop_thr_func)); ... libvirt_eventloop_thr_func()...
2013 Oct 14
2
Re: event handler
...ent implementation: >> %s\n", >> err && err->message ? err->message: "Unknown error"); >> return -1; >> } >> { >> int callback = >> virConnectDomainEventRegisterAny(libvirt_connection, NULL, >> VIR_DOMAIN_EVENT_ID_LIFECYCLE, >> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); >> if(callback == -1) >> { >> std::cout<<"Error: failed to register domain event handle >> callback\n"; >> return -1; >> } &gt...
2011 Nov 04
1
Event&Callback in QEMU
...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...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: > > good day. i trying to make callback function for > VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering callback, > but it never called, i need to know when domain started, stopped or > crashed, i have write following code > > static int domain_event_handler(virConnectPtr conn, virDomainPtr dom, > int event, int detail, void * opaque) > { >...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 21.08.2013 09:46, Alexandr пишет: > 21.08.2013 09:32, Martin Kletzander пишет: >> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: >>> >>> good day. i trying to make callback function for >>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering >>> callback, but it never called, i need to know when domain >>> started, stopped or crashed, i have write following code >>> >>> static int domain_event_handler(virConnectPtr conn, >>> virDomainPtr dom, int even...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
...: SHA1 >> >> 21.08.2013 09:46, Alexandr пишет: >>> 21.08.2013 09:32, Martin Kletzander пишет: >>>> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: >>>>> >>>>> good day. i trying to make callback function for >>>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully >>>>> registering callback, but it never called, i need to know >>>>> when domain started, stopped or crashed, i have write >>>>> following code >>>>> >>>>> static int domain_event_handler(virConnec...
2013 Oct 14
2
Re: event handler
...t; err && err->message ? err->message: "Unknown error"); >>>> return -1; >>>> } >>>> { >>>> int callback = >>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL, >>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, >>>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); >>>> if(callback == -1) >>>> { >>>> std::cout<<"Error: failed to register domain event >>>> handle >>>> callback\n&quo...
2016 Aug 03
0
Crash after connection close when callback is in progress
...pthread_t event_loop; assert(pthread_create(&event_loop, NULL, loop, NULL) == 0); virConnectPtr conn = virConnectOpen("test:///default"); assert(conn != NULL); int cbid = virConnectDomainEventRegisterAny(conn, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, callback, NULL, freecb); assert(cbid != -1); virDomainPtr dom = virDomainDefineXML(conn, "<domain type=\"test\">"...
2011 Apr 06
0
Registering a callback in Java
...ublic void eventCallback(ConnectionPointer cp, DomainPointer dp, Pointer pntr) { System.out.println("event!"); } }); I can't get the println when I suspend or resume the domains. And the reason I wrote "0" is that I could not find VIR_DOMAIN_EVENT_ID_LIFECYCLE constant in java API. Any help about where to find macros,types and enumerations in java API is appreciated. Unfortunately I can not find anything about events in javadoc neither. Any comments? Kind regards Kadir -------------- next part -------------- An HTML attachment was scrubbed... URL: <...
2013 Oct 14
0
Re: event handler
...tf(stderr, "Failed to register event implementation: %s\n", > err && err->message ? err->message: "Unknown error"); > return -1; > } > { > int callback = > virConnectDomainEventRegisterAny(libvirt_connection, NULL, > VIR_DOMAIN_EVENT_ID_LIFECYCLE, > VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); > if(callback == -1) > { > std::cout<<"Error: failed to register domain event handle > callback\n"; > return -1; > } > } > > boost...
2013 Oct 14
0
Re: event handler
...: %s\n", >>> err && err->message ? err->message: "Unknown error"); >>> return -1; >>> } >>> { >>> int callback = >>> virConnectDomainEventRegisterAny(libvirt_connection, NULL, >>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, >>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); >>> if(callback == -1) >>> { >>> std::cout<<"Error: failed to register domain event handle >>> callback\n"; >>> return -1...
2013 Oct 14
0
Re: event handler
...t;message ? err->message: "Unknown error"); >>>>> return -1; >>>>> } >>>>> { >>>>> int callback = >>>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL, >>>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, >>>>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL); >>>>> if(callback == -1) >>>>> { >>>>> std::cout<<"Error: failed to register domain event handle >>>>> callback\n&q...
2014 Dec 22
0
Device attach event
...o use libvirt events API, but I can't find what event is fired when some device (disk in this case) got attached to the domain. In the docs I see only VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, but not VIR_DOMAIN_EVENT_ID_DEVICE_ATTACHED. Is there some event for that? BTW libxl driver implements only VIR_DOMAIN_EVENT_ID_LIFECYCLE, but that's another story... -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
2012 Oct 03
1
no callback on VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE in 0.10.2
...libvirt 0.10.2 was built from tar today and appears to be working fine. The guest is running CentOS 6.3 as well. Using the provided test programs under examples/domain-events/ in C and Python, I'm not seeing VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE ever tick, although I do see other events like VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_ID_REBOOT, and VIR_DOMAIN_EVENT_ID_RTC_CHANGE. The balloon is definitely changing, and is reflected by both virsh -c qemu:///system dommemstat <dom> and free inside the guest. Here's the balloon in my config for reference: <memballoon model='virtio'...
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...conn = Connect_val (connv); + virDomainPtr dom = NULL; + int eventID = Tag_val(callback); + + virConnectDomainEventGenericCallback cb; + void *opaque; + virFreeCallback freecb = free; + int r; + + if (domv != Val_int(0)) + dom = Domain_val (Field(domv, 0)); + + switch (eventID){ + case VIR_DOMAIN_EVENT_ID_LIFECYCLE: + cb = VIR_DOMAIN_EVENT_CALLBACK(i_i_callback); + break; + case VIR_DOMAIN_EVENT_ID_REBOOT: + cb = VIR_DOMAIN_EVENT_CALLBACK(u_callback); + break; + case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: + cb = VIR_DOMAIN_EVENT_CALLBACK(i64_callback); + break; + case VIR_DOMAIN_EVENT_ID_WATCHD...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |