similar to: [PATCH] lib: libvirt: If root, run qemu as root.root.

Displaying 20 results from an estimated 1100 matches similar to: "[PATCH] lib: libvirt: If root, run qemu as root.root."

2018 May 21
2
[PATCH for discussion only] lib: libvirt: If root, run qemu subprocess as root.root.
libvirt doesn't have a concept of "session qemu" for root: https://bugzilla.redhat.com/show_bug.cgi?id=890291 When a libguestfs-using process runs as root, and libvirt runs a qemu subprocess, the qemu subprocess is run as a non-root user (typically qemu.qemu). This causes various problems, for example if we try to open a file which is readable by root but unreadable by qemu.qemu
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
In some places when generating XML output in C code we use some clever macros: start_element ("memory") { attribute ("unit", "MiB"); string ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change / clean up
2016 Jan 29
0
[PATCH 5/6] launch: libvirt: cleanup sockets on shutdown
Unlink the sockets in the shutdown callback, instead of right before creating a new ones. This makes sure we are unlinking the right sockets. --- src/launch-libvirt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 185b44b..8a5d93e 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -397,7 +397,6 @@
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
The API for UNIX sockets limits the path to a static size (usually 104 or 108 characters, NULL included), which is internally represented as UNIX_PATH_MAX. If the temporary directory set is long enough (e.g. when running tools as uninstalled, using "run") then these socket paths get trucated, if not even cause failures when binding the sockets. Introduce a new internal API to create
2016 Jan 29
7
[PATCH 1/6] launch: unix: check for length of sockets
Error out early if the path to the socket will not fit into sockaddr_un::sun_path, as we will not be able to connect to it. --- src/launch-unix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/launch-unix.c b/src/launch-unix.c index 740c554..973e14b 100644 --- a/src/launch-unix.c +++ b/src/launch-unix.c @@ -47,6 +47,12 @@ launch_unix (guestfs_h *g, void *datav, const char
2016 Feb 02
0
Re: [PATCH 1/3] launch: add internal helper for socket paths creation
On Tue, Feb 02, 2016 at 03:27:39PM +0100, Pino Toscano wrote: > Introduce an internal helper to create paths for sockets; will be useful > for changing later the logic for placing sockets. > --- > src/guestfs-internal.h | 1 + > src/launch-direct.c | 4 +++- > src/launch-libvirt.c | 10 ++++++---- > src/launch.c | 15 +++++++++++++++ > 4 files changed, 25
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
On Fri, Jan 29, 2016 at 07:25:30PM +0100, Pino Toscano wrote: > The API for UNIX sockets limits the path to a static size (usually 104 > or 108 characters, NULL included), which is internally represented as > UNIX_PATH_MAX. If the temporary directory set is long enough (e.g. > when running tools as uninstalled, using "run") then these socket paths > get trucated, if not
2016 Feb 03
4
[PATCH v2 1/2] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets -- will be useful for changing later the logic for placing sockets. Futhermore, check that the length of sockets won't overflow the buffer for their filenames. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 17 +++++++++++++++++ 4 files changed, 27
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets; will be useful for changing later the logic for placing sockets. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index
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
2013 Mar 07
3
[PATCH 0/3] protocol: Abstract out socket operations.
I've been taking a long hard look at the protocol layer. It has evolved over a long time without any particular direction, and the result is, to say the least, not very organized. These patches take a first step at cleaning up the mess by abstracting out socket operations from the rest of the code. The purpose of this is to allow us to slot in a different connection layer under the
2017 May 17
7
[PATCH 1/5] s390x: launch: libvirt: Use <console> device sclp for appliance debug messages (RHBZ#1376547).
Thanks: Cole Robinson, Dan Horak, Thomas Huth. --- lib/launch-libvirt.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index f66c8e0ef..4adb2cfb3 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1359,6 +1359,7 @@ construct_libvirt_xml_devices (guestfs_h *g, return -1; } +#ifndef __s390x__ /*
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' :
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
Introduce a new struct version with few helper functions for it: this allows to "atomically" represent a version number, without different variables to be used and checked together. Add a initialization function from a libvirt-style version number, and apply it for the qemu and libvirt versions in the direct and libvirt backends. --- src/Makefile.am | 1 +
2014 Oct 31
1
[PATCH] launch: libvirt: Implement drive secrets (RHBZ#1159016).
Implement the GUESTFS_ADD_DRIVE_OPTS_SECRET argument of guestfs_add_drive_opts. For libvirt we have to save the secret in libvirtd first, get a UUID, and then pass the UUID back through the domain XML. --- src/launch-libvirt.c | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 224 insertions(+), 3 deletions(-) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
2018 Nov 02
0
[PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.
In some places when generating XML output in C code we use some clever macros: start_element ("memory") { attribute ("unit", "MiB"); string_format ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common header file. I also took this opportunity to change /
2014 Jan 17
0
[PATCH INCOMPLETE] launch: libvirt: Use C macros to simplify XML generation.
This commit implements some hairy C macros to simplify XML generation. Given the target XML: <cpu mode="host-passthrough"> <model fallback="allow"/> </cpu> The old code would have looked like this: XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu")); XMLERROR (-1, xmlTextWriterWriteAttribute (xo, BAD_CAST
2019 May 24
0
[PATCH 2/2] launch: libvirt: fix custom hypervisor check
Previously, is_custom_hv() used to compare the QEMU executable found during configure to the hypervisor set to check whether it is a custom one; however, the QEMU found at configure time can be different than what libvirt was configured with. This fixes the libvirt backend when libguestfs is configured with a different QEMU, that now will be specified as emulator overriding the libvirt one. ---
2017 Jul 25
1
About seclabel configure,Migrate error
libvirt version: 3.4.0 architecture: x86_64 ubuntu16.04-server hypervisor: kvm,qemu When migrate vm, I encounter error: "Migrate VM virt21 failed unsupported configuration: Unable to find security driver for model apparmor" but two host are same environment.before this error, migrate can be success. the source host seclabel configure is this : <seclabel type='dynamic'
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.