Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 721322

Summary: virsh connect failed if specify "unix_sock_dir" in libvirtd configuration file
Product: Red Hat Enterprise Linux 6 Reporter: Huang Wenlong <whuang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.2CC: berrange, cwei, dallan, dyuan, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-14 19:15:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.