Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
B.2.2. Failed to connect socket ... : Permission denied
- Symptom
- When running a
virshcommand, the following error (or similar) appears:virsh -c qemu:///system list
$ virsh -c qemu:///system list error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied error: failed to connect to the hypervisorCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Investigation
- Without any host name specified, the connection to QEMU uses UNIX sockets by default. If there is no error running this command as root, the UNIX socket options in
/etc/libvirt/libvirtd.confare likely misconfigured. - Solution
- To connect as a non-root user using UNIX sockets, configure the following options in
/etc/libvirt/libvirtd.conf:unix_sock_group = <group> unix_sock_ro_perms = <perms> unix_sock_rw_perms = <perms>
unix_sock_group = <group> unix_sock_ro_perms = <perms> unix_sock_rw_perms = <perms>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The user runningvirshmust be a member of thegroupspecified in theunix_sock_groupoption.