Connecting to libvirtd as non-root user on openSUSE 12.2

February 7, 2013

An old bug still bites one trying to connect to libvirtd/, eg. when starting virt-manager. By default, a password prompt asking for the root password appears. You might think that virt-manager would behave like VirtualBox and adding yourself to the libvirt group would suffice but to no avail. While that group exists, in the default configuration adding yourself to it is not sufficient. The reason most probably being that one does not want to dictate a default authorization policy. So far, so bad.

The polkit-auth command referenced in the “official” openSUSE 12.2 documentation is no longer available. But even if you create the /etc/polkit-1/localauthority/50-local.d/50-libvirt-nonroot.pkla file with the contents


[libvirt non-root access]
Identity=unix-group:libvirt
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes

this won’t work, because the openSUSE-supplied file /var/lib/polkit-1/localauthority/10-vendor.d/org.libvirt.unix.manage.pkla always seems to take precendence. The fix is to make the latter file empty.

This was reported as BNC #544579, but still seems to apply to openSUSE 12.2 as well.

Tags: , , , , , ,
Posted in libvirt, Virtualization by Pieter Hollants

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

You must be logged in to post a comment.

 
Copyright © 2020 by Pieter Hollants. All rights reserved. - Legal notices & Privacy policy