Re: Can't connect to libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/11/23 16:29, list-libvirt-users@xxxxxxxxxxxxxxxxxxx wrote:
> Hi folks!
> 
> I'm trying to connect to a self-compiled libvirt 9.10.0 from python, but
> get the following error:
> 
> Python 3.12.0 (main, Oct  3 2023, 19:47:47) [GCC 11.4.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import libvirt as lv
>>>> conn = lv.openReadOnly(None)
> libvirt: DBus Utils error : error from service:
> GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action
> org.libvirt.unix.monitor is not registered
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/home/user/sw/python3/lib/python3.12/site-packages/libvirt.py",
> line 349, in openReadOnly
>    raise libvirtError('virConnectOpenReadOnly() failed')
> libvirt.libvirtError: error from service:
> GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action
> org.libvirt.unix.monitor is not registered
> 
> What is the issue here? Also, I've grepped the error in any source but
> found nothing!
> 

That's because this error message does not come from libvirt but
PolicyKit. I suspect that either you did not install "*.policy" files:

  /usr/share/polkit-1/rules.d/50-libvirt.rules
  /usr/share/polkit-1/actions/org.libvirt.unix.policy
  /usr/share/polkit-1/actions/org.libvirt.api.policy

or you did, but polkit daemon wasn't restarted (though I would have
sworn it can reload rules dynamically).

Michal
_______________________________________________
Users mailing list -- users@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux