KVM Failed to Connect to Hypervisor
Symptom
After Hypervisor is connected, when you run the virsh version command to view the libvirt library version and related information, the following information is displayed:
error: failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
Key Process and Cause Analysis
The libvirtd service is not started, and libvirt-sock cannot be found.
Conclusion and Solution
- Restart the libvirtd service.
service libvirtd restart
- View the libvirt library version and other related information.
virsh version
Compiled against library: libvirt 4.7.0 Using library: libvirt 4.7.0 Using API: QEMU 4.7.0 Running hypervisor: QEMU 4.0.0
Parent topic: KVM Virtualization