<p><br>
On Jun 22, 2012 1:08 AM, "mallapadi niranjan" <<a href="mailto:niranjan.ashok@gmail.com">niranjan.ashok@gmail.com</a>> wrote:<br>
><br>
> Hi all<br>
><br>
> I have a Fedora release 17 (Beefy Miracle) with libvirt versions:<br>
><br>
> libvirt-0.9.11.3-1.fc17.x86_64<br>
> virt-manager-0.9.1-3.fc17.noarch<br>
><br>
> I have allowed non-root user to user libvirt by allowing the user through polkit<br>
><br>
> cat /etc/polkit-1/localauthority/50-local.d/cat 50-org.example-libvirt-remote-access.pkla <br>
><br>
> [Remote libvirt SSH access]<br>
> Identity=unix-group:virt<br>
> Action=org.libvirt.unix.manage;org.libvirt.unix.monitor<br>
> ResultAny=yes<br>
> ResultInactive=yes<br>
> ResultActive=yes<br>
><br>
> After doing the above i am able to connect to virt-manager as non-root user but unable to create storage pools. <br>
><br>
> [juno@reserved ~]$ id<br>
> uid=1001(juno) gid=1001(juno) groups=1001(juno),1002(virt) context=staff_u:staff_r:staff_t:s0<br>
> [juno@reserved ~]$ virsh<br>
> Welcome to virsh, the virtualization interactive terminal.<br>
><br>
> Type:  'help' for help with commands<br>
>        'quit' to quit<br>
><br>
> virsh # pool-list<br>
> error: Failed to reconnect to the hypervisor<br>
> error: no valid connection<br>
> error: Failed to connect socket to '@/home/juno/.libvirt/libvirt-sock': Connection refused<br>
><br>
> virsh # list<br>
> error: Failed to reconnect to the hypervisor<br>
> error: no valid connection<br>
> error: Failed to connect socket to '@/home/juno/.libvirt/libvirt-sock': Connection refused<br>
><br>
> I have defined pool called virt-images (/virt-images) which the non-root (in this case the username is Juno)  user has the read/write permissions <br>
><br>
> Also tried adding the permissions to unix socket in /etc/libvirt/libvirtd.conf as below:<br>
><br>
>  cat /etc/libvirt/libvirtd.conf  | grep -v ^$ | grep -v ^#<br>
> unix_sock_group = "virt"<br>
> unix_sock_ro_perms = "0777"<br>
> unix_sock_rw_perms = "0770"<br>
> unix_sock_dir = "/var/run/libvirt"<br>
><br>
> But the unix socket are created in /var/run/libvirt and not in users home directory, So how do we make a non-root user virsh commands check the socket created in /var/run/libvirt. It always checks for the socket in user's home directory ?<br>

><br>
> Any pointers on above would be helpfu.<br>
><br>
> Regards<br>
> Niranjan<br>
><br>
><br>
> _______________________________________________<br>
> libvirt-users mailing list<br>
> <a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br></p>
<p>I believe I ran into this, try using this virsh command as the polkit authorized user</p>
<p>virsh -c qemu:///system</p>
<p>- Trey</p>