search for: libvirt_error

Displaying 20 results from an estimated 27 matches for "libvirt_error".

2016 Jan 19
2
[PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...gs = check_for_errors ? VIR_DOMAIN_DESTROY_GRACEFUL : 0; - debug (g, "calling virDomainDestroy \"%s\" flags=%s", - data->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_...
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
...erDetach (xb); + if (xml == NULL) { + perrorf (g, "xmlBufferDetach"); + return -1; + } + + debug (g, "libvirt secret XML:\n%s", xml); + + /* Pass the XML to libvirt. */ + secret = virSecretDefineXML (data->conn, (const char *) xml, 0); + if (secret == NULL) { + libvirt_error (g, _("could not define libvirt secret")); + return -1; + } + + /* Set the secret. */ + if (virSecretSetValue (secret, + (const unsigned char *) drv->src.secret, + strlen (drv->src.secret), + 0) == -1) { +...
2013 May 16
1
[PATCH] Fix compiler warning when libselinux is not present
...guestfs_h *g); static void clear_socket_create_context (guestfs_h *g); + +#if HAVE_LIBSELINUX static void selinux_warning (guestfs_h *g, const char *func, const char *selinux_op, const char *data); +#endif static int launch_libvirt (guestfs_h *g, const char *libvirt_uri) @@ -1716,6 +1719,7 @@ libvirt_error (guestfs_h *g, const char *fs, ...) free (msg); } +#if HAVE_LIBSELINUX static void selinux_warning (guestfs_h *g, const char *func, const char *selinux_op, const char *data) @@ -1724,6 +1728,7 @@ selinux_warning (guestfs_h *g, const char *func, " [you can ig...
2016 Jan 19
0
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...s ? VIR_DOMAIN_DESTROY_GRACEFUL : 0; > - debug (g, "calling virDomainDestroy \"%s\" flags=%s", > - data->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_...
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...) + cpu->apic = 1; + else if (STREQ (flag, "pae")) + cpu->pae = 1; + } + + if (errno) { + perror ("getline"); + return; + } +} + +#ifdef HAVE_LIBVIRT + +static void +ignore_errors (void *ignore, virErrorPtr ignore2) +{ + /* empty */ +} + +static void libvirt_error (const char *fs, ...) __attribute__((format (printf,1,2))); + +static void +libvirt_error (const char *fs, ...) +{ + va_list args; + CLEANUP_FREE char *msg = NULL; + int len; + virErrorPtr err; + + va_start (args, fs); + len = vasprintf (&msg, fs, args); + va_end (args); + + if (len &lt...
2014 Oct 31
1
[PATCH v2] launch: libvirt: Implement drive secrets (RHBZ#1159016).
Since v1: - Base64 decode the Ceph secret before passing it to libvirt. - Don't call virSecretFree (NULL) [libvirt bug?] - Small cleanups.
2016 Jan 19
1
Re: [PATCH libguestfs v3] lib: Handle slow USB devices more gracefully.
...OY_GRACEFUL : 0; > > - debug (g, "calling virDomainDestroy \"%s\" flags=%s", > > - data->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); >...
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...map.xml */ + if (STREQ (vendor, "GenuineIntel")) + cpu->vendor = strdup ("Intel"); + else if (STREQ (vendor, "AuthenticAMD")) + cpu->vendor = strdup ("AMD"); + /* Currently aarch64 lscpu has no Vendor ID XXX. */ + } } -static void libvirt_error (const char *fs, ...) __attribute__((format (printf,1,2))); - +/** + * Read the CPU topology from lscpu output. + */ static void -libvirt_error (const char *fs, ...) +get_topology (char **lscpu, struct cpu_config *cpu) { - va_list args; - CLEANUP_FREE char *msg = NULL; - int len; - virErrorPt...
2019 May 24
3
[PATCH 0/2] libvirt: fix check of custom QEMU
In case you configure libguestfs with a custom QEMU, e.g.: $ ./configure [...] QEMU=/path/to/qemu then the libvirt backend did not use to override it, launching the appliance with the default QEMU for libvirt. This does not change the manual emulator overriding using set-hv. Pino Toscano (2): launch: libvirt: get default QEMU from domcapabilities launch: libvirt: fix custom hypervisor
2019 May 24
0
[PATCH 2/2] launch: libvirt: fix custom hypervisor check
...letions(-) diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index 8ab1211c4..95aed8054 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -163,7 +163,7 @@ static void debug_appliance_permissions (guestfs_h *g); static void debug_socket_permissions (guestfs_h *g); static void libvirt_error (guestfs_h *g, const char *fs, ...) __attribute__((format (printf,2,3))); static void libvirt_debug (guestfs_h *g, const char *fs, ...) __attribute__((format (printf,2,3))); -static int is_custom_hv (guestfs_h *g); +static int is_custom_hv (guestfs_h *g, struct backend_libvirt_data *data); static...
2020 Jan 16
1
[PATCH] launch: libvirt: use machine type when querying for domcaps
...ties (conn, NULL, NULL, +#ifdef MACHINE_TYPE + MACHINE_TYPE, +#else + NULL, +#endif NULL, 0); if (!domcapabilities_xml) { libvirt_error (g, _("could not get libvirt domain capabilities")); -- 2.24.1
2012 Jul 21
8
[PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.
This preliminary patch series adds a libvirt backend to libguestfs. It's for review only because although it launches the guest OK, there are some missing features that need to be implemented. The meat of the patch is in part 4/4. To save you the trouble of interpreting libxml2 fragments, an example of the generated XML and the corresponding qemu command line are attached below. Note the
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap) support. This will allow us to change virt-sparsify to work on disk images in-place (instead of using slow & inefficient copying). The approach used is to add an optional 'discard' parameter to add-drive. It has 3 possible settings: - 'disable' : the default, no discard is done - 'besteffort' :
2017 Mar 16
7
[PATCH 0/4] Pass CPU vendor, model and topology from source to target.
This is tangentially related to: https://bugzilla.redhat.com/show_bug.cgi?id=1372668 The problem in that bug is that we didn't pass the source CPU model (Sandybridge in that case) through to the target RHV hypervisor. So when the Windows guest booted on the target it gives an error about CPU hardware being disconnected (although it otherwise boots and works fine). This patch series
2017 Mar 17
7
[PATCH v2 0/6] v2v: Pass CPU vendor, model and topology from source to target.
v1 -> v2: - Support for passing topology through -o glance. - Support for passing topology through -o rhv. - Use bool for acpi/apic/pae struct fields in virt-p2v. - Write the xpath expression in error messages instead of file/line. - Fix more memory leaks in virt-p2v cpuid.c. - Passes make check & check-valgrind. There may be some other minor changes. I believe that everything
2014 Mar 12
12
[PATCH v3 00/10] Add discard support.
This set of patches: - Adds new APIs to support discard in libguestfs. - Adds discard support to virt-format. - Adds discard support to virt-sysprep. - Implements virt-sparsify --in-place. This is now working, after fixing the rather stupid bug in fstrim. I've pushed the ones which were ACKed previously + the fstrim fix. Rich.
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.
2012 Oct 08
3
[PATCH v3 0/3] Add support for disk labels and hotplugging.
This is, I guess, version 3 of this patch series which adds disk labels and hotplugging (only hot-add implemented so far). The good news is .. it works! Rich.
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...___print_timestamped_message (g, "connect to libvirt"); /* Connect to libvirt, get capabilities. */ - /* XXX Support libvirt authentication in the future. */ - conn = virConnectOpen (libvirt_uri); + conn = guestfs___open_libvirt_connection (g, libvirt_uri, 0); if (!conn) { libvirt_error (g, _("could not connect to libvirt (URI = %s)"), libvirt_uri ? : "NULL"); diff --git a/src/libvirt-auth.c b/src/libvirt-auth.c new file mode 100644 index 0000000..c3e3ddc --- /dev/null +++ b/src/libvirt-auth.c @@ -0,0 +1,369 @@ +/* libguestfs + * Copyright (C) 2012...
2013 Feb 28
7
[PATCH 0/7] Fix SELinux security contexts so we can access shared disks (RHBZ#912499).
https://bugzilla.redhat.com/show_bug.cgi?id=912499 (especially comments 7 & 10) This patch set is the final fix so that we can access disks in use by other guests when SELinux and sVirt are enabled. Previously such disks were inaccessible because sVirt labels the disks with a random SELinux label to prevent other instances of qemu from being able to read them. So naturally the libguestfs