search for: virdomainfree

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

2011 Aug 16
1
Detecting the last user of a connection has closed.
The documentation says something that concerns me: http://libvirt.org/html/libvirt-libvirt.html#virConnectClose "It is possible for the last virConnectClose<http://libvirt.org/html/libvirt-libvirt.html#virConnectClose>to return a positive value if some other object still has a temporary reference to the connection, but the application should not try to further use
2016 Jan 19
2
[PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...a->name, check_for_errors ? "VIR_DOMAIN_DESTROY_GRACEFUL" : "0"); - if (virDomainDestroyFlags (dom, flags) == -1) { - libvirt_error (g, _("could not destroy libvirt domain")); - ret = -1; - } + ret = destroy_domain (g, dom, check_for_errors); virDomainFree (dom); } - if (conn != NULL) virConnectClose (conn); @@ -2068,6 +2062,37 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) return ret; } +/* Wrapper around virDomainDestroy which handles errors and retries.. */ +static int +destroy_domain (guestfs_h *g, virDom...
2011 Dec 13
1
Thread-safety issues with vbox driver ?
...nCreate(dom) != 0) { printf("failed to start %s\n", buf); goto end; } printf("%s started\n", buf); if (virDomainDestroy(dom) != 0) { printf("failed to destroy %s\n", buf); } printf("%s destroyed\n", buf); end: virDomainFree(dom); pthread_exit(NULL); } int main(int argc, char **argv) { virConnectPtr conn = virConnectOpen("vbox:///session"); int i; int count = virConnectNumOfDefinedDomains(conn); char **names = malloc(count * sizeof(char *)); virConnectListDefinedDomains(conn, nam...
2016 Aug 03
0
Crash after connection close when callback is in progress
...unit=\"KiB\">8192</memory>" "<os><type>hvm</type> </os>" "</domain>"); assert(dom != NULL); assert(virDomainCreate(dom) != -1); virDomainFree(dom); assert(virConnectDomainEventDeregisterAny(conn, cbid) != -1); if (virConnectClose(conn) > 0 ) { printf("leak...\n"); } usleep(100000); return 0; } #+end_src Running this program in an infinite loop triggers the bug in less than 1 second (most of the t...
2010 Oct 01
1
undefining and redefining a Domain
<resending as I don't think I was in the mailing list yet when I sent first time... apologies if you receive this twice> Hello, I'm facing some strange behavior, and I hope you can provide a clarification. Consider the following code: virDomainPtr dom = virDomainLookupByName(virt, domain_name); if (dom) { printf("domain already
2012 May 19
1
Migration with rbd storage backend
...926: debug : qemuDomainObjEndAsyncJob:955 : Stopping async job: migration out 2012-05-17 21:22:30.250+0000: 16926: debug : virDomainObjUnref:1645 : obj=0x1c00cd0 refs=3 2012-05-17 21:22:30.250+0000: 16926: debug : virDomainMigrateBegin3:6173 : xml (null) 2012-05-17 21:22:30.250+0000: 16926: debug : virDomainFree:2345 : dom=0x1d7ee30, (VM: name=testvm, uuid=feb7ccb6-1087-8661-9284-62e3a1e9f44a) 2012-05-17 21:22:30.250+0000: 16926: debug : virUnrefDomain:276 : unref domain 0x1d7ee30 testvm 1 ---snip--- Also there is a second point - libvirt doesn`t allow migration of VM until all snapshots has been deleted,...
2016 Jan 19
0
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
..."VIR_DOMAIN_DESTROY_GRACEFUL" : "0"); > - if (virDomainDestroyFlags (dom, flags) == -1) { > - libvirt_error (g, _("could not destroy libvirt domain")); > - ret = -1; > - } > + ret = destroy_domain (g, dom, check_for_errors); > virDomainFree (dom); > } > - > if (conn != NULL) > virConnectClose (conn); > > @@ -2068,6 +2062,37 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > return ret; > } > > +/* Wrapper around virDomainDestroy which handles errors and retries.. */...
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...UNNING || - state == VIR_DOMAIN_BLOCKED || - state == VIR_DOMAIN_PAUSED) { - snprintf (errmsg, sizeof errmsg, - _("libvirt domain ‘%s’ is running or paused. It must be shut down in order to perform virt-v2v conversion"), - domname); - virDomainFree (dom); - virConnectClose (conn); - caml_invalid_argument (errmsg); - } - } - - /* Use VIR_DOMAIN_XML_SECURE to get passwords (RHBZ#1174123). */ - xml = virDomainGetXMLDesc (dom, VIR_DOMAIN_XML_SECURE); - if (xml == NULL) { - err = virGetLastError (); - snprintf (errmsg, sizeo...
2010 Nov 14
2
java binding and virtualbox-ose
...--------------------- 11:37:18.666: debug : virDomainLookupByName:1974 : conn=0x95a1910, name=tty 11:37:18.669: debug : virGetDomain:345 : New hash entry 0x95dad48 11:37:18.669: debug : virDomainGetInfo:2825 : domain=0x95dad48, info=0xbfeca708 - tty shut off 11:37:18.673: debug : virDomainFree:2062 : domain=0x95dad48 11:37:18.673: debug : virUnrefDomain:422 : unref domain 0x95dad48 tty 1 11:37:18.673: debug : virReleaseDomain:376 : release domain 0x95dad48 tty 11:37:18.673: debug : virReleaseDomain:392 : unref connection 0x95a1910 2 11:37:18.673: debug : virConnectClose:1355 : conn=0x95...
2016 Jan 19
1
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...EFUL" : "0"); > > - if (virDomainDestroyFlags (dom, flags) == -1) { > > - libvirt_error (g, _("could not destroy libvirt domain")); > > - ret = -1; > > - } > > + ret = destroy_domain (g, dom, check_for_errors); > > virDomainFree (dom); > > } > > - > > if (conn != NULL) > > virConnectClose (conn); > > > > @@ -2068,6 +2062,37 @@ shutdown_libvirt (guestfs_h *g, void *datav, int check_for_errors) > > return ret; > > } > > > > +/* Wrapper around virD...
2009 Jun 19
0
Re: [libvirt] domain.info() sometimes returns state zero for running machines
...0x9b580a0, uuid=0xbff74aac) >> DEBUG: libvirt.c: virDomainGetOSType (domain=0x9b580a0) >> DEBUG: libvirt.c: virDomainGetInfo (domain=0x9b580a0, info=0xbff74b2c) >> DEBUG: libvirt.c: virDomainGetAutostart (domain=0x9b580a0, >> autostart=0xbff74b44) >> DEBUG: libvirt.c: virDomainFree (domain=0x9b580a0) >> DEBUG: hash.c: virUnrefDomain (unref domain 0x9b580a0 >> ac06e4f0-59b1-11de-8a39-0800200c9a66 1) >> DEBUG: hash.c: virReleaseDomain (release domain 0x9b580a0 >> ac06e4f0-59b1-11de-8a39-0800200c9a66) >> DEBUG: hash.c: virReleaseDomain (unref conn...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...n ( virConnectOpenAuth ( virConnectOpenReadOnly ( virConnectRef( virConnectSetKeepAlive( virConnResetLastError ( virConnSetErrorFunc ( virDomainAttachDeviceFlags ( virDomainBlockPeek ( virDomainBlockStats ( virDomainCreateXML ( virDomainDestroy ( virDomainDestroyFlags ( virDomainDetachDeviceFlags ( virDomainFree ( virDomainGetConnect ( virDomainGetCPUStats( virDomainGetID ( virDomainGetInfo ( virDomainGetMaxMemory ( virDomainGetName ( virDomainGetSchedulerParameters ( virDomainGetSchedulerType ( virDomainGetUUID ( virDomainGetUUIDString ( virDomainGetVcpus ( virDomainGetXMLDesc ( virDomainInterfaceStats (...
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...appropriate for virt-v2v. (RHBZ#1138586) */ @@ -249,7 +304,6 @@ v2v_dumpxml (value passwordv, value connv, value domnamev) _("libvirt domain ‘%s’ is running or paused. It must be shut down in order to perform virt-v2v conversion"), domname); virDomainFree (dom); - virConnectClose (conn); caml_invalid_argument (errmsg); } } @@ -262,11 +316,9 @@ v2v_dumpxml (value passwordv, value connv, value domnamev) _("cannot fetch XML description of guest ‘%s’: %s"), domname, err->message); virDo...
2010 Sep 17
3
access VMX config on esxi with virsh
Hi, Is virsh able to access the VMX config of a virtual machine running on a esxi host? I would like to take backups of my virtual machine configs and the doku section "Converting from VMware VMX config to domain XML config" (http://libvirt.org/drvesx.html) comes close to this - but does not tell how to get access to the vmx file. I would prefer a solution where ssh access to the
2015 May 05
2
[PATCH 0/2] v2v: -o libvirt: Check if the domain exists on the target (RHBZ#889082).
https://bugzilla.redhat.com/show_bug.cgi?id=889082
2010 Dec 31
1
livemigrate problems
hello everybody and happy new year! I am a newbie in libvirt use, and I use it mostrly throught OpenNebula. Anyway, I noticed that one of the nodes can be a destination of a livemigrate but not the source. This is the environment: 4 blades nicknamed(*) red3, red9, red10, red11, each with 8 Intel E5506 cores (@ 2.13GHz) running CentOS 5 and KVM as hyoervisor. (*) these are names I
2020 Jan 10
5
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu. However it only requires an emulator for the same architecture, not for all architectures. libvirt-daemon-kvm pulls in qemu which pulls in emulators for all architectures, as well as a bunch of other stuff we don't need at all like network interface support and nwfilter. There are no Fedora TCG-only arches, so drop the conditional section. I also made support
2010 Mar 12
1
Problem with libvirt migration
...ut:343 : Timeout at 0 due in -1 ms 08:19:40.774: debug : virEventRunOnce:565 : Poll on 10 handles 0x2628850 timeout -1 08:19:40.960: debug : virEventUpdateTimeoutImpl:247 : Updating timer 1 timeout with 0 ms freq 08:19:40.960: debug : virEventInterruptLocked:640 : Interrupting 08:19:40.960: debug : virDomainFree:1922 : domain=0x2605c60 08:19:40.960: debug : virUnrefDomain:373 : unref domain 0x2605c60 base32 1 08:19:40.960: debug : virReleaseDomain:327 : release domain 0x2605c60 base32 08:19:40.960: debug : virReleaseDomain:343 : unref connection 0x2679bd0 2 08:19:40.960: debug : virEventUpdateHandleImpl:14...
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html It adds a couple of simple code changes, so it makes it possible to drop more modules. In addition, more unused modules were dropped. Pino Toscano (5): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon:
2019 Nov 27
7
[PATCH v3 0/6] remove unused build stuff
This is an extended version of: https://www.redhat.com/archives/libguestfs/2019-September/msg00288.html Apparently I forgot it on my tree, so I'm posting that series again, adding an extra cleanup more due to the v2v/common splits. Pino Toscano (6): tests: switch away from xgetcwd daemon: move read_whole_file to common utils daemon: switch from read_file to read_whole_file daemon: