How can I add myself to the libvirt group in Fedora Silverblue?

Hi!

I’ve installed libvirt on Silverblue, and when I run getent group (after reboot), I can see the libvirt group in the results.

However, I don’t see a corresponding entry in /etc/group for libvirt (in fact I only see root, wheel, and my own user’s group; whereas getent group shows 81 groups). I’ve tried in a fresh F29 Workstation in a VM on another machine, and there all the expected groups show up in /etc/group (including libvirt, once I’ve installed the RPM).

Additionally, trying to add myself to the group with sudo usermod -a -G libvirt $(whoami) doesn’t seem to have any effect.

I’ve got a feeling I’m looking in the wrong place, so suggestions welcome! :slight_smile:

See https://github.com/projectatomic/rpm-ostree/issues/49

First for libvirt IMO it’s better to do https://goldmann.pl/blog/2012/12/03/configuring-polkit-in-fedora-18-to-access-virt-manager/

But copying my workaround from the issue: anyone who wants to e.g. add themselves to the libvirt group should do:

grep -E '^libvirt:' /usr/lib/group >> /etc/group

We have some work in progress to switch to sysusers: https://github.com/projectatomic/rpm-ostree/pull/1679

2 Likes

Thanks a lot @walters, especially for the pointer to the polkit way of doing this!