Bug 984092
Summary: | Unable to connect to libvirt error when outside GNOME | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Fojtik <mfojtik> |
Component: | virt-manager | Assignee: | Cole Robinson <crobinso> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | berrange, crobinso, fche, hbrock, jforbes, jpokorny, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-12 18:44:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michal Fojtik
2013-07-12 18:32:00 UTC
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. |