Ask Your Question

configuring libvirt uri and setting permissions

asked 2013-07-25 09:20:00 -0500

a7ndrew gravatar image

updated 2013-07-25 09:26:03 -0500

How do I set the connection uri in Fedora?

[andrew@tree ~]$ cat ~/.libvirt/libvirt.conf 

[andrew@tree ~]$ virsh uri

I was expecting that to return qemu:///system as specified.

Also, how do I prevent myself from being prompted for a password every time I try to do anything with libvirt? I think it has something to do with policykit, but I can't seem to find where.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-26 04:31:34 -0500

marcindulak gravatar image

The answer to the first part of the question.

According to the configuration for unpriviledged user is in $XDG_CONFIG_HOME/libvirt/libvirt.conf and XDG_CONFIG_HOME is undefined on Fedora so according to it's value should be $HOME/.config. Use:


You can also use the environment variable LIBVIRT_DEFAULT_URI='qemu:///system', which takes precedence over the libvirt.conf.

Note that virsh --connect qemu:///system as unpriviledged user from an ssh session will not work due to

edit flag offensive delete link more


Excellent, thanks!

a7ndrew gravatar imagea7ndrew ( 2013-07-26 20:58:20 -0500 )edit

Question Tools


Asked: 2013-07-25 09:20:00 -0500

Seen: 1,097 times

Last updated: Jul 26 '13