KVM 101 : Error: Failed to connect socket to '/var/run/libvirt/libvirt-sock'



When installing KVM-QEMU using the below command in debian systems, we might get an error when trying to use the virsh command:


When using the below commands for example:


Or:


We get one of the following errors:

error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

When trying to start our libvirtd daemon, we discover that it was not installed:


We can install libvirtd using the below command:


Remark:

libvirtd talks to the hypervisor. It is the intermediary between the  virsh client and hypervisor

Comments

Leave as a comment:

Archive