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 999323

Summary: virsh ignores --connect switch
Product: Red Hat Enterprise Linux 7 Reporter: Gerd Hoffmann <kraxel>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: acathrow, ajia, dyuan, hliu, mkletzan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:46:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gerd Hoffmann 2013-08-21 07:30:39 UTC
Description of problem:
$subject

Version-Release number of selected component (if applicable):
libvirt-client-1.1.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. virsh -c lxc:/// list --all

Actual results:
virsh connects to qemu:///system

Expected results:
virsh connects to lxc:///

Additional info:

nilsson kraxel ~# echo $VIRSH_DEFAULT_CONNECT_URI
qemu:///system

Comment 2 Martin Kletzander 2013-08-21 08:44:04 UTC
Broken by commit abfff210 (mine), vshInit needs to be split to two functions.

Comment 3 Martin Kletzander 2013-08-21 09:57:45 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-August/msg01023.html

Comment 4 Martin Kletzander 2013-08-22 07:57:24 UTC
Fixed upstream with commit v1.1.1-197-ga0b6a36:

commit a0b6a36f9456dae895f50d344fd2d38be1167c58
Author: Martin Kletzander <mkletzan>
Date:   Wed Aug 21 11:02:42 2013 +0200

    Fix URI connect precedence

Comment 6 Hao Liu 2013-09-02 06:37:09 UTC
Verified this fix.

Packages:
libvirt-client-1.1.1-3.el7.x86_64

Verify steps:
1. Set environment variable to qemu.
# export VIRSH_DEFAULT_CONNECT_URI=qemu:///system

2. Check connected URI.
# virsh -c lxc:/// uri

Result:
lxc:///

Comment 7 Ludek Smid 2014-06-13 09:46:56 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.