Why virsh commands are failing with error "Failed to connect socket to libvirt-sock No such file or directory"
Issue
- All
virsh
commands executed by the user other than root is failing with the error below.
error: failed to connect to the hypervisor
error: Failed to connect socket to '/home/test_user/.cache/libvirt/libvirt-sock': No such file or directory
- The same
virsh
command will work if the user runs the command again within30 seconds
.
Environment
- Red Hat Enterprise Linux 7.7.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.