[libvirt-users] UserID Permissions: Virtual Machine Manager vs virsh and Python

Martin Kletzander mkletzan at redhat.com
Wed Jan 20 10:47:05 UTC 2016


On Tue, Jan 19, 2016 at 02:36:02PM -0600, David Ashley wrote:
>I have added a user to the libvirt group on my CentOS 7.2 server and
>that user can successfully access the Virtual Machine Manager without
>authenticating as expected. This allows the user to perform all
>functions in the VMS as if they were root. This is acceptable as this is
>a private server with no outside access so security is not a real issue.
>
>But when that same user tries to perform functions with virsh or using a
>Python script that uses the libvirt module, the connection is just
>read-only.
>
>Why are the permissions different for these environments and what must I
>do to give the user r/w access in virsh or the Python script?
>

I'm guessing (really just guessing), that virt-manager tries connecting
to qemu:///system, but you are connecting to your default uri which is
qemu:///session for non-root users.  You can try connecting to
qemu:///system and that should work.  If you don't want to modify the
code, you can change the default uri in ~/.config/libvirt/libvirt.conf
or in environment variable LIBVIRT_DEFAULT_URI (hand-typed, please
re-check).

Martin

>David Ashley
>
>_______________________________________________
>libvirt-users mailing list
>libvirt-users at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160120/94df5f4b/attachment.sig>


More information about the libvirt-users mailing list