Bug 1411765 - virt-viewer cannot connect to remote guest which is running on rhel6 and the listen type is network
Summary: virt-viewer cannot connect to remote guest which is running on rhel6 and the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Grunt
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1410671
TreeView+ depends on / blocked
 
Reported: 2017-01-10 12:36 UTC by Xiaodai Wang
Modified: 2017-08-01 15:06 UTC (History)
8 users (show)

Fixed In Version: virt-viewer-5.0-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 15:06:41 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1849 0 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2017-08-01 17:49:46 UTC

Description Xiaodai Wang 2017-01-10 12:36:36 UTC
Description of problem:
virt-viewer cannot connect to remote guest which is running on rhel6 and the listen type is network

Version-Release number of selected component (if applicable):
virt-viewer-2.0-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a running guest on a rhel6 host and the guest's listen type is network.
    <graphics type='spice' port='5901' autoport='yes'>
      <listen type='network' address='192.168.122.1' network='default'/>
    </graphics>

2. Make sure the rhel7 host and the guest of rhel6 are in same network segment, that's mean from the remote rhel7 host, you can ping 192.168.122.1 successfully.
3. Then open the guest by virt-viewer on remtoe rhel7 OS.
# virt-viewer -c qemu+ssh://192.168.122.1/system rhel6.7

Actual results:
# virt-viewer -c qemu+ssh://192.168.122.1/system rhel6.7
The authenticity of host '192.168.122.1 (192.168.122.1)' can't be established.
RSA key fingerprint is ab:e1:d4:04:b8:d6:25:25:d8:41:88:6c:ac:25:52:cd.
Are you sure you want to continue connecting (yes/no)? yes
root@192.168.122.1's password: 
[root@localhost ~]# virt-viewer -c qemu+ssh://192.168.122.1/system rhel6.7 --debug
(virt-viewer:4493): virt-viewer-DEBUG: connecting ...
(virt-viewer:4493): virt-viewer-DEBUG: Opening connection to libvirt with URI qemu+ssh://192.168.122.1/system
(virt-viewer:4493): virt-viewer-DEBUG: Add handle 8 1 0x1d680a0
root@192.168.122.1's password: 
(virt-viewer:4493): virt-viewer-DEBUG: initial connect
(virt-viewer:4493): virt-viewer-DEBUG: notebook show status 0x1c42280
(virt-viewer:4493): virt-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to 52300fbc-c881-e458-3f42-033747b1999e
(virt-viewer:4493): virt-viewer-DEBUG: No guest-specific fullscreen config, using fallback
(virt-viewer:4493): virt-viewer-DEBUG: notebook show status 0x1c42280
(virt-viewer:4493): virt-viewer-DEBUG: Guest rhel6.7 is running, determining display
(virt-viewer:4493): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0
(virt-viewer:4493): virt-viewer-DEBUG: Guest rhel6.7 has a spice display
(virt-viewer:4493): virt-viewer-DEBUG: Using direct libvirt connection
(virt-viewer:4493): virt-viewer-DEBUG: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD
(virt-viewer:4493): virt-viewer-DEBUG: After open connection callback fd=-1
(virt-viewer:4493): virt-viewer-DEBUG: Remove handle 1 8
(virt-viewer:4493): virt-viewer-DEBUG: Disposing window 0x1dd4110

(virt-viewer:4493): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0

Expected results:
virt-viewer should connect to the guest which is running on rhel6 and the listen type is network successfully.

Additional info:

Comment 1 Xiaodai Wang 2017-03-09 09:14:17 UTC
"socket" has same problem as "listen".

    <graphics type='vnc' socket='/var/lib/libvirt/qemu/domain-5-rhel7.2/vnc.sock'>
      <listen type='socket' socket='/var/lib/libvirt/qemu/domain-5-rhel7.2/vnc.sock'/>
    </graphics>


    <graphics type='spice'>
      <listen type='socket' socket='/var/lib/libvirt/qemu/domain-1-fedora25-workstation/spice.sock'/>
      <image compression='off'/>
    </graphics>

Comment 2 Pavel Grunt 2017-04-07 09:23:16 UTC
It is partially blocking the bug 1335832

Comment 5 Xiaodai Wang 2017-05-11 06:08:32 UTC
I verified below two scenarios with virt-viewer-5.0-3.el7.x86_64.

1)
    <graphics type='spice'>
      <listen type='socket' socket='/var/lib/libvirt/qemu/domain-4-rhel7.3-1005/spice.sock'/>
      <image compression='off'/>
    </graphics>


# virt-viewer rhel7.3-1005 --debug
(virt-viewer:23789): virt-viewer-DEBUG: connecting ...
(virt-viewer:23789): virt-viewer-DEBUG: Opening connection to libvirt with URI <null>
(virt-viewer:23789): virt-viewer-DEBUG: initial connect
(virt-viewer:23789): virt-viewer-DEBUG: notebook show status 0x561e489ba2c0
(virt-viewer:23789): virt-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to e8fc0fd9-8415-44b6-9ef9-cd9a8d5b05f2
(virt-viewer:23789): virt-viewer-DEBUG: notebook show status 0x561e489ba2c0
(virt-viewer:23789): virt-viewer-DEBUG: Guest rhel7.3-1005 is running, determining display
(virt-viewer:23789): virt-viewer-DEBUG: Set connect info: (null),(null),-1,-1,(null),(null),(null),0
(virt-viewer:23789): virt-viewer-DEBUG: Guest rhel7.3-1005 has a spice display
(virt-viewer:23789): virt-viewer-DEBUG: Guest graphics address is /var/lib/libvirt/qemu/domain-4-rhel7.3-1005/spice.sock
(virt-viewer:23789): virt-viewer-DEBUG: Guest graphics listen '' is NULL or a wildcard, replacing with 'localhost'
(virt-viewer:23789): virt-viewer-DEBUG: Set connect info: localhost,localhost,-1,-1,(null),/var/lib/libvirt/qemu/domain-4-rhel7.3-1005/spice.sock,(null),0
(virt-viewer:23789): virt-viewer-DEBUG: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD
(virt-viewer:23789): virt-viewer-DEBUG: After open connection callback fd=-1
(virt-viewer:23789): virt-viewer-DEBUG: Opening direct UNIX connection to display at /var/lib/libvirt/qemu/domain-4-rhel7.3-1005/spice.sock


2)
    <graphics type='spice' port='5900' autoport='yes'>
      <listen type='network' address='192.168.122.1' network='default'/>
    </graphics>

(virt-viewer:15436): virt-viewer-DEBUG: Guest rhel6.9 has a spice display
(virt-viewer:15436): virt-viewer-DEBUG: Guest graphics address is 192.168.122.1:5900
(virt-viewer:15436): virt-viewer-DEBUG: Set connect info: 192.168.122.1,192.168.122.1,5900,-1,ssh,(null),root,0
(virt-viewer:15436): virt-viewer-DEBUG: Error operation forbidden: read only access prevents virDomainOpenGraphicsFD
(virt-viewer:15436): virt-viewer-DEBUG: After open connection callback fd=-1
(virt-viewer:15436): virt-viewer-DEBUG: Opening indirect TCP connection to display at 192.168.122.1:5900
(virt-viewer:15436): virt-viewer-DEBUG: Setting up SSH tunnel via root@192.168.122.1


virt-viewer can connect to the guests successfully.

So move the bug to VERIFIED.

Comment 6 errata-xmlrpc 2017-08-01 15:06:41 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.

https://access.redhat.com/errata/RHBA-2017:1849


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