Connecting to libvirtd as non-root user on openSUSE 12.2

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]

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.

Leave a comment