Displaying 20 results from an estimated 24 matches for "capabilities_xml".
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
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...int1);
+ else
+ fallback:
+ fprintf (stderr, "%s: %s\n", getprogname (), msg);
+}
+
+/**
+ * Read the capabilities from libvirt and parse out the fields
+ * we care about.
+ */
+static void
+libvirt_capabilities (struct cpu_config *cpu)
+{
+ virConnectPtr conn;
+ CLEANUP_FREE char *capabilities_xml = NULL;
+ CLEANUP_XMLFREEDOC xmlDocPtr doc = NULL;
+ CLEANUP_XMLXPATHFREECONTEXT xmlXPathContextPtr xpathCtx = NULL;
+ CLEANUP_XMLXPATHFREEOBJECT xmlXPathObjectPtr xpathObj = NULL;
+ xmlNodeSetPtr nodes;
+ size_t nr_nodes, i;
+ xmlNodePtr node;
+
+ /* Connect to libvirt and get the capabilit...
2020 Jan 16
1
[PATCH] launch: libvirt: use machine type when querying for domcaps
...ed, 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
+ MACHINE_TYPE,
+#else
+...
2015 Jan 20
0
[PATCH] launch: libvirt: do not leak the backend string on error
...sing 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 cannot create the libguestfs appliance.\n"...
2016 Mar 22
0
[PATCH v3 09/11] launch: Remove guestfs_int_print_timestamped_message function.
...uot; */
@@ -326,8 +325,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
data->qemu_version = 0;
}
- if (g->verbose)
- guestfs_int_print_timestamped_message (g, "get libvirt capabilities");
+ debug (g, "get libvirt capabilities");
capabilities_xml = virConnectGetCapabilities (conn);
if (!capabilities_xml) {
@@ -339,8 +337,7 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
* struct, and can also fail if we detect that the hypervisor cannot
* run qemu guests (RHBZ#886915).
*/
- if (g->verbose)
- gues...
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
.../**
- * Read the capabilities from libvirt and parse out the fields
- * we care about.
+ * Read some important flags from lscpu output.
*/
static void
-libvirt_capabilities (struct cpu_config *cpu)
+get_flags (char **lscpu, struct cpu_config *cpu)
{
- virConnectPtr conn;
- CLEANUP_FREE char *capabilities_xml = NULL;
- CLEANUP_XMLFREEDOC xmlDocPtr doc = NULL;
- CLEANUP_XMLXPATHFREECONTEXT xmlXPathContextPtr xpathCtx = NULL;
- CLEANUP_XMLXPATHFREEOBJECT xmlXPathObjectPtr xpathObj = NULL;
- const char *xpathexpr;
- xmlNodeSetPtr nodes;
- size_t nr_nodes, i;
- xmlNodePtr node;
-
- /* Connect to lib...
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
2014 Mar 27
3
[PATCH 0/2] launch: libvirt: Use libvirt to set up the user network.
Use libvirt to set up the user network instead of a custom qemu
argument.
Note this requires a non-upstream patch being discussed on the libvirt
mailing list at the moment.
https://bugzilla.redhat.com/show_bug.cgi?id=1075520#c6
Rich.
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
2015 Jan 21
0
[PATCH] aarch64: appliance: Use AAVMF (UEFI) if available for running the appliance.
...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_handler (g, NULL, NULL);...
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.
2014 Jan 01
0
[PATCH] Allow ./configure --without-qemu.
...f
/* 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 fdd49c8..f4091bf 100644
--- a/tests/regressions/r...
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
.../* 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 **type, const char **uuid);
+static int have_se...
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.
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
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.