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.
The bug can also be reproduced on rhel7,so cloned it.
+++ This bug was initially created as a clone of Bug #1108523 +++
Description
virt-viewer -c qemu+tcp will open local guest when remote VM is only listening on 127.0.0.1
Version:
virt-viewer-0.6.0-5.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.On host A,set tcp server environment.
1.1 Edit /etc/sysconfig/libvirtd
LIBVIRTD_ARGS="--listen"
1.2 Edit /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp=1
auth_tcp="sasl"
1.3 Add a user named "fred", and setting his password as "redhat"
# saslpasswd2 -a libvirt fred
Password: xxxxxx
Again (for verification): xxxxxx
1.4 Restart libvirtd service and set iptables.
# service libvirtd restart
#iptables -F
2.Prepare a spice guest rhel6.5 on host A,set it's listen address as 127.0.0.1,the xml shows as below:
# virsh dumpxml rhel6.5
<graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
3. On host B,prepare a spice guest winxp,set it's listen address as 127.0.0.1,the xml shows as below:
# virsh dumpxml winxp
<graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
4.On host B,use virt-viewer to launch remote guest rhel6.5 on host A,guest winxp on host B will be opened instead of rhel6.5 on host A.
# virt-viewer -c qemu+tcp://10.66.7.56/system rhel6.5
5.Repeat step 4 to connect remote vm through ssh,guest on host A can be opened successfully.
# virt-viewer -c qemu+ssh://10.66.7.56/system rhel6.5
Actual results:
As descripiton.
Expected results:
Guest booted on local host should not effect remote vm launched by virt-viewer.
Additional info:
1.If no guest booted on host B,step 4 will fail with error:Unable to connect to the graphic server 127.0.0.1:5900
2.The bug can be reproduced for vnc guest.
3.If guest on host A set listen address as '0.0.0.0',step 4 will connect to remote vm successfully.
Comment 2Christophe Fergeau
2014-08-06 08:47:05 UTC
*** Bug 1084393 has been marked as a duplicate of this bug. ***
Comment 3Christophe Fergeau
2014-09-12 15:33:57 UTC
Test with:
virt-viewer-0.6.0-5.el7.x86_64
Steps:
Same with description.
In step 2, change the listen address from 127.0.0.1 to 0
# virsh dumpxml $vm
<graphics type='spice' port='5900' autoport='yes' listen='0'>
<listen type='address' address='0'/>
</graphics>
Result:
Step4, virt-viewer will open the guest on host B.
It should open the guest on host A.
Comment 5Christophe Fergeau
2014-09-17 13:24:33 UTC
If I try what you describe with listen='0', I get an error message that this host is unknown. If I use 0.0.0.0, things work as expected.
(In reply to Christophe Fergeau from comment #5)
> If I try what you describe with listen='0', I get an error message that this
> host is unknown. If I use 0.0.0.0, things work as expected.
I think you get the same problem with this one:
https://bugzilla.redhat.com/show_bug.cgi?id=1143907
You can downgrade glib2 and retest it.
Comment 7Christophe Fergeau
2014-09-18 09:24:02 UTC
What matters is what happens with a glib as close as possible to the one which will be released with 7.1, so I'd tend to stick with the latest one.
0 and 0.0.0.0 should be the same if I'm not mistaken, so if glib is fixed, we should get the same behaviour as with 0.0.0.0, which was working as I expect in my tests.
I can reproduce with:
virt-viewer-0.6.0-4.el7.x86_64.rpm
Test with virt-viewer-0.6.0-5.el7.x86_64.rpm and virt-viewer-0.6.0-6.el7.x86_64.rpm.
Steps are same with description.
Result:
If listen address is "127.0.0.1", cannot the guest with error:
Guest is not reachable
If listen address is "0.0.0.0", can connect the guest
If listen address is "0", cannot the guest with error:
fail to connect Error resolving '0': Name or service not known
As the result and comment 7, move to VERIFIED
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-0295.html