[libvirt-users] libvirtd via unix socket using system uri

Michal Privoznik mprivozn at redhat.com
Mon Apr 29 13:01:35 UTC 2019


On 4/29/19 1:06 PM, lameventanas at 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




More information about the libvirt-users mailing list