[libvirt-users] manage VM without root access?

hi, with libvirt, is it possible to manage VMs (using virsh, for e.g) without root access? if that is possible, how can i do that? many thanks, Jun

Hi Jun, The virsh command can be used in read-only mode by unprivileged users or, with root access, full administration functionality. The virsh command is ideal for scripting virtualization administration, for example: # virsh -r Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh > list --all Id Name State ---------------------------------------------------- - f16 shut off virsh > start f16 error: Failed to start domain f16 error: operation virDomainCreate forbidden for read only access Regards, Alex ----- Original Message ----- From: "Jun Koi" <junkoi2004@gmail.com> To: libvirt-users@redhat.com Sent: Monday, March 19, 2012 2:21:08 PM Subject: [libvirt-users] manage VM without root access? hi, with libvirt, is it possible to manage VMs (using virsh, for e.g) without root access? if that is possible, how can i do that? many thanks, Jun _______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

I am using PolicyKit for that http://libvirt.org/auth.html -- Evaggelos Balaskas - Unix System Engineer http://gr.linkedin.com/in/evaggelosbalaskas

On 03/19/2012 07:21 AM, Jun Koi wrote:
hi,
with libvirt, is it possible to manage VMs (using virsh, for e.g) without root access?
The daemon is usually running as root, but virsh can do everything as a user also.
if that is possible, how can i do that?
I'm using *local* connection to libvirt with these settings: /etc/libvirt/libvirt.conf: uri_default = "qemu:///system" /etc/libvirt/libvirtd.conf unix_sock_group = "libvirt" unix_sock_ro_perms = "0777" unix_sock_rw_perms = "0770" unix_sock_dir = "/var/run/libvirt" And my user is in the "libvirt" group. You can also use other authentication methods as someone mentioned before me.
participants (4)
-
Alex Jia
-
Evaggelos Balaskas
-
Jun Koi
-
Martin Kletzander