Displaying 15 results from an estimated 15 matches for "parse_capabilities".
2015 Jan 20
9
[PATCH] daemon: readdir: fix invalid memory access on error
If "strdup (d->d_name)" fails with "i" > 0, then both "p" and
"ret->guestfs_int_dirent_list_val" are non-null pointers, but the latter
is no more valid (since "p" is the new realloc'ed buffer). Hence, trying
to free both will access to invalid memory.
Make sure to free only one of them, "p" if not null or
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
2020 Jan 16
1
[PATCH] launch: libvirt: use machine type when querying for domcaps
...7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index 864eae314..f2cad9300 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libvirt.c
@@ -431,7 +431,12 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
if (parse_capabilities (g, capabilities_xml, data) == -1)
goto cleanup;
- domcapabilities_xml = virConnectGetDomainCapabilities (conn, NULL, NULL, NULL,
+ domcapabilities_xml = virConnectGetDomainCapabilities (conn, NULL, NULL,
+#ifdef MACHINE_TYPE
+ MACHIN...
2015 Jan 20
0
[PATCH] launch: libvirt: do not leak the backend string on error
Make sure to free the backend string after using it.
---
src/launch-libvirt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 899742f..6f95e98 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -719,6 +719,8 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
* appliance VM.
*/
if (!seen_qemu && !seen_kvm) {
+ CLEANUP_FREE char *backend = guestfs_get_backend (g);
+
error (g,
_("libvirt hypervisor doesn't support qemu or KVM,\n"
"so we can...
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' :
2015 Jan 21
0
[PATCH] aarch64: appliance: Use AAVMF (UEFI) if available for running the appliance.
.../* list of secrets */
size_t nr_secrets;
+ char *uefi_code; /* UEFI (firmware) code and variables. */
+ char *uefi_vars;
};
/* Parameters passed to construct_libvirt_xml and subfunctions. We
@@ -357,6 +359,10 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
if (parse_capabilities (g, capabilities_xml, data) == -1)
goto cleanup;
+ /* UEFI code and variables, on architectures where that is required. */
+ if (guestfs___get_uefi (g, &data->uefi_code, &data->uefi_vars) == -1)
+ goto cleanup;
+
/* Misc backend settings. */
guestfs_push_error_handle...
2016 Mar 22
0
[PATCH v3 09/11] launch: Remove guestfs_int_print_timestamped_message function.
...*libvirt_uri)
* struct, and can also fail if we detect that the hypervisor cannot
* run qemu guests (RHBZ#886915).
*/
- if (g->verbose)
- guestfs_int_print_timestamped_message (g, "parsing capabilities XML");
+ debug (g, "parsing capabilities XML");
if (parse_capabilities (g, capabilities_xml, data) == -1)
goto cleanup;
@@ -373,8 +370,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
/* Locate and/or build the appliance. */
TRACE0 (launch_build_libvirt_appliance_start);
- if (g->verbose)
- guestfs_int_print_timestamped_mess...
2014 Jan 01
0
[PATCH] Allow ./configure --without-qemu.
...quoted (g, &cmdline, QEMU_OPTIONS);
+#endif
/* Add any qemu parameters. */
for (hp = g->hv_params; hp; hp = hp->next) {
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index b5650ea..e3ebd51 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -622,7 +622,11 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
static int
is_custom_hv (guestfs_h *g)
{
+#ifdef QEMU
return g->hv && STRNEQ (g->hv, QEMU);
+#else
+ return 1;
+#endif
}
#if HAVE_LIBSELINUX
diff --git a/tests/regressions/rhbz501893.c b/tests/regressions/rhbz501893.c
index fdd49...
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
...apabilities)*/
unsigned long qemu_version; /* qemu version (from libvirt) */
+ struct secret *secrets; /* list of secrets */
+ size_t nr_secrets;
};
/* Parameters passed to construct_libvirt_xml and subfunctions. We
@@ -130,6 +151,9 @@ struct libvirt_xml_params {
};
static int parse_capabilities (guestfs_h *g, const char *capabilities_xml, struct backend_libvirt_data *data);
+static int add_secret (guestfs_h *g, struct backend_libvirt_data *data, const struct drive *drv);
+static int find_secret (guestfs_h *g, const struct backend_libvirt_data *data, const struct drive *drv, const char **t...
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.
2014 Mar 11
21
[PATCH v2 00/18] Add discard support.
This still isn't working at the moment. See:
http://marc.info/?t=139457409300003&r=1&w=2
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.
Rich.
2016 Mar 22
19
[PATCH v3 0/11] tests/qemu: Add program for tracing and analyzing boot times.
Lots of changes since v2, too much to remember or summarize.
Please ignore patch 11/11, it's just for my testing.
Rich.
2016 Mar 20
14
[PATCH v2 0/7] tests/qemu: Add program for tracing and analyzing boot times.
v1 was here:
https://www.redhat.com/archives/libguestfs/2016-March/thread.html#00157
Not running the 'hwclock' command reduces boot times considerably.
However I'm not sure if it is safe. See the question I posted on
qemu-devel:
http://thread.gmane.org/gmane.comp.emulators.qemu/402194
At the moment, about 50% of the time is consumed by SeaBIOS. Of this,
about ⅓rd is SGABIOS
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.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...or (g, _("you must have libvirt >= %d.%d.%d "
- "to use the 'libvirt' backend"),
+ "to use the ‘libvirt’ backend"),
MIN_LIBVIRT_MAJOR, MIN_LIBVIRT_MINOR, MIN_LIBVIRT_MICRO);
return -1;
}
@@ -788,11 +788,11 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
CLEANUP_FREE char *backend = guestfs_get_backend (g);
error (g,
- _("libvirt hypervisor doesn't support qemu or KVM,\n"
+ _("libvirt hypervisor doesn’t support qemu or KVM,\n"
"so...