Bug 721322 - virsh connect failed if specify "unix_sock_dir" in libvirtd configuration file
Summary: virsh connect failed if specify "unix_sock_dir" in libvirtd configuration file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-14 09:56 UTC by Huang Wenlong
Modified: 2013-10-20 21:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-14 19:15:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Huang Wenlong 2011-07-14 09:56:52 UTC
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:

Comment 1 Daniel Berrangé 2011-07-14 10:17:47 UTC
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

Comment 2 Dave Allan 2011-07-14 19:15:42 UTC
Closing as not a bug.

Comment 3 Huang Wenlong 2011-07-15 03:13:39 UTC
(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

Comment 4 Daniel Berrangé 2011-07-15 09:59:24 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.