jamielennox.net

User Access to Libvirtd

| Comments

To enable access to libvirtd without sudo:

  1. Create a group for privileged users, I called mine libvirt and add your users to it.
  2. Create a new file in /etc/polkit-1/rules.d/ i called mine 50-libvirt-group.rules
  3. Add the following function:
1
2
3
4
5
6
polkit.addRule(function(action, subject) {
    if (action.id == "org.libvirt.unix.manage" &&
        subject.isInGroup('libvirt') ) {
        return polkit.Result.YES;
    }
});

Comments