Requires/Wants only tells systemd that the corresponding unit should be started when the current one is, but that could very well happen in parallel. For virtlogd/virtlockd, we want the socket to be already active when the hypervisor driver is started. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/libxl/meson.build | 1 + src/qemu/meson.build | 2 ++ src/remote/libvirtd.service.in | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libxl/meson.build b/src/libxl/meson.build index e84999e14d..ad8d9b757f 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -69,6 +69,7 @@ if conf.has('WITH_LIBXL') 'name': 'Libvirt libxl', 'service_unit_extra': [ 'Wants=virtlockd.socket', + 'After=virtlockd.socket', 'After=remote-fs.target', 'After=xencommons.service', 'Conflicts=xendomains.service', diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 7e5db09e0c..bf900e3f14 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -187,6 +187,8 @@ if conf.has('WITH_QEMU') 'service_unit_extra': [ 'Requires=virtlogd.socket', 'Wants=virtlockd.socket', + 'After=virtlogd.socket', + 'After=virtlockd.socket', 'Wants=systemd-machined.service', 'After=systemd-machined.service', 'After=remote-fs.target', diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 8839c00a15..a2c3c8f8fa 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -1,13 +1,18 @@ [Unit] Description=Virtualization daemon -Requires=virtlogd.socket # Use Wants instead of Requires so that users # can disable these three .socket units to revert # to a traditional non-activation deployment setup Wants=libvirtd.socket Wants=libvirtd-ro.socket Wants=libvirtd-admin.socket +After=libvirtd.socket +After=libvirtd-ro.socket +After=libvirtd-admin.socket +Requires=virtlogd.socket Wants=virtlockd.socket +After=virtlogd.socket +After=virtlockd.socket Wants=systemd-machined.service After=network.target After=dbus.service -- 2.41.0