Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: I'm using pekwm window manager and as a user I want to start the virt-manager. Unfortunatelly I got this error: Unable to connect to libvirt. authentication failed: polkit: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available. Libvirt URI is: qemu:///system Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 1002, in _open_thread self.vmm = self._try_open() File "/usr/share/virt-manager/virtManager/connection.py", line 984, in _try_open flags) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, in openAuth if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: authentication failed: polkit: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available. Everything works find when I'm under gnome or using '$ su -c virt-manager'. I'm dunno if this is a bug or I need to configure something to allow user to connect to libvirt. Version-Release number of selected component (if applicable): 0.10.0 How reproducible: Start alternative WM, like fluxbox or pekwm. Then run 'virt-manager' as a regular user.
One possible workaround is: auth_unix_rw = "none" But this sounds pretty insecure ;-)
This isn't virt-manager's fault. polkit requires that something in your session provide implement a simple dbus API for launching an auth dialog. I know the major DE like KDE, XFCE all provide one. You can do it manually by running /usr/libexec/polkit-gnome-authentication-agent-1 in your session.
(In reply to Cole Robinson from comment #2) > This isn't virt-manager's fault. polkit requires that something in your > session provide implement a simple dbus API for launching an auth dialog. I > know the major DE like KDE, XFCE all provide one. You can do it manually by > running /usr/libexec/polkit-gnome-authentication-agent-1 in your session. Thanks Cole, that fixed it! I know this is not a bug, but the error reported pretty much looks like a bug. One think that could be improved here is the error message (something nice, like 'you need to run polkit manually' would be awesome.)
Hit this too (F20/LXDE): > Unable to connect to libvirt. > > authentication failed: polkit: polkit\56 > retains_authorization_after_challenge=1 > Authorization requires authentication but no agent is available. > > Libvirt URI is: qemu:///system > > Traceback (most recent call last): > File "/usr/share/virt-manager/virtManager/connection.py", line 898, > in _open_thread > self._backend.open(self._do_creds_password) > File "/usr/share/virt-manager/virtinst/connection.py", line 159, > in open > open_flags) > File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, > in openAuth > if ret is None:raise libvirtError('virConnectOpenAuth() failed') > libvirtError: authentication failed: polkit: polkit\56 > retains_authorization_after_challenge=1 > Authorization requires authentication but no agent is available. However, double-clicking "localhost (QEMU)" triggered the working authentication dialog, so no extra steps were needed to workaround this inconvenience (still sounds like a bug to me, though).
If it isn't working, the issue is elsewhere, either your desktop's session or some race somewhere. virt-manager/libvirt just request polkit access, it's up to other parts of the stack to register an agent and make sure it starts up correctly.
Please note that this can happen if one wishes to run virt-manager remotely (e.g. via ssh X11 forwarding). It would be nice if virt-manager gave a better error indication if it detects the absence of other local infrastructure.