[Pkg-libvirt-maintainers] Bug#1072769: libvirt-daemon: Cannot connect to hypervisor with user session after upgrade
Corey Hickey
bugfood-c at fatooh.org
Mon Jun 10 19:53:46 BST 2024
I ran into this problem too, and I was able to troubleshoot it.
To the best of my understanding, this is caused by:
https://github.com/libvirt/libvirt/commit/64b966558cc6002fe150a0292a24eb2802a792c5#diff-69678f99af3e2f578ab1665eaaf3423314b3aa01a6e0b09a085b049e82b17903R102
case VIR_FIREWALL_BACKEND_IPTABLES: {
g_autofree char *iptablesInPath = virFindFileInPath(IPTABLES);
if (iptablesInPath)
fwBackendSelected = true;
break;
}
Libvirt is searching the PATH for a program named 'iptables', and
failing because:
* iptables is in /usr/sbin
* /usr/sbin is not in the PATH for non-root users
Libvirtd now also supports nftables, but that fails for the same reason.
I don't know what is the most appropriate solution to this.
As a workaround, it is possible to override the PATH; for example:
PATH=/usr/sbin:$PATH virsh list
After running this once, a libvirt daemon should remain resident, so
future virsh commands should not need the workaround, at least until the
daemon exits for any reason.
-Corey
More information about the Pkg-libvirt-maintainers
mailing list