search for: vireventregisterdefaultimpl

Displaying 20 results from an estimated 36 matches for "vireventregisterdefaultimpl".

2020 Apr 02
1
can libvirt.so use jemalloc to manage mem ?
HI, all My daemon exists a libvirt API call: virEventRegisterDefaultImpl(); once I called the virEventRegisterDefaultImpl() ,must be core ,the bt stack is: (gdb) bt #0 free (ptr=0x1) at include/jemalloc/internal/arena.h:652 #1 0x00007f57690a488a in virFree () from /lib64/libvirt.so.0 #2 0x00007f57690c3562 in virResetError () from /lib64/libvirt.so.0 #3 0x00007f5...
2014 Apr 01
3
set keep alive
Can anyone explain what is happening. After call virConnectOpen virEventRegisterDefaultImpl() call virConnectSetKeepAlive returns VirtError(1): internal error: the caller doesn't support keepalive protocol; perhaps it's missing event loop implementation, but the next call this sequence of commands returns success. Why virConnectSetKeepAlive not work right the first time? -- Fl...
2011 Apr 14
1
Where actually is the callback triggered?
Hi all, Quick question: When the hypervisor triggers a callback which is registered for generic events, (assuming I'm connected through qemu+tcp) where exactly is the callback triggered? On the hypervisor host or on my host? Regards Kadir -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Oct 14
2
Re: event handler
...quot;); >> } >> } >> } >> >> >> >> ... >> >> virSetErrorFunc(NULL, libvirt_error_handler); >> libvirt_connection = virConnectOpen("qemu:///system"); > > Move this line ^^^ ... > >> if (virEventRegisterDefaultImpl() < 0) >> { >> virErrorPtr err = virGetLastError(); >> fprintf(stderr, "Failed to register event implementation: >> %s\n", >> err && err->message ? err->message: "Unknown error"); >> return -1;...
2017 Oct 17
2
virConnectIsAlive
...onnection(virConnectPtr) has to reconnect, Before usr old virConnectPtr , I call virConnectIsAlive. but when I restart libvirtd , virConnectIsAlive return 1, and I continue other operate use the old virConnectPtr, program will receive signal pipe. I use libvirt event. before any api use, I call virEventRegisterDefaultImpl, and run virEventRunDefaultImpl. then use virConnectIsAlive, when I restart libvirtd, virConnectIsAlive will return 0, I want know how to use virConnectIsAlive, if virConnectIsAlive use keep alive message, what default the interval and count. Thanks
2013 Oct 14
2
Re: event handler
...>>>> >>>> ... >>>> >>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>> libvirt_connection = virConnectOpen("qemu:///system"); >>> >>> Move this line ^^^ ... >>> >>>> if (virEventRegisterDefaultImpl() < 0) >>>> { >>>> virErrorPtr err = virGetLastError(); >>>> fprintf(stderr, "Failed to register event implementation: >>>> %s\n", >>>> err && err->message ? err->message: "Unknown error...
2013 Oct 14
2
event handler
...= virGetLastError(); fprintf(stderr, "Failed to run event loop: %s\n", err && err->message ? err->message : "Unknown error"); } } } ... virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if (virEventRegisterDefaultImpl() < 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,...
2012 Feb 12
0
java binding
Hi all, I'm trying to use the libvirt event system in order to notify the VM status (VM boot, reboot, crash, etc.). I must use the java binding, so I exposed some calls not present in "Libvirt-java" jna interface: virEventRunDefaultImpl() virEventRegisterDefaultImpl() (and several costant). In my java source I tried to intercept the event, using the "Connection.domainEventRegisterAny( ... )" call , but the "answer" was: "this function is not supported by the connection driver: no event support". No errors issued on the virEventR...
2013 Oct 14
0
Re: event handler
...>>> } >>> >>> >>> >>> ... >>> >>> virSetErrorFunc(NULL, libvirt_error_handler); >>> libvirt_connection = virConnectOpen("qemu:///system"); >> >> Move this line ^^^ ... >> >>> if (virEventRegisterDefaultImpl() < 0) >>> { >>> virErrorPtr err = virGetLastError(); >>> fprintf(stderr, "Failed to register event implementation: %s\n", >>> err && err->message ? err->message: "Unknown error"); >>>...
2013 Oct 14
0
Re: event handler
...t;>> ... >>>>> >>>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>>> libvirt_connection = virConnectOpen("qemu:///system"); >>>> >>>> Move this line ^^^ ... >>>> >>>>> if (virEventRegisterDefaultImpl() < 0) >>>>> { >>>>> virErrorPtr err = virGetLastError(); >>>>> fprintf(stderr, "Failed to register event implementation: >>>>> %s\n", >>>>> err && err->message ? err->message:...
2014 Apr 02
0
Re: set keep alive
At Tue, 1 Apr 2014 17:29:25 +0400, Fl@sh wrote: > > Can anyone explain what is happening. > After call > virConnectOpen > virEventRegisterDefaultImpl() > call virConnectSetKeepAlive returns > VirtError(1): internal error: the caller doesn't > support keepalive protocol; perhaps it's missing > event loop implementation, > but the next call this sequence of commands returns success. > Why virConnectSetKeepAlive not wor...
2013 Sep 18
2
Trouble using virStream with callbacks
...ByName(conn, DOMAIN)) == NULL) errx(1, "virDomainLookupByName"); if ((st = virStreamNew(conn, VIR_STREAM_NONBLOCK)) == NULL) errx(1, "virStreamNew"); if (virDomainOpenChannel(dom, CHANNEL, st, 0) == -1) errx(1, "virDomainOpenChannel"); if (virEventRegisterDefaultImpl() != 0) errx(1, "virEventRegisterDefaultImpl"); if (virStreamEventAddCallback(st, 1|4|8, stream_to_stdout, NULL, NULL) != 0) errx(1, "virStreamEventAddCallback"); int flags = fcntl(fileno(stdin), F_GETFL) | O_NONBLOCK; fcntl(fileno(stdin), F_SETFL, flags);...
2017 May 16
2
Duplicate reboot events
Hi, Running on: $ cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) And: $ rpm -qa |grep libvirt libvirt-daemon-2.0.0-10.el7_3.5.x86_64 libvirt-daemon-driver-qemu-2.0.0-10.el7_3.5.x86_64 libvirt-daemon-driver-secret-2.0.0-10.el7_3.5.x86_64 libvirt-client-2.0.0-10.el7_3.5.x86_64 libvirt-daemon-driver-network-2.0.0-10.el7_3.5.x86_64
2013 Aug 22
1
Re: virConnectDomainEventRegisterAny problem
...rSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if(libvirt_connection == NULL) { std::cout<<"failed to connect to qemu:///system\n"; return -1; } std::cout<<"connected to qemu:///system\n"; if (virEventRegisterDefaultImpl() < 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, NU...
2012 Mar 09
1
run virsh as non-root user
...virRegisterDeviceMonitor:686 : registering remote as device driver 2 21:48:08.342: 5830: debug : virRegisterSecretDriver:719 : registering remote as secret driver 2 21:48:08.342: 5830: debug : virRegisterNWFilterDriver:752 : registering remote as network filter driver 2 21:48:08.342: 5830: debug : virEventRegisterDefaultImpl:204 : registering default event implementation 21:48:08.342: 5830: debug : virEventPollAddHandle:112 : Add handle fd=4 events=1 cb=0x3848a40cb0 opaque=(nil) 21:48:08.342: 5830: debug : virEventPollAddHandle:116 : Used 0 handle slots, adding at least 10 more 21:48:08.342: 5830: debug : virEventPollI...
2016 Aug 03
0
Crash after connection close when callback is in progress
...rg) { while (1) { assert (virEventRunDefaultImpl() >= 0); } return NULL; } void callback(virConnectPtr conn, virDomainPtr dom, void *opaque) { // Do nothing. } void freecb(void *opaque) { // Do nothing. } int main() { assert(virInitialize() >= 0); assert(virEventRegisterDefaultImpl() >= 0); 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,...
2017 May 16
0
Re: Duplicate reboot events
...ks > >Martins > >#!/usr/bin/env python > >import libvirt >import time > >def RBcallback(conn, dom, opaque): > print "Reboot: Domain %s(%s)" % (dom.name(), dom.ID()) > print time.time() > >if __name__ == '__main__': > > libvirt.virEventRegisterDefaultImpl() > > conn = libvirt.openReadOnly('qemu:///system') > > conn.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_REBOOT, RBcallback, None) > > while True: > libvirt.virEventRunDefaultImpl() >_______________________________________________ >li...
2017 Jul 04
0
node device lifecycle callback can't resive event
...back function void nodeDeviceEventLifecycleCallback(virConnectPtr conn, virNodeDevicePtr dev, int event, int detail, void * opaque) { printf("event = %d, detail= %d\n", event, detail); } // registe node device lifecycle event int registeNodeDevEvent() { int ret = virEventRegisterDefaultImpl(); if (ret) { return -1;} ret = virConnectNodeDeviceEventRegisterAny(vmh_conn, NULL, VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE, VIR_NODE_DEVICE_EVENT_CALLBACK(nodeDeviceEventLifecycleCallback), NULL, NULL); if (-1 == ret) { return ret;} } Below some information about my hypervi...
2013 Oct 14
0
Re: event handler
...t; err->message ? err->message : "Unknown error"); > } > } > } > > > > ... > > virSetErrorFunc(NULL, libvirt_error_handler); > libvirt_connection = virConnectOpen("qemu:///system"); Move this line ^^^ ... > if (virEventRegisterDefaultImpl() < 0) > { > virErrorPtr err = virGetLastError(); > fprintf(stderr, "Failed to register event implementation: %s\n", > err && err->message ? err->message: "Unknown error"); > return -1; > } > { >...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...virDomainLookupByID ( virDomainLookupByName ( virDomainLookupByUUIDString ( virDomainMemoryPeek ( virDomainMigrate ( virDomainPinVcpu ( virDomainRef( virDomainSetMaxMemory ( virDomainSetMemory ( virDomainSetSchedulerParameters ( virDomainSetVcpus ( virDomainStatsRecordListFree ( virEventAddTimeout( virEventRegisterDefaultImpl ( virEventRemoveTimeout( virEventRunDefaultImpl ( virGetLastError ( virGetVersion ( virInitialize ( virNetworkFree ( virNodeGetCellsFreeMemory ( virNodeGetFreeMemory ( virNodeGetInfo ( virResetLastError ( virSecretDefineXML ( virSecretFree ( virSecretGetUUIDString ( virSecretGetValue ( virSecretLoo...