From 1b29951f51c199efac97d0c6a23b8da3c139caad Mon Sep 17 00:00:00 2001 From: Xore Date: Sun, 13 Sep 2026 00:14:59 +0200 Subject: [PATCH] fix(host): make libvirt stack enablement mutually exclusive so one stack cannot silently kill the other's sockets (#3126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Monolithic libvirtd and modular virt*d stacks both bind /run/libvirt/libvirt-sock(-ro) with Conflicts= between their units. When both stacks get enabled, starting one instantly closes the other's sockets — sockets have no Restart=, so recovery needs manual re-enablement. Reproduced live on the host installer. step_libvirt_install now disables the opposite stack's units before enabling its own: monolithic arm disables virtproxyd.socket/-ro before enabling libvirtd; modular arm disables libvirtd.* before enabling the virt*d sockets. Closes #3126 --- scripts/install-homeserver.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install-homeserver.sh b/scripts/install-homeserver.sh index b9c3a84ba..ec69c8b77 100755 --- a/scripts/install-homeserver.sh +++ b/scripts/install-homeserver.sh @@ -2700,9 +2700,19 @@ step_libvirt_install() { # than assuming the monolithic one. if systemctl list-unit-files libvirtd.service >/dev/null 2>&1 \ && systemctl cat libvirtd.service >/dev/null 2>&1; then + # The modular virtproxyd sockets Conflicts= the monolithic libvirtd units + # and bind the same /run/libvirt/libvirt-sock(-ro) paths. If a package + # preset leaves both stacks enabled, whichever activates second stops the + # other via Conflicts= -- permanently, since socket units have no + # Restart= (#3126). Keep this host on the monolithic stack only. + systemctl disable --now virtproxyd.socket virtproxyd-ro.socket >/dev/null 2>&1 || true systemctl enable --now libvirtd else + # Same Conflicts= hazard in reverse: the monolithic units must not stay + # enabled alongside the modular stack this branch is about to activate. + systemctl disable --now libvirtd.socket libvirtd-ro.socket libvirtd.service >/dev/null 2>&1 || true systemctl enable --now virtqemud.socket virtnetworkd.socket virtstoraged.socket \ + virtproxyd.socket virtproxyd-ro.socket \ || echo "WARNING: could not enable the modular libvirt sockets" fi