Mon, Jan 11, 2016 at 03:24:35PM CET, jtluka(a)redhat.com wrote:
Hi, recently my colleague gave me a hint how to manage virtual
machines
on the system using non-root user. It's very simple so I'd like to share
it here.
1. first you need to use policy kit to tweak libvirtd.
# echo 'polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
' > /etc/polkit-1/rules.d/80-libvirt.rules
then (re)start libvirtd service,
# systemctl enable libvirtd
# systemctl start libvirtd
2. add the non-root user to group 'wheel'.
3. the last bit is to run lnst-ctl with following environment variable
exported:
LIBVIRT_DEFAULT_URI=qemu:///system lnst-ctl ...
Hope I did not forget anything. Feel free to ping me if this does not
work for you.
-Jan
_______________________________________________
LNST-developers mailing list
lnst-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedoraho...
That also means that I'd like to remove the check for root user when a recipe
matches virtual environment since root is not required anymore.