search for: get_all_libvirt_domains

Displaying 8 results from an estimated 8 matches for "get_all_libvirt_domains".

2014 Nov 07
2
Re: libguestfs-tools with libvirt SASL authentication
...think this may be a bug. virt-df has potentially 3(!) places where it can make a libvirt connection, although only 2 of them are being used on Ubuntu. (1) If you don't supply a list of domain names on the command line, then virt-df will call libvirt to get them. That happens in df/domains.c:get_all_libvirt_domains: https://github.com/libguestfs/libguestfs/blob/master/df/domains.c#L72 If you supply a domain name, then this is not used. (2) Secondly, virt-df calls into libguestfs (the C library) call guestfs_add_domain() with a domain name parameter as a literal string, either one fetched from (1) or one...
2014 Nov 13
0
Re: libguestfs-tools with libvirt SASL authentication
...info, Richard. > > Hi Dan, > > Any additional information on this? I don't know if Dan B wants to chime in here, but can you try out the following patch? diff --git a/df/domains.c b/df/domains.c index b2d9537..6cbc0f9 100644 --- a/df/domains.c +++ b/df/domains.c @@ -77,7 +77,8 @@ get_all_libvirt_domains (const char *libvirt_uri) size_t i; /* Get the list of all domains. */ - conn = virConnectOpenReadOnly (libvirt_uri); + conn = virConnectOpenAuth (libvirt_uri, virConnectAuthPtrDefault, + VIR_CONNECT_RO); if (!conn) { err = virGetLastError (); fpri...
2014 Nov 04
2
libguestfs-tools with libvirt SASL authentication
Hello, I'm running into an issue using the 'virt-df' command when SASL is enabled in libvirt. I'm running version 1.26.5 of libguestfs on an Ubuntu 14.04 OS. I'm running 'virt-df' for all guests at one time, not specifying a domain or image to use. I was expecting a SASL authentication prompt but to no avail. Below is a sample run: root@all-in-one:~# virt-df -P 15
2014 Nov 05
0
Re: libguestfs-tools with libvirt SASL authentication
...think this may be a bug. virt-df has potentially 3(!) places where it can make a libvirt connection, although only 2 of them are being used on Ubuntu. (1) If you don't supply a list of domain names on the command line, then virt-df will call libvirt to get them. That happens in df/domains.c:get_all_libvirt_domains: https://github.com/libguestfs/libguestfs/blob/master/df/domains.c#L72 If you supply a domain name, then this is not used. (2) Secondly, virt-df calls into libguestfs (the C library) call guestfs_add_domain() with a domain name parameter as a literal string, either one fetched from (1) or one...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...+ reply_with_perror ("asprintf"); + return -1; + } if (random_name (filename) == -1) { reply_with_perror ("random_name"); return -1; diff --git a/df/domains.c b/df/domains.c index aa0f449..9cb0a09 100644 --- a/df/domains.c +++ b/df/domains.c @@ -75,6 +75,8 @@ get_all_libvirt_domains (const char *libvirt_uri) virErrorPtr err; int n; size_t i; + CLEANUP_FREE int *ids = NULL; + CLEANUP_FREE char **names = NULL; /* Get the list of all domains. */ conn = virConnectOpenAuth (libvirt_uri, virConnectAuthPtrDefault, @@ -96,7 +98,11 @@ get_all_libvirt_domains (const c...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...--git a/df/domains.c b/df/domains.c index 9cb0a09..2407eec 100644 --- a/df/domains.c +++ b/df/domains.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <error.h> #include <libintl.h> #ifdef HAVE_LIBVIRT @@ -99,10 +100,8 @@ get_all_libvirt_domains (const char *libvirt_uri) } ids = malloc (sizeof (int) * n); - if (ids == NULL) { - perror ("malloc"); - exit (EXIT_FAILURE); - } + if (ids == NULL) + error (EXIT_FAILURE, errno, "malloc"); n = virConnectListDomains (conn, ids, n); if (n == -1) { e...