
On 4/29/19 1:06 PM, lameventanas@gmail.com wrote:
I want to run libvirtd as a special user, and allowing users that belong to a special group to connect via qemu+unix:///system (eg: unix socket).
I did everything necessary to do so: created a libvirt user and group, added the libvirt user to the kvm group, added my normal user to the libvirt group, and made sure the socket is owned by libvirt:libvirt with permissions set to 770.
libvirtd starts successfully, but when I try to connect as the normal user I get this error:
bash$ virsh --connect qemu+unix://system error: failed to connect to the hypervisor error: invalid argument: using unix socket and remote server 'system' is not supported.
This is not valid URI. https://libvirt.org/uri.html You may want to use 'qemu+unix:///system' or simply 'qemu:///system' which is the same because libvirt connects via unix socket by default. Anyway, you'll need to run libvirtd privileged, otherwise it'll get EPERM when trying to do almost anything. Michal