Add policykit rules for virt-manager
If a user wants to use virt-man to control virtual machines on localhost, he will be prompted to authenticate to policykit. If you have a policykit rule established (as the libvirt package already provides) for the right group, it's seamless. Just make sure the user is in group "libvirt" (from /usr/share/polkit-1/rules.d/50-libvirt.rules) Or, to make a different group the (additional) accepted value:
tf=/etc/polkit-1/rules.d/80-libvirt.rules
touch "${tf}" ; chmod 0644 "${tf}"
cat <<EOF >"${tf}"
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" && subject.local && subject.active && subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
EOF
Comments