[libvirt-users] Console access for a user.

Hi, I would like to allow a user (non-root) to access the console of his VM (he's got root access on it). Using sudo doesn't seem to work: /bin/virsh console vm error: failed to get domain 'vm' error: Domain not found: no domain with matching name 'vm' If I assign suid to virsh, I get: 'error: Failed to initialize libvirt' I don't see any information on Internet about this. What is the procedure to follow to get this result (QEMU conf, libvirt conf, etc)? Thank you in advance.

On Sat, Dec 27, 2014 at 04:05:30PM +0100, Le Bris Gilles wrote:
Hi,
I would like to allow a user (non-root) to access the console of his VM (he's got root access on it). Using sudo doesn't seem to work: /bin/virsh console vm error: failed to get domain 'vm' error: Domain not found: no domain with matching name 'vm' If I assign suid to virsh, I get: 'error: Failed to initialize libvirt'
When you are running virsh as a non-root, you are connecting to the session interface by default. Use 'virsh uri' to see where you are connecting. You need to use 'virsh -c qemu:///system' to connect to the system daemon (the default can be set in ~/.config/libvirt/libvirt.conf). To configure which user has access to the system daemon, see the configuration options in /etc/libvirt/libvirtd.conf (there are various authentication and permission options). For fine grained ACLs you can use e.g. polkit, see http://libvirt.org/aclpolkit.html Martin
I don't see any information on Internet about this. What is the procedure to follow to get this result (QEMU conf, libvirt conf, etc)?
Thank you in advance.
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
participants (2)
-
Le Bris Gilles
-
Martin Kletzander