Hide Forgot
Description of problem: virsh connect failed if specify "unix_sock_dir" in libvirtd configuration file Version-Release number of selected component (if applicable): libvirt-0.9.3-2.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.edit /etc/libvirt/libvirtd.conf unix_sock_dir = "/var/run/tmp/libvirt" #mkdir -p /var/run/tmp/libvirt 2.service libvirtd restart 3.virsh -c qemu:///system or virsh list error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused error: failed to connect to the hypervisor Actual results: virsh connect failed Expected results: virsh connect successfully Additional info:
You changed the libvirtd socket, but didn't tell virsh how to find the new location. virsh -c qemu:///system?socket=/var/run/tmp/libvirt
Closing as not a bug.
(In reply to comment #1) > You changed the libvirtd socket, but didn't tell virsh how to find the new > location. > > virsh -c qemu:///system?socket=/var/run/tmp/libvirt Hi, Daniel In this situation some Upper application maybe have some problems like virt-manager (GUI), we can not start-up it via desktop icon (you can start-up it with virt-manger -c with socket in command line), if the socket is changed . I think this is a RFE bug at least, virsh should read the libvirt config file to get the latest socket location as the "default" socket location argument in "virsh -c" rather than input it every time in command line. Wenlong
virsh can't read the config file because it might not even be on the same machine, and if running non-root it won't have sufficient privileges. Changing the socket path is something you should never do in normal circumstances, so I don't see this as an issue at all.