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 730911 - 'virt-viewer --direct --connect' fails to connect remote vms.
Summary: 'virt-viewer --direct --connect' fails to connect remote vms.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-08-16 08:18 UTC by Huming Jiang
Modified: 2011-12-06 15:07 UTC (History)
5 users (show)

Fixed In Version: virt-viewer-0.4.1-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 15:07:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1614 0 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2011-12-06 00:51:05 UTC

Description Huming Jiang 2011-08-16 08:18:02 UTC
Description of problem:
If you use 'virt-viewer --direct --connect' with an remote IP address to connect a vm, virt-viewer will connect to the graphic server 0.0.0.0:5900, and could not connect the remote vm you have selected.

Version-Release number of selected component (if applicable):
virt-viewer-0.4.1-3.el6.x86_64

How reproducible:
Always

Steps to Reproduce:

1.Make sure your local host has no running vm.
  #virt-viewer --direct --connect=qemu+ssh://10.66.3.130/system rh

  There will be an error pop-up:"Unable to connect to the graphic server 0.0.0.0:5900"

2.If there is an vm running on your local host, 
  #virsh dumpmxl rh6-copy-clone
...
    <graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
...
  #virt-viewer --direct --connect=qemu+ssh://10.66.3.130/system rh
  Then the vm 'rh6-copy-clone' on the local host will be opened.
  
Actual results:
See the description in the 'Steps to Reproduce'.

Expected results:
Virt-viewer should open the remote vm.

Additional info:

Comment 2 Daniel Berrangé 2011-09-19 11:13:02 UTC
This regression is caused by the following upstream patch

commit 6c477650ca3497eb56fa273a421f72d4d8f9aca1
Author: Jiri Denemark <Jiri.Denemark>
Date:   Mon May 23 12:15:05 2011 +0100

    Add support for listen attribute
    
    Virt-viewer now parses listen attribute from graphics element to be able
    to connect to domains configured with explicit listen address:
    
        <graphics type='vnc' port='-1' autoport='yes' listen='123.45.67.89'/>


The patch is fine in the case where the XML gives an explicit address, but for a wildcard address like 0.0.0.0 it clearly does not work.

In the latter case we'll need to fallback to use the hostname from the libvirt URI as with previous releases.

Comment 4 Daniel Berrangé 2011-09-19 16:49:06 UTC
Note for testing, there are three guest configurations that should be tested

 1. No listen attribute

      <graphics type='vnc' port='-1' autoport='yes'/>

 2. Specific listen attribute

      <graphics type='vnc' port='-1' autoport='yes' listen='123.45.67.89'/>

 3. Wildcard listen attribute

      <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>


These need to be tested with two command lines:

 1. Tunnelled over ssh:

  virt-viewer -c qemu+ssh://root.and.domain/system vm-name

 2. Direct connection

  virt-viewer --direct -c qemu+ssh://root.and.domain/system vm-name

Comment 6 Daisy Wu 2011-09-21 06:40:15 UTC
The issue 'virt-viewer --direct --connect' fails to connect remote vms' can reproduce on version:
virt-viewer-0.4.1-3.el6.x86_64

Verified on version:
virt-viewer-0.4.1-5.el6.x86_64

Environment:
kernel-2.6.32-191.el6.x86_64
libvirt-0.9.4-11.el6
python-virtinst-0.600.0-3.el6
qemu-kvm-0.12.1.2-2.185.el6
virt-manager-0.9.0-6.el6
virt-viewer-0.4.1-5.el6.x86_64

Prepared two host and a remote vm:
local host
remote host 
remote vm named xpi386

Detail Steps:
1.Make sure local host has no running vm.
logon the local host:
#virt-viewer --direct --connect=qemu+ssh://remotehostIP/system xpi386

There will be an error pop-up:"Unable to connect to the graphic server
0.0.0.0:5900"

2.If there is an vm running on local host,
#virsh dumpmxl win2008x64
...
<graphics type='vnc' port='5900' autoport='yes'/>
...
#virt-viewer --direct --connect=qemu+ssh://remotehostIP/system xpi386
Then the vm 'win2008x64' on the local host will be opened.

3. No listen attribute:
#virsh dumpmxl xpi386
<graphics type='vnc' port='-1' autoport='yes'/>
logon the local host:
a. #virt-viewer -c qemu+ssh://root@remotehostIP/system xpi386
The remote vm 'xpi386' opened successfully through virt-viewer.
b. #virt-viewer --direct -c qemu+ssh://root@remotehostIP/system xpi386
The remote vm 'xpi386' can not open,error pop up: "Unable to connect to the graphic server localhost:5900"
logon the remote host:
#virt-viewer --direct -c qemu+ssh://root@remotehostIP/system xpi386
The remote vm 'xpi386' opened successfully through virt-viewer.

4. Specific listen attribute:
#virsh dumpmxl xpi386
<graphics type='vnc' port='-1' autoport='yes' listen='10.66.6.23'/>
<listen type='address' address='10.66.6.23'/>

logon the local host:
#virt-viewer -c qemu+ssh://root@remotehostIP/system xpi386
#virt-viewer --direct -c qemu+ssh://root@remotehostIP/system xpi386
The remote vm 'xpi386' opened successfully through virt-viewer.

5. Wildcard listen attribute:
#virsh dumpmxl xpi386
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>

logon on the local host:
#virt-viewer -c qemu+ssh://root@remotehostIP/system xpi386
#virt-viewer --direct -c qemu+ssh://root@remotehostIP/system xpi386
The remote vm 'xpi386' opened successfully through virt-viewer.

Comment 7 errata-xmlrpc 2011-12-06 15:07:23 UTC
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.

http://rhn.redhat.com/errata/RHEA-2011-1614.html


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