Skip to content

Commit e31f9a0

Browse files
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.
1 parent 8261bec commit e31f9a0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

python/lib/cloudutils/serviceConfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ def setupLiveMigration(self):
722722
elif os.path.exists("/etc/default/libvirtd"):
723723
cfo = configFileOps("/etc/default/libvirtd", self)
724724
cfo.replace_or_add_line("libvirtd_opts=","libvirtd_opts='-l'")
725+
cfo.replace_or_add_line("LIBVIRTD_ARGS=","LIBVIRTD_ARGS=\"--listen\"")
725726
if os.path.exists("/lib/systemd/system/libvirtd.socket"):
726727
bash("/bin/systemctl mask \
727728
libvirtd.socket \

0 commit comments

Comments
 (0)