From e31f9a06af074399a66c66d5cfb2d074e8764e06 Mon Sep 17 00:00:00 2001 From: Ramgopal Nagaboina Date: Fri, 11 Sep 2026 11:59:27 -0400 Subject: [PATCH] kvm: set LIBVIRTD_ARGS so libvirtd listens on Debian and Ubuntu hosts cloudstack-setup-agent sets up live migration on Debian and Ubuntu by writing libvirtd_opts='-l' to /etc/default/libvirtd and masking the libvirtd sockets. The libvirtd.service unit on current releases reads LIBVIRTD_ARGS from that file instead (Debian 12 and 13 run "libvirtd $LIBVIRTD_ARGS" with "--timeout 120" as the default), so after adding a host libvirtd runs without --listen, nothing listens on the migration ports and live migration fails with "unable to connect to server". Also set LIBVIRTD_ARGS="--listen", and keep libvirtd_opts for older units that still read it. --- python/lib/cloudutils/serviceConfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/lib/cloudutils/serviceConfig.py b/python/lib/cloudutils/serviceConfig.py index 0b4820dd7b65..ed1af75891eb 100755 --- a/python/lib/cloudutils/serviceConfig.py +++ b/python/lib/cloudutils/serviceConfig.py @@ -722,6 +722,7 @@ def setupLiveMigration(self): elif os.path.exists("/etc/default/libvirtd"): cfo = configFileOps("/etc/default/libvirtd", self) cfo.replace_or_add_line("libvirtd_opts=","libvirtd_opts='-l'") + cfo.replace_or_add_line("LIBVIRTD_ARGS=","LIBVIRTD_ARGS=\"--listen\"") if os.path.exists("/lib/systemd/system/libvirtd.socket"): bash("/bin/systemctl mask \ libvirtd.socket \