libvirt-8.0.0-2.el9

- build: Only install libvirt-guests when building libvirtd (rhbz#2042529)
- docs: Add man page for libvirt-guests (rhbz#2042529)
- remove sysconfig files (rhbz#2042529)
- spec: Run pre/post-install stuff on 'daemon-driver-storage-core' (rhbz#2025644)
- qemu: fix inactive snapshot revert (rhbz#2039136)
- Revert "report error when virProcessGetStatInfo() is unable to parse data" (rhbz#2043579)

Resolves: rhbz#2025644, rhbz#2039136, rhbz#2042529, rhbz#2043579
This commit is contained in:
Jiri Denemark 2022-01-25 14:16:36 +01:00
parent 6a66e7344c
commit 782b405d19
6 changed files with 1355 additions and 19 deletions

View File

@ -0,0 +1,104 @@
From 81f1508d99d4740e7a2a092128d651cf245a554e Mon Sep 17 00:00:00 2001
Message-Id: <81f1508d99d4740e7a2a092128d651cf245a554e@dist-git>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Tue, 18 Jan 2022 12:40:09 +0100
Subject: [PATCH] Revert "report error when virProcessGetStatInfo() is unable
to parse data"
This reverts commit 938382b60ae5bd1f83b5cb09e1ce68b9a88f679a.
Turns out, the commit did more harm than good. It changed
semantics on some public APIs. For instance, while
qemuDomainGetInfo() previously did not returned an error it does
now. While the calls to virProcessGetStatInfo() is guarded with
virDomainObjIsActive() it doesn't necessarily mean that QEMU's
PID is still alive. QEMU might be gone but we just haven't
realized it (e.g. because the eof handler thread is waiting for a
job).
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2041610
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 105dace22cc7b5b18d72a4dcad4a2cf386ce5c99)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2043579
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
src/ch/ch_driver.c | 2 ++
src/qemu/qemu_driver.c | 7 ++++++-
src/util/virprocess.c | 8 ++------
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index 3cbc668489..53e0872207 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -1073,6 +1073,8 @@ chDomainHelperGetVcpus(virDomainObj *vm,
if (virProcessGetStatInfo(&vcpuinfo->cpuTime,
&vcpuinfo->cpu, NULL,
vm->pid, vcpupid) < 0) {
+ virReportSystemError(errno, "%s",
+ _("cannot get vCPU placement & pCPU time"));
return -1;
}
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 65ac5ef367..d3d76c003f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1359,6 +1359,8 @@ qemuDomainHelperGetVcpus(virDomainObj *vm,
if (virProcessGetStatInfo(&vcpuinfo->cpuTime,
&vcpuinfo->cpu, NULL,
vm->pid, vcpupid) < 0) {
+ virReportSystemError(errno, "%s",
+ _("cannot get vCPU placement & pCPU time"));
return -1;
}
}
@@ -2519,6 +2521,8 @@ qemuDomainGetInfo(virDomainPtr dom,
if (virDomainObjIsActive(vm)) {
if (virProcessGetStatInfo(&(info->cpuTime), NULL, NULL,
vm->pid, 0) < 0) {
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ _("cannot read cputime for domain"));
goto cleanup;
}
}
@@ -10526,7 +10530,8 @@ qemuDomainMemoryStatsInternal(virQEMUDriver *driver,
}
if (virProcessGetStatInfo(NULL, NULL, &rss, vm->pid, 0) < 0) {
- virResetLastError();
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ _("cannot get RSS for domain"));
} else {
stats[ret].tag = VIR_DOMAIN_MEMORY_STAT_RSS;
stats[ret].val = rss;
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 85d8c8e747..b559a4257e 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -1784,10 +1784,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime,
virStrToLong_ullp(proc_stat[VIR_PROCESS_STAT_STIME], NULL, 10, &systime) < 0 ||
virStrToLong_l(proc_stat[VIR_PROCESS_STAT_RSS], NULL, 10, &rss) < 0 ||
virStrToLong_i(proc_stat[VIR_PROCESS_STAT_PROCESSOR], NULL, 10, &cpu) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot parse process status data for pid '%d/%d'"),
- (int) pid, (int) tid);
- return -1;
+ VIR_WARN("cannot parse process status data");
}
/* We got jiffies
@@ -1884,8 +1881,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime G_GNUC_UNUSED,
pid_t pid G_GNUC_UNUSED,
pid_t tid G_GNUC_UNUSED)
{
- virReportSystemError(ENOSYS, "%s",
- _("Process statistics data is not supported on this platform"));
+ errno = ENOSYS;
return -1;
}
--
2.35.0

View File

@ -0,0 +1,75 @@
From f45c99be9258f2d97c1f19b93ae8f5e73f4cb486 Mon Sep 17 00:00:00 2001
Message-Id: <f45c99be9258f2d97c1f19b93ae8f5e73f4cb486@dist-git>
From: Jim Fehlig <jfehlig@suse.com>
Date: Mon, 10 Jan 2022 11:42:58 -0700
Subject: [PATCH] build: Only install libvirt-guests when building libvirtd
libvirt-guests was already moved to the libvirt daemon package in commit
d800c50349. It only needs to be installed when building libvirtd.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85)
https://bugzilla.redhat.com/show_bug.cgi?id=2042529
---
tools/meson.build | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/tools/meson.build b/tools/meson.build
index 22fa3604ba..2d0aecb90b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK')
)
endif
-configure_file(
- input: 'libvirt-guests.sh.in',
- output: '@BASENAME@',
- configuration: tools_conf,
- install: true,
- install_dir: libexecdir,
- install_mode: 'rwxrwxr-x',
-)
-
-if init_script == 'systemd'
- install_data(
- 'libvirt-guests.sysconf',
- install_dir: sysconfdir / 'sysconfig',
- rename: 'libvirt-guests',
- )
-
+if conf.has('WITH_LIBVIRTD')
configure_file(
- input: 'libvirt-guests.service.in',
+ input: 'libvirt-guests.sh.in',
output: '@BASENAME@',
configuration: tools_conf,
install: true,
- install_dir: prefix / 'lib' / 'systemd' / 'system',
+ install_dir: libexecdir,
+ install_mode: 'rwxrwxr-x',
)
+
+ if init_script == 'systemd'
+ install_data(
+ 'libvirt-guests.sysconf',
+ install_dir: sysconfdir / 'sysconfig',
+ rename: 'libvirt-guests',
+ )
+
+ configure_file(
+ input: 'libvirt-guests.service.in',
+ output: '@BASENAME@',
+ configuration: tools_conf,
+ install: true,
+ install_dir: prefix / 'lib' / 'systemd' / 'system',
+ )
+ endif
endif
if bash_completion_dep.found()
--
2.35.0

View File

@ -0,0 +1,217 @@
From 8363046dd5f3e018aaea7b6d9b711fb3d1e417cc Mon Sep 17 00:00:00 2001
Message-Id: <8363046dd5f3e018aaea7b6d9b711fb3d1e417cc@dist-git>
From: Jim Fehlig <jfehlig@suse.com>
Date: Fri, 7 Jan 2022 14:35:10 -0700
Subject: [PATCH] docs: Add man page for libvirt-guests
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 161727417a91bdddf8f3167cf70c3de2829be81c)
https://bugzilla.redhat.com/show_bug.cgi?id=2042529
---
docs/manpages/index.rst | 1 +
docs/manpages/libvirt-guests.rst | 151 +++++++++++++++++++++++++++++++
docs/manpages/meson.build | 1 +
libvirt.spec.in | 1 +
tools/libvirt-guests.service.in | 2 +-
5 files changed, 155 insertions(+), 1 deletion(-)
create mode 100644 docs/manpages/libvirt-guests.rst
diff --git a/docs/manpages/index.rst b/docs/manpages/index.rst
index fb4a36d46a..8fd0d90041 100644
--- a/docs/manpages/index.rst
+++ b/docs/manpages/index.rst
@@ -41,6 +41,7 @@ Tools
* `virt-admin(1) <virt-admin.html>`__ - daemon administration interface
* `virsh(1) <virsh.html>`__ - management user interface
* `virt-qemu-run(1) <virt-qemu-run.html>`__ - run standalone QEMU instances
+* `libvirt-guests(8) <libvirt-guests.html>`__ - suspend/resume running libvirt guests
Key codes
=========
diff --git a/docs/manpages/libvirt-guests.rst b/docs/manpages/libvirt-guests.rst
new file mode 100644
index 0000000000..76045ed11a
--- /dev/null
+++ b/docs/manpages/libvirt-guests.rst
@@ -0,0 +1,151 @@
+==============
+libvirt-guests
+==============
+
+-------------------------------------
+suspend/resume running libvirt guests
+-------------------------------------
+
+:Manual section: 8
+:Manual group: Virtualization Support
+
+.. contents::
+
+SYNOPSIS
+========
+
+``libvirt-guests`` *COMMAND*
+
+
+DESCRIPTION
+===========
+
+``libvirt-guests`` is a service that can be used to coordinate guest and host
+lifecyle actions. By default, ``libvirt-guests`` will suspend running guests
+when the host shuts down, and restore them to their pre-shutdown state when
+the host reboots.
+
+``libvirt-guests`` is typically under control of systemd. When
+``libvirt-guests.service`` is enabled, systemd will call ``libvirt-guests``
+with the ``start`` *COMMAND* when the host boots. Conversely, systemd will call
+``libvirt-guests`` with the ``stop`` *COMMAND* when the host shuts down.
+
+``libvirt-guests`` can be used directly. In addition to the ``start`` and
+``stop`` *COMMAND*\s, it also supports ``status``, ``restart``, ``condrestart``,
+``try-restart``, ``reload``, ``force-reload``, ``gueststatus``, and
+``shutdown`` *COMMAND*\s.
+
+
+FILES
+=====
+
+``libvirt-guests`` defines several variables to control service behavior.
+The default vaule of these variables can be overridden in:
+
+* ``@SYSCONFDIR@/sysconfig/libvirt-guests``
+
+The following variables are supported:
+
+- URIS=default
+
+ URIs to check for running guests. Example:
+ ``URIS='default xen:///system xen+tcp://host/system lxc:///system'``
+
+- ON_BOOT=start
+
+ Action taken on host boot
+
+ * start
+
+ All guests which were running on shutdown are started on boot regardless
+ of their autostart settings
+
+ * ignore
+
+ ``libvirt-guests`` won't start any guest on boot, however, guests marked
+ as autostart will still be automatically started by libvirtd
+
+- START_DELAY=0
+
+ Number of seconds to wait between each guest start. Set to 0 to allow parallel
+ startup.
+
+- ON_SHUTDOWN=suspend
+
+ Action taken on host shutdown
+
+ * suspend
+
+ All running guests are suspended using virsh managedsave
+
+ * shutdown
+
+ All running guests are asked to shutdown. Please be careful with this
+ settings since there is no way to distinguish between a guest which is
+ stuck or ignores shutdown requests and a guest which just needs a long
+ time to shutdown. When setting ON_SHUTDOWN=shutdown, you must also set
+ SHUTDOWN_TIMEOUT to a value suitable for your guests.
+
+- PARALLEL_SHUTDOWN=0
+
+ Number of guests will be shutdown concurrently, taking effect when
+ "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one
+ after another. Number of guests on shutdown at any time will not exceed number
+ set in this variable.
+
+- SHUTDOWN_TIMEOUT=300
+
+ Number of seconds we're willing to wait for a guest to shut down. If parallel
+ shutdown is enabled, this timeout applies as a timeout for shutting down all
+ guests on a single URI defined in the variable URIS. If this is 0, then there
+ is no time out (use with caution, as guests might not respond to a shutdown
+ request). The default value is 300 seconds (5 minutes).
+
+- BYPASS_CACHE=0
+
+ If non-zero, try to bypass the file system cache when saving and
+ restoring guests, even though this may give slower operation for
+ some file systems.
+
+- SYNC_TIME=0
+
+ If non-zero, try to sync guest time on domain resume. Be aware, that
+ this requires guest agent with support for time synchronization
+ running in the guest. By default, this functionality is turned off.
+
+
+BUGS
+====
+
+Please report all bugs you discover. This should be done via either:
+
+#. the mailing list
+
+ `https://libvirt.org/contact.html <https://libvirt.org/contact.html>`_
+
+#. the bug tracker
+
+ `https://libvirt.org/bugs.html <https://libvirt.org/bugs.html>`_
+
+Alternatively, you may report bugs to your software distributor / vendor.
+
+
+AUTHORS
+=======
+
+Please refer to the AUTHORS file distributed with libvirt.
+
+
+LICENSE
+=======
+
+``libvirt-guests`` is distributed under the terms of the GNU LGPL v2.1+.
+This is free software; see the source for copying conditions. There
+is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE
+
+
+SEE ALSO
+========
+
+libvirtd(8), `https://libvirt.org/ <https://libvirt.org/>`_
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index 150f45d296..bad9b62a2e 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -21,6 +21,7 @@ docs_man_files = [
{ 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') },
{ 'name': 'virt-xml-validate', 'section': '1', 'install': true },
+ { 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
{ 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
{ 'name': 'virt-sanlock-cleanup', 'section': '8', 'install': conf.has('WITH_SANLOCK') },
{ 'name': 'virt-ssh-helper', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
index 10c664016a..1a9b233e11 100644
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
@@ -6,7 +6,7 @@ After=network.target
After=time-sync.target
After=libvirtd.service
After=virt-guest-shutdown.target
-Documentation=man:libvirtd(8)
+Documentation=man:libvirt-guests(8)
Documentation=https://libvirt.org
[Service]
--
2.35.0

View File

@ -0,0 +1,41 @@
From 1911ebd62779701aae271dd3e047415bfd2cd303 Mon Sep 17 00:00:00 2001
Message-Id: <1911ebd62779701aae271dd3e047415bfd2cd303@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Thu, 20 Jan 2022 14:53:33 +0100
Subject: [PATCH] qemu: fix inactive snapshot revert
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The commit splitting out the qemuSnapshotRevertInactive function
dropped the 'defined = true' line by accident and instead
returned -1, leaving the user with a cryptic error:
error: An error occurred, but the cause is unknown
https://bugzilla.redhat.com/show_bug.cgi?id=2039136
https://gitlab.com/libvirt/libvirt/-/issues/266
Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 76deb656132bb8817ddae4b7f417930c4db824c9)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
src/qemu/qemu_snapshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index f92e00f9c0..ac7bab90f8 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj *vm,
if (*inactiveConfig) {
virDomainObjAssignDef(vm, inactiveConfig, false, NULL);
- return -1;
+ defined = true;
}
if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
--
2.35.0

View File

@ -0,0 +1,846 @@
From fabb2642be1ef180b221af36e5810f819622fc58 Mon Sep 17 00:00:00 2001
Message-Id: <fabb2642be1ef180b221af36e5810f819622fc58@dist-git>
From: Olaf Hering <olaf@aepfle.de>
Date: Wed, 12 Jan 2022 11:45:08 +0100
Subject: [PATCH] remove sysconfig files
sysconfig files are owned by the admin of the host. They have the
liberty to put anything they want into these files. This makes it
difficult to provide different built-in defaults.
Remove the sysconfig file and place the current desired default into
the service file.
Local customizations can now go either into /etc/sysconfig/name
or /etc/systemd/system/name.service.d/my-knobs.conf
Attempt to handle upgrades in libvirt.spec.
Dirty files which are marked as %config will be renamed to file.rpmsave.
To restore them automatically, move stale .rpmsave files away, and
catch any new rpmsave files in %posttrans.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 8eb4461645c5738674232ee26c15f5555230b7ff)
https://bugzilla.redhat.com/show_bug.cgi?id=2042529
---
docs/daemons.rst | 21 ++++++++
docs/remote.html.in | 6 +--
libvirt.spec.in | 69 +++++++++++++++++++------
src/ch/meson.build | 5 --
src/ch/virtchd.service.in | 1 +
src/ch/virtchd.sysconf | 3 --
src/interface/meson.build | 5 --
src/interface/virtinterfaced.service.in | 1 +
src/interface/virtinterfaced.sysconf | 3 --
src/libxl/meson.build | 5 --
src/libxl/virtxend.service.in | 1 +
src/libxl/virtxend.sysconf | 3 --
src/locking/meson.build | 5 --
src/locking/virtlockd.service.in | 1 +
src/locking/virtlockd.sysconf | 3 --
src/logging/meson.build | 5 --
src/logging/virtlogd.sysconf | 3 --
src/lxc/meson.build | 5 --
src/lxc/virtlxcd.service.in | 1 +
src/lxc/virtlxcd.sysconf | 3 --
src/meson.build | 16 ------
src/network/meson.build | 5 --
src/network/virtnetworkd.service.in | 1 +
src/network/virtnetworkd.sysconf | 3 --
src/node_device/meson.build | 5 --
src/node_device/virtnodedevd.service.in | 1 +
src/node_device/virtnodedevd.sysconf | 3 --
src/nwfilter/meson.build | 5 --
src/nwfilter/virtnwfilterd.service.in | 1 +
src/nwfilter/virtnwfilterd.sysconf | 3 --
src/qemu/meson.build | 5 --
src/qemu/virtqemud.service.in | 1 +
src/qemu/virtqemud.sysconf | 12 -----
src/remote/libvirtd.service.in | 1 +
src/remote/libvirtd.sysconf | 21 --------
src/remote/meson.build | 10 ----
src/remote/virtproxyd.service.in | 1 +
src/remote/virtproxyd.sysconf | 3 --
src/secret/meson.build | 5 --
src/secret/virtsecretd.service.in | 1 +
src/secret/virtsecretd.sysconf | 3 --
src/storage/meson.build | 5 --
src/storage/virtstoraged.service.in | 1 +
src/storage/virtstoraged.sysconf | 3 --
src/vbox/meson.build | 5 --
src/vbox/virtvboxd.service.in | 1 +
src/vbox/virtvboxd.sysconf | 3 --
src/vz/meson.build | 5 --
src/vz/virtvzd.service.in | 1 +
src/vz/virtvzd.sysconf | 3 --
tools/libvirt-guests.sysconf | 50 ------------------
tools/meson.build | 6 ---
52 files changed, 93 insertions(+), 245 deletions(-)
delete mode 100644 src/ch/virtchd.sysconf
delete mode 100644 src/interface/virtinterfaced.sysconf
delete mode 100644 src/libxl/virtxend.sysconf
delete mode 100644 src/locking/virtlockd.sysconf
delete mode 100644 src/logging/virtlogd.sysconf
delete mode 100644 src/lxc/virtlxcd.sysconf
delete mode 100644 src/network/virtnetworkd.sysconf
delete mode 100644 src/node_device/virtnodedevd.sysconf
delete mode 100644 src/nwfilter/virtnwfilterd.sysconf
delete mode 100644 src/qemu/virtqemud.sysconf
delete mode 100644 src/remote/libvirtd.sysconf
delete mode 100644 src/remote/virtproxyd.sysconf
delete mode 100644 src/secret/virtsecretd.sysconf
delete mode 100644 src/storage/virtstoraged.sysconf
delete mode 100644 src/vbox/virtvboxd.sysconf
delete mode 100644 src/vz/virtvzd.sysconf
delete mode 100644 tools/libvirt-guests.sysconf
diff --git a/docs/daemons.rst b/docs/daemons.rst
index c8ae3b0cef..1f9bc34260 100644
--- a/docs/daemons.rst
+++ b/docs/daemons.rst
@@ -686,3 +686,24 @@ socket unit names into the service. When using these old versions, the
``unix_sock_dir`` setting in ``virtlockd.conf`` must be changed in
lock-step with the equivalent setting in the unit files to ensure that
``virtlockd`` can identify the sockets.
+
+Changing command line options for daemons
+=========================================
+
+Two ways exist to override the defaults in the provided service files:
+either a systemd "drop-in" configuration file, or a ``/etc/sysconfig/$daemon``
+file must be created. For example, to change the command line option
+for a debug session of ``libvirtd``, create a file
+``/etc/systemd/system/libvirtd.service.d/debug.conf`` with the following content:
+
+ ::
+
+ [Unit]
+ Description=Virtualization daemon, with override from debug.conf
+
+ [Service]
+ Environment=G_DEBUG=fatal-warnings
+ Environment=LIBVIRTD_ARGS="--listen --verbose"
+
+After changes to systemd "drop-in" configuration files it is required to run
+``systemctl daemon-reload``.
diff --git a/docs/remote.html.in b/docs/remote.html.in
index efdb2b3253..47fb2d4df3 100644
--- a/docs/remote.html.in
+++ b/docs/remote.html.in
@@ -138,9 +138,9 @@ Blank lines and comments beginning with <code>#</code> are ignored.
<td> 1 (on) </td>
<td>
Listen for secure TLS connections on the public TCP/IP port.
- Note: it is also necessary to start the server in listening mode by
- running it with --listen or editing /etc/sysconfig/libvirtd by uncommenting the LIBVIRTD_ARGS="--listen" line
- to cause the server to come up in listening mode whenever it is started.
+ Note: it is also necessary to start the server in listening mode
+ by running it with --listen or adding a LIBVIRTD_ARGS="--listen"
+ line to /etc/sysconfig/libvirtd.
</td>
</tr>
<tr>
diff --git a/src/ch/meson.build b/src/ch/meson.build
index e0afdb390a..a4bf0c6649 100644
--- a/src/ch/meson.build
+++ b/src/ch/meson.build
@@ -63,11 +63,6 @@ if conf.has('WITH_CH')
'sockets': [ 'main', 'ro', 'admin' ],
}
- sysconf_files += {
- 'name': 'virtchd',
- 'file': files('virtchd.sysconf'),
- }
-
virt_install_dirs += [
localstatedir / 'lib' / 'libvirt' / 'ch',
runstatedir / 'libvirt' / 'ch',
diff --git a/src/ch/virtchd.service.in b/src/ch/virtchd.service.in
index cc1e85d1df..f08339f211 100644
--- a/src/ch/virtchd.service.in
+++ b/src/ch/virtchd.service.in
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTCHD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtchd
ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/ch/virtchd.sysconf b/src/ch/virtchd.sysconf
deleted file mode 100644
index 5ee44be5cf..0000000000
--- a/src/ch/virtchd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtchd.service systemd unit
-
-VIRTCHD_ARGS="--timeout 120"
diff --git a/src/interface/meson.build b/src/interface/meson.build
index 2d4e30362c..f9f378aeb0 100644
--- a/src/interface/meson.build
+++ b/src/interface/meson.build
@@ -54,9 +54,4 @@ if conf.has('WITH_INTERFACE')
'name': 'virtinterfaced',
'in_file': files('virtinterfaced.init.in')
}
-
- sysconf_files += {
- 'name': 'virtinterfaced',
- 'file': files('virtinterfaced.sysconf'),
- }
endif
diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in
index 73d409b81b..3d944e17a9 100644
--- a/src/interface/virtinterfaced.service.in
+++ b/src/interface/virtinterfaced.service.in
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTINTERFACED_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/interface/virtinterfaced.sysconf b/src/interface/virtinterfaced.sysconf
deleted file mode 100644
index 0685da31b8..0000000000
--- a/src/interface/virtinterfaced.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtinterfaced.service systemd unit
-
-VIRTINTERFACED_ARGS="--timeout 120"
diff --git a/src/libxl/meson.build b/src/libxl/meson.build
index 9793899106..8347a3c966 100644
--- a/src/libxl/meson.build
+++ b/src/libxl/meson.build
@@ -78,11 +78,6 @@ if conf.has('WITH_LIBXL')
'in_file': files('virtxend.init.in'),
}
- sysconf_files += {
- 'name': 'virtxend',
- 'file': files('virtxend.sysconf'),
- }
-
virt_install_dirs += [
localstatedir / 'lib' / 'libvirt' / 'libxl',
runstatedir / 'libvirt' / 'libxl',
diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in
index 19b19ce3e6..2b5163e179 100644
--- a/src/libxl/virtxend.service.in
+++ b/src/libxl/virtxend.service.in
@@ -18,6 +18,7 @@ ConditionPathExists=/proc/xen/capabilities
[Service]
Type=notify
+Environment=VIRTXEND_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/libxl/virtxend.sysconf b/src/libxl/virtxend.sysconf
deleted file mode 100644
index 301da47e8d..0000000000
--- a/src/libxl/virtxend.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtxend.service systemd unit
-
-VIRTXEND_ARGS="--timeout 120"
diff --git a/src/locking/meson.build b/src/locking/meson.build
index 184d3c3f56..72f7780438 100644
--- a/src/locking/meson.build
+++ b/src/locking/meson.build
@@ -156,11 +156,6 @@ if conf.has('WITH_LIBVIRTD')
'in_file': files('virtlockd.init.in'),
}
- sysconf_files += {
- 'name': 'virtlockd',
- 'file': files('virtlockd.sysconf'),
- }
-
if conf.has('WITH_SANLOCK')
virt_helpers += {
'name': 'libvirt_sanlock_helper',
diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
index 4a6fab05ab..19271d1e7d 100644
--- a/src/locking/virtlockd.service.in
+++ b/src/locking/virtlockd.service.in
@@ -7,6 +7,7 @@ Documentation=man:virtlockd(8)
Documentation=https://libvirt.org
[Service]
+Environment=VIRTLOCKD_ARGS=
EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
diff --git a/src/locking/virtlockd.sysconf b/src/locking/virtlockd.sysconf
deleted file mode 100644
index 03aea9e1bc..0000000000
--- a/src/locking/virtlockd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlockd.service systemd unit
-
-VIRTLOCKD_ARGS=""
diff --git a/src/logging/meson.build b/src/logging/meson.build
index 89e06a0d5a..7066f16fad 100644
--- a/src/logging/meson.build
+++ b/src/logging/meson.build
@@ -101,11 +101,6 @@ if conf.has('WITH_LIBVIRTD')
'name': 'virtlogd',
'in_file': files('virtlogd.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtlogd',
- 'file': files('virtlogd.sysconf'),
- }
endif
log_inc_dir = include_directories('.')
diff --git a/src/logging/virtlogd.sysconf b/src/logging/virtlogd.sysconf
deleted file mode 100644
index 67993e83ce..0000000000
--- a/src/logging/virtlogd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlogd.service systemd unit
-
-VIRTLOGD_ARGS=""
diff --git a/src/lxc/meson.build b/src/lxc/meson.build
index ad5c659dba..c1f71b43e1 100644
--- a/src/lxc/meson.build
+++ b/src/lxc/meson.build
@@ -175,11 +175,6 @@ if conf.has('WITH_LXC')
'in_file': files('virtlxcd.init.in'),
}
- sysconf_files += {
- 'name': 'virtlxcd',
- 'file': files('virtlxcd.sysconf'),
- }
-
virt_install_dirs += [
localstatedir / 'lib' / 'libvirt' / 'lxc',
runstatedir / 'libvirt' / 'lxc',
diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in
index 3af7c1a52d..d58bde9f5d 100644
--- a/src/lxc/virtlxcd.service.in
+++ b/src/lxc/virtlxcd.service.in
@@ -18,6 +18,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTLXCD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/lxc/virtlxcd.sysconf b/src/lxc/virtlxcd.sysconf
deleted file mode 100644
index 119a4a23f3..0000000000
--- a/src/lxc/virtlxcd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtlxcd.service systemd unit
-
-VIRTLXCD_ARGS="--timeout 120"
diff --git a/src/meson.build b/src/meson.build
index 2408344ef7..fc6c77f5d1 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -208,12 +208,6 @@ virt_daemon_units = []
# * in_file - source init file (required)
openrc_init_files = []
-# sysconf_files
-# install libvirt daemon sysconf files
-# * name - daemon name (required)
-# * file - source sysconf file (required)
-sysconf_files = []
-
# virt_install_dirs:
# list of directories to create during installation
virt_install_dirs = []
@@ -868,16 +862,6 @@ if conf.has('WITH_LIBVIRTD')
endif
endif
-if init_script != 'none'
- foreach sysconf : sysconf_files
- install_data(
- sysconf['file'],
- install_dir: sysconfdir / 'sysconfig',
- rename: [ sysconf['name'] ],
- )
- endforeach
-endif
-
if conf.has('WITH_DTRACE_PROBES')
custom_target(
'libvirt_functions.stp',
diff --git a/src/network/meson.build b/src/network/meson.build
index d6fb624bb7..e7c43bc4c4 100644
--- a/src/network/meson.build
+++ b/src/network/meson.build
@@ -72,11 +72,6 @@ if conf.has('WITH_NETWORK')
'in_file': files('virtnetworkd.init.in'),
}
- sysconf_files += {
- 'name': 'virtnetworkd',
- 'file': files('virtnetworkd.sysconf'),
- }
-
virt_install_dirs += [
localstatedir / 'lib' / 'libvirt' / 'network',
localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in
index 4c39d2a5d7..3decfbbf1d 100644
--- a/src/network/virtnetworkd.service.in
+++ b/src/network/virtnetworkd.service.in
@@ -16,6 +16,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTNETWORKD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/network/virtnetworkd.sysconf b/src/network/virtnetworkd.sysconf
deleted file mode 100644
index 93f3a7a327..0000000000
--- a/src/network/virtnetworkd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnetworkd.service systemd unit
-
-VIRTNETWORKD_ARGS="--timeout 120"
diff --git a/src/node_device/meson.build b/src/node_device/meson.build
index 15f9c3ad29..5013d825b3 100644
--- a/src/node_device/meson.build
+++ b/src/node_device/meson.build
@@ -62,9 +62,4 @@ if conf.has('WITH_NODE_DEVICES')
'name': 'virtnodedevd',
'in_file': files('virtnodedevd.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtnodedevd',
- 'file': files('virtnodedevd.sysconf'),
- }
endif
diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in
index d2453dd620..688cf89822 100644
--- a/src/node_device/virtnodedevd.service.in
+++ b/src/node_device/virtnodedevd.service.in
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTNODEDEVD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/node_device/virtnodedevd.sysconf b/src/node_device/virtnodedevd.sysconf
deleted file mode 100644
index fa7faa3a79..0000000000
--- a/src/node_device/virtnodedevd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnodedevd.service systemd unit
-
-VIRTNODEDEVD_ARGS="--timeout 120"
diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build
index a21e575925..ebbe712906 100644
--- a/src/nwfilter/meson.build
+++ b/src/nwfilter/meson.build
@@ -61,10 +61,5 @@ if conf.has('WITH_NWFILTER')
'in_file': files('virtnwfilterd.init.in'),
}
- sysconf_files += {
- 'name': 'virtnwfilterd',
- 'file': files('virtnwfilterd.sysconf'),
- }
-
subdir('xml')
endif
diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in
index dda7c01a3d..36d00b58f0 100644
--- a/src/nwfilter/virtnwfilterd.service.in
+++ b/src/nwfilter/virtnwfilterd.service.in
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTNWFILTERD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/nwfilter/virtnwfilterd.sysconf b/src/nwfilter/virtnwfilterd.sysconf
deleted file mode 100644
index 80cc645ba5..0000000000
--- a/src/nwfilter/virtnwfilterd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtnwfilterd.service systemd unit
-
-VIRTNWFILTERD_ARGS="--timeout 120"
diff --git a/src/qemu/meson.build b/src/qemu/meson.build
index 66ef594006..5f82f687c1 100644
--- a/src/qemu/meson.build
+++ b/src/qemu/meson.build
@@ -165,11 +165,6 @@ if conf.has('WITH_QEMU')
'in_file': files('virtqemud.init.in'),
}
- sysconf_files += {
- 'name': 'virtqemud',
- 'file': files('virtqemud.sysconf'),
- }
-
if conf.has('WITH_SYSCTL')
install_data(
'postcopy-migration.sysctl',
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
index 20e1b43a6e..551eb4d405 100644
--- a/src/qemu/virtqemud.service.in
+++ b/src/qemu/virtqemud.service.in
@@ -20,6 +20,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTQEMUD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf
deleted file mode 100644
index 87b626e3ed..0000000000
--- a/src/qemu/virtqemud.sysconf
+++ /dev/null
@@ -1,12 +0,0 @@
-# Customizations for the virtqemud.service systemd unit
-
-VIRTQEMUD_ARGS="--timeout 120"
-
-# Override the QEMU/SDL default audio driver probing when
-# starting virtual machines using SDL graphics
-#
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
-# is enabled in /etc/libvirt/qemu.conf
-#QEMU_AUDIO_DRV=sdl
-#
-#SDL_AUDIODRIVER=pulse
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index cc0d4e3693..5d4d412fcc 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -28,6 +28,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=LIBVIRTD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
deleted file mode 100644
index 18aec1ba67..0000000000
--- a/src/remote/libvirtd.sysconf
+++ /dev/null
@@ -1,21 +0,0 @@
-# Customizations for the libvirtd.service systemd unit
-
-# Default behaviour is for libvirtd.service to start on boot
-# so that VM autostart can be performed. We then want it to
-# shutdown again if nothing was started and rely on systemd
-# socket activation to start it again when some client app
-# connects.
-LIBVIRTD_ARGS="--timeout 120"
-
-# If systemd socket activation is disabled, then the following
-# can be used to listen on TCP/TLS sockets
-#LIBVIRTD_ARGS="--listen"
-
-# Override the QEMU/SDL default audio driver probing when
-# starting virtual machines using SDL graphics
-#
-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
-# is enabled in /etc/libvirt/qemu.conf
-#QEMU_AUDIO_DRV=sdl
-#
-#SDL_AUDIODRIVER=pulse
diff --git a/src/remote/meson.build b/src/remote/meson.build
index 0a188268b5..fc98d0e5be 100644
--- a/src/remote/meson.build
+++ b/src/remote/meson.build
@@ -204,11 +204,6 @@ if conf.has('WITH_REMOTE')
'confd': files('libvirtd.confd'),
}
- sysconf_files += {
- 'name': 'libvirtd',
- 'file': files('libvirtd.sysconf'),
- }
-
virt_daemons += {
'name': 'virtproxyd',
'c_args': [
@@ -239,11 +234,6 @@ if conf.has('WITH_REMOTE')
'confd': files('virtproxyd.confd'),
}
- sysconf_files += {
- 'name': 'virtproxyd',
- 'file': files('virtproxyd.sysconf'),
- }
-
virt_install_dirs += [
localstatedir / 'log' / 'libvirt',
]
diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in
index f43ce9ee6e..10e8cf7263 100644
--- a/src/remote/virtproxyd.service.in
+++ b/src/remote/virtproxyd.service.in
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTPROXYD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/remote/virtproxyd.sysconf b/src/remote/virtproxyd.sysconf
deleted file mode 100644
index 0fc5c61096..0000000000
--- a/src/remote/virtproxyd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtproxyd.service systemd unit
-
-VIRTPROXYD_ARGS="--timeout 120"
diff --git a/src/secret/meson.build b/src/secret/meson.build
index a487055cde..efc0ebb1e6 100644
--- a/src/secret/meson.build
+++ b/src/secret/meson.build
@@ -43,9 +43,4 @@ if conf.has('WITH_SECRETS')
'name': 'virtsecretd',
'in_file': files('virtsecretd.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtsecretd',
- 'file': files('virtsecretd.sysconf'),
- }
endif
diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in
index 8444142a3a..cbd63fe0b2 100644
--- a/src/secret/virtsecretd.service.in
+++ b/src/secret/virtsecretd.service.in
@@ -13,6 +13,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTSECRETD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/secret/virtsecretd.sysconf b/src/secret/virtsecretd.sysconf
deleted file mode 100644
index 2247d05964..0000000000
--- a/src/secret/virtsecretd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtsecretd.service systemd unit
-
-VIRTSECRETD_ARGS="--timeout 120"
diff --git a/src/storage/meson.build b/src/storage/meson.build
index d1aa66b147..c43707461d 100644
--- a/src/storage/meson.build
+++ b/src/storage/meson.build
@@ -125,11 +125,6 @@ if conf.has('WITH_STORAGE')
'name': 'virtstoraged',
'in_file': files('virtstoraged.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtstoraged',
- 'file': files('virtstoraged.sysconf'),
- }
endif
if conf.has('WITH_STORAGE_DISK')
diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in
index fc3e9a1b69..f72f8426fd 100644
--- a/src/storage/virtstoraged.service.in
+++ b/src/storage/virtstoraged.service.in
@@ -15,6 +15,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTSTORAGED_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/storage/virtstoraged.sysconf b/src/storage/virtstoraged.sysconf
deleted file mode 100644
index 122373eb7c..0000000000
--- a/src/storage/virtstoraged.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtstoraged.service systemd unit
-
-VIRTSTORAGED_ARGS="--timeout 120"
diff --git a/src/vbox/meson.build b/src/vbox/meson.build
index df0cfb40e8..240f2389a9 100644
--- a/src/vbox/meson.build
+++ b/src/vbox/meson.build
@@ -68,9 +68,4 @@ if conf.has('WITH_VBOX')
'name': 'virtvboxd',
'in_file': files('virtvboxd.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtvboxd',
- 'file': files('virtvboxd.sysconf'),
- }
endif
diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in
index ebb31dde07..cfdafc39d2 100644
--- a/src/vbox/virtvboxd.service.in
+++ b/src/vbox/virtvboxd.service.in
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTVBOXD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/vbox/virtvboxd.sysconf b/src/vbox/virtvboxd.sysconf
deleted file mode 100644
index 37ad353d54..0000000000
--- a/src/vbox/virtvboxd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtvboxd.service systemd unit
-
-VIRTVBOXD_ARGS="--timeout 120"
diff --git a/src/vz/meson.build b/src/vz/meson.build
index 14f7280f66..d102696943 100644
--- a/src/vz/meson.build
+++ b/src/vz/meson.build
@@ -58,9 +58,4 @@ if conf.has('WITH_VZ')
'name': 'virtvzd',
'in_file': files('virtvzd.init.in'),
}
-
- sysconf_files += {
- 'name': 'virtvzd',
- 'file': files('virtvzd.sysconf'),
- }
endif
diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in
index f551cb8fbf..7636bf2b9e 100644
--- a/src/vz/virtvzd.service.in
+++ b/src/vz/virtvzd.service.in
@@ -14,6 +14,7 @@ Documentation=https://libvirt.org
[Service]
Type=notify
+Environment=VIRTVZD_ARGS="--timeout 120"
EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd
ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
diff --git a/src/vz/virtvzd.sysconf b/src/vz/virtvzd.sysconf
deleted file mode 100644
index a86b9dfb6c..0000000000
--- a/src/vz/virtvzd.sysconf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Customizations for the virtvzd.service systemd unit
-
-VIRTVZD_ARGS="--timeout 120"
diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
deleted file mode 100644
index 4f83edab90..0000000000
--- a/tools/libvirt-guests.sysconf
+++ /dev/null
@@ -1,50 +0,0 @@
-# Customizations for the libvirt-guests.service systemd unit
-
-# URIs to check for running guests
-# example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
-#URIS=default
-
-# action taken on host boot
-# - start all guests which were running on shutdown are started on boot
-# regardless on their autostart settings
-# - ignore libvirt-guests init script won't start any guest on boot, however,
-# guests marked as autostart will still be automatically started by
-# libvirtd
-#ON_BOOT=start
-
-# Number of seconds to wait between each guest start. Set to 0 to allow
-# parallel startup.
-#START_DELAY=0
-
-# action taken on host shutdown
-# - suspend all running guests are suspended using virsh managedsave
-# - shutdown all running guests are asked to shutdown. Please be careful with
-# this settings since there is no way to distinguish between a
-# guest which is stuck or ignores shutdown requests and a guest
-# which just needs a long time to shutdown. When setting
-# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
-# value suitable for your guests.
-#ON_SHUTDOWN=suspend
-
-# Number of guests will be shutdown concurrently, taking effect when
-# "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one
-# after another. Number of guests on shutdown at any time will not exceed number
-# set in this variable.
-#PARALLEL_SHUTDOWN=0
-
-# Number of seconds we're willing to wait for a guest to shut down. If parallel
-# shutdown is enabled, this timeout applies as a timeout for shutting down all
-# guests on a single URI defined in the variable URIS. If this is 0, then there
-# is no time out (use with caution, as guests might not respond to a shutdown
-# request). The default value is 300 seconds (5 minutes).
-#SHUTDOWN_TIMEOUT=300
-
-# If non-zero, try to bypass the file system cache when saving and
-# restoring guests, even though this may give slower operation for
-# some file systems.
-#BYPASS_CACHE=0
-
-# If non-zero, try to sync guest time on domain resume. Be aware, that
-# this requires guest agent with support for time synchronization
-# running in the guest. By default, this functionality is turned off.
-#SYNC_TIME=1
diff --git a/tools/meson.build b/tools/meson.build
index 2d0aecb90b..f4b4a16c29 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -308,12 +308,6 @@ if conf.has('WITH_LIBVIRTD')
)
if init_script == 'systemd'
- install_data(
- 'libvirt-guests.sysconf',
- install_dir: sysconfdir / 'sysconfig',
- rename: 'libvirt-guests',
- )
-
configure_file(
input: 'libvirt-guests.service.in',
output: '@BASENAME@',
--
2.35.0

View File

@ -206,11 +206,29 @@
%define tls_priority "@LIBVIRT,SYSTEM"
# libvirt 8.1.0 stops distributing any sysconfig files.
# If the user has customized their sysconfig file,
# the RPM upgrade path will rename it to .rpmsave
# because the file is no longer managed by RPM.
# To prevent a regression we rename it back after the
# transaction to preserve the user's modifications
%define libvirt_sysconfig_pre() \
for sc in %{?*} ; do \
test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \
done \
%{nil}
%define libvirt_sysconfig_posttrans() \
for sc in %{?*} ; do \
test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \
done \
%{nil}
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 8.0.0
Release: 1%{?dist}%{?extra_release}
Release: 2%{?dist}%{?extra_release}
License: LGPLv2+
URL: https://libvirt.org/
@ -221,6 +239,11 @@ Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Source1: symlinks
Patch1: libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Patch2: libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch
Patch3: libvirt-docs-Add-man-page-for-libvirt-guests.patch
Patch4: libvirt-remove-sysconfig-files.patch
Patch5: libvirt-qemu-fix-inactive-snapshot-revert.patch
Patch6: libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
@ -1306,6 +1329,7 @@ fi \
%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket
%pre daemon
%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests
# 'libvirt' group is just to allow password-less polkit access to
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
# described at the above link.
@ -1354,6 +1378,7 @@ if [ $1 -ge 1 ] ; then
fi
%posttrans daemon
%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests
if test %libvirt_daemon_needs_restart libvirtd
then
# See if user has previously modified their install to
@ -1394,6 +1419,9 @@ fi
%libvirt_daemon_finish_restart libvirtd
%pre daemon-driver-network
%libvirt_sysconfig_pre virtnetworkd
%post daemon-driver-network
%if %{with_firewalld_zone}
%firewalld_reload
@ -1413,8 +1441,11 @@ fi
%endif
%posttrans daemon-driver-network
%libvirt_sysconfig_posttrans virtnetworkd
%libvirt_daemon_perform_restart virtnetworkd
%pre daemon-driver-nwfilter
%libvirt_sysconfig_pre virtnwfilterd
%post daemon-driver-nwfilter
%if %{with_modular_daemons}
@ -1426,8 +1457,11 @@ fi
%libvirt_daemon_systemd_preun virtnwfilterd
%posttrans daemon-driver-nwfilter
%libvirt_sysconfig_posttrans virtnwfilterd
%libvirt_daemon_perform_restart virtnwfilterd
%pre daemon-driver-nodedev
%libvirt_sysconfig_pre virtnodedevd
%post daemon-driver-nodedev
%if %{with_modular_daemons}
@ -1439,8 +1473,11 @@ fi
%libvirt_daemon_systemd_preun virtnodedevd
%posttrans daemon-driver-nodedev
%libvirt_sysconfig_posttrans virtnodedevd
%libvirt_daemon_perform_restart virtnodedevd
%pre daemon-driver-interface
%libvirt_sysconfig_pre virtinterfaced
%post daemon-driver-interface
%if %{with_modular_daemons}
@ -1452,8 +1489,11 @@ fi
%libvirt_daemon_systemd_preun virtinterfaced
%posttrans daemon-driver-interface
%libvirt_sysconfig_posttrans virtinterfaced
%libvirt_daemon_perform_restart virtinterfaced
%pre daemon-driver-secret
%libvirt_sysconfig_pre virtsecretd
%post daemon-driver-secret
%if %{with_modular_daemons}
@ -1465,24 +1505,30 @@ fi
%libvirt_daemon_systemd_preun virtsecretd
%posttrans daemon-driver-secret
%libvirt_sysconfig_posttrans virtsecretd
%libvirt_daemon_perform_restart virtsecretd
%post daemon-driver-storage
%pre daemon-driver-storage-core
%libvirt_sysconfig_pre virtstoraged
%post daemon-driver-storage-core
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtstoraged
%endif
%libvirt_daemon_schedule_restart virtstoraged
%preun daemon-driver-storage
%preun daemon-driver-storage-core
%libvirt_daemon_systemd_preun virtstoraged
%posttrans daemon-driver-storage
%posttrans daemon-driver-storage-core
%libvirt_sysconfig_posttrans virtstoraged
%libvirt_daemon_perform_restart virtstoraged
%if %{with_qemu}
%pre daemon-driver-qemu
%libvirt_sysconfig_pre virtqemud
# We want soft static allocation of well-known ids, as disk images
# are commonly shared across NFS mounts by id rather than name; see
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
@ -1507,11 +1553,15 @@ exit 0
%libvirt_daemon_systemd_preun virtqemud
%posttrans daemon-driver-qemu
%libvirt_sysconfig_posttrans virtqemud
%libvirt_daemon_perform_restart virtqemud
%endif
%if %{with_lxc}
%pre daemon-driver-lxc
%libvirt_sysconfig_pre virtlxcd
%post daemon-driver-lxc
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post virtlxcd
@ -1522,6 +1572,7 @@ exit 0
%libvirt_daemon_systemd_preun virtlxcd
%posttrans daemon-driver-lxc
%libvirt_sysconfig_posttrans virtlxcd
%libvirt_daemon_perform_restart virtlxcd
%endif
@ -1533,10 +1584,14 @@ exit 0
%endif
%libvirt_daemon_schedule_restart virtvboxd
%pre daemon-driver-vbox
%libvirt_sysconfig_pre virtvboxd
%preun daemon-driver-vbox
%libvirt_daemon_systemd_preun virtvboxd
%posttrans daemon-driver-vbox
%libvirt_sysconfig_posttrans virtvboxd
%libvirt_daemon_perform_restart virtvboxd
%endif
@ -1548,10 +1603,14 @@ exit 0
%endif
%libvirt_daemon_schedule_restart virtxend
%pre daemon-driver-libxl
%libvirt_sysconfig_pre virtxend
%preun daemon-driver-libxl
%libvirt_daemon_systemd_preun virtxend
%posttrans daemon-driver-libxl
%libvirt_sysconfig_posttrans virtxend
%libvirt_daemon_perform_restart virtxend
%endif
@ -1654,16 +1713,11 @@ exit 0
%{_unitdir}/virtlockd.socket
%{_unitdir}/virtlockd-admin.socket
%{_unitdir}/libvirt-guests.service
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
@ -1714,6 +1768,7 @@ exit 0
%{_mandir}/man1/virt-admin.1*
%{_mandir}/man1/virt-host-validate.1*
%{_mandir}/man8/virt-ssh-helper.8*
%{_mandir}/man8/libvirt-guests.8*
%{_mandir}/man8/libvirtd.8*
%{_mandir}/man8/virtlogd.8*
%{_mandir}/man8/virtlockd.8*
@ -1736,7 +1791,6 @@ exit 0
%ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
%files daemon-driver-interface
%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced
%config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf
%{_datadir}/augeas/lenses/virtinterfaced.aug
%{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug
@ -1749,7 +1803,6 @@ exit 0
%{_mandir}/man8/virtinterfaced.8*
%files daemon-driver-network
%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd
%config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf
%{_datadir}/augeas/lenses/virtnetworkd.aug
%{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug
@ -1773,7 +1826,6 @@ exit 0
%endif
%files daemon-driver-nodedev
%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd
%config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf
%{_datadir}/augeas/lenses/virtnodedevd.aug
%{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug
@ -1786,7 +1838,6 @@ exit 0
%{_mandir}/man8/virtnodedevd.8*
%files daemon-driver-nwfilter
%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd
%config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf
%{_datadir}/augeas/lenses/virtnwfilterd.aug
%{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug
@ -1801,7 +1852,6 @@ exit 0
%{_mandir}/man8/virtnwfilterd.8*
%files daemon-driver-secret
%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd
%config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf
%{_datadir}/augeas/lenses/virtsecretd.aug
%{_datadir}/augeas/lenses/tests/test_virtsecretd.aug
@ -1816,7 +1866,6 @@ exit 0
%files daemon-driver-storage
%files daemon-driver-storage-core
%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged
%config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf
%{_datadir}/augeas/lenses/virtstoraged.aug
%{_datadir}/augeas/lenses/tests/test_virtstoraged.aug
@ -1874,7 +1923,6 @@ exit 0
%if %{with_qemu}
%files daemon-driver-qemu
%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud
%config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf
%{_datadir}/augeas/lenses/virtqemud.aug
@ -1904,7 +1952,6 @@ exit 0
%if %{with_lxc}
%files daemon-driver-lxc
%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd
%config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf
%{_datadir}/augeas/lenses/virtlxcd.aug
%{_datadir}/augeas/lenses/tests/test_virtlxcd.aug
@ -1927,7 +1974,6 @@ exit 0
%if %{with_libxl}
%files daemon-driver-libxl
%config(noreplace) %{_sysconfdir}/sysconfig/virtxend
%config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf
%{_datadir}/augeas/lenses/virtxend.aug
%{_datadir}/augeas/lenses/tests/test_virtxend.aug
@ -1950,7 +1996,6 @@ exit 0
%if %{with_vbox}
%files daemon-driver-vbox
%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd
%config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf
%{_datadir}/augeas/lenses/virtvboxd.aug
%{_datadir}/augeas/lenses/tests/test_virtvboxd.aug
@ -2090,6 +2135,14 @@ exit 0
%changelog
* Tue Jan 25 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-2
- build: Only install libvirt-guests when building libvirtd (rhbz#2042529)
- docs: Add man page for libvirt-guests (rhbz#2042529)
- remove sysconfig files (rhbz#2042529)
- spec: Run pre/post-install stuff on 'daemon-driver-storage-core' (rhbz#2025644)
- qemu: fix inactive snapshot revert (rhbz#2039136)
- Revert "report error when virProcessGetStatInfo() is unable to parse data" (rhbz#2043579)
* Fri Jan 14 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-1
- Rebased to libvirt-8.0.0 (rhbz#2001507)
- The rebase also fixes the following bugs: