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 1441127 - Virt-manager can't connect to guest spice unix socket.
Summary: Virt-manager can't connect to guest spice unix socket.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-11 09:35 UTC by Fangge Jin
Modified: 2023-02-16 11:20 UTC (History)
7 users (show)

Fixed In Version: virt-manager-1.4.3-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 11:40:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0726 0 None None None 2018-04-10 11:42:12 UTC

Description Fangge Jin 2017-04-11 09:35:12 UTC
Description of problem:
Virt-manager can't connect to guest spice unix socket.

Version-Release number of selected component:
virt-manager-1.4.1-1.el7.noarch
libvirt-3.2.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
0. Set spice listen type='socket':
  # virsh edit rhel7.4
...
    <graphics type='spice'>
      <listen type='socket'/>
    </graphics>
...

1. Start guest
  # virsh start rhel7.4

2. Launch virt-manager on the same host and open guest window.
  # virt-manager

3. Launch virt-manager on a remote host and try to open guest window.

4.Check virt-manager.log
  # cat /root/.cache/virt-manager/virt-manager.log

Actual results:
1) virt-manager can connect to guest graphic on the same host, but I found "gsocket=None" in the log:

[Tue, 11 Apr 2017 16:42:05 virt-manager 10055] DEBUG (console:718) Starting connect process for proto=spice trans= connhost=127.0.0.1 connuser= connport= gaddr=127.0.0.1 gport=None gtlsport=None gsocket=None

2) If launch virt-manager on a remote host, it will fail to open guest window and reports:

"Error connecting to graphical console:
Guest is on a remote host, but is only configured to allow local file descriptor connections."

Expected results:
virt-manager can connect to guest spice unix socket.

Comment 2 zhoujunqin 2017-04-26 11:06:29 UTC
I can also reproduce this error when i connect to a spice guest which listen type equals none on a remote connection.

package version:
virt-manager-1.4.1-2.el7.noarch
libvirt-3.2.0-3.virtcov.el7.x86_64
qemu-kvm-rhev-2.9.0-1.el7.x86_64

Steps:
Need 2 hosts: HostA and HostB.

1. Prepare a spice guest with listen type equals none on HostA.
# virsh dumpxml esx6.0-rhel6.7-x86_64 --security-info
...
    <graphics type='spice'>
      <listen type='none'/>
    </graphics>
    <video>

2. Launch virt-manager on HostB, File->Add connection->Hypervisor choosing 'QEMU/KVM'->Tick 'Connect to remote host'->Method 'SSH'->Username: root ->Hostname: $host A ->Connect.

3. Open guest console 'esx6.0-rhel6.7-x86_64' on hostA.

Result after step3:
It will fail to open guest window and reports:

"Error connecting to graphical console:
Guest is on a remote host, but is only configured to allow local file
descriptor connections."

Comment 3 Fangge Jin 2017-04-26 11:18:23 UTC
(In reply to zhoujunqin from comment #2)
> I can also reproduce this error when i connect to a spice guest which listen
> type equals none on a remote connection.
> 
When listen type=none, graphic can't be opened on remote host, this is expected

Comment 4 zhoujunqin 2017-04-26 11:27:53 UTC
(In reply to JinFangge from comment #3)
> (In reply to zhoujunqin from comment #2)
> > I can also reproduce this error when i connect to a spice guest which listen
> > type equals none on a remote connection.
> > 
> When listen type=none, graphic can't be opened on remote host, this is
> expected

Yes, fjin, thanks for pointing out.
So please ignore Comment 2, thanks.

Comment 5 Pavel Hrdina 2017-09-06 08:37:36 UTC
Upstream patch posted:

https://www.redhat.com/archives/virt-tools-list/2017-September/msg00039.html

Comment 6 Pavel Hrdina 2017-09-11 07:38:33 UTC
Upstream commits:

commit ccaef8c16a89ad4ca64b07fd5f6cc6e91de3a15e
Author: Pavel Hrdina <phrdina>
Date:   Wed Sep 6 10:14:35 2017 +0200

    graphics: set default port only for correct listen types

commit fe6c5067c0d1fea786bb5255043a19d25249b65b
Author: Pavel Hrdina <phrdina>
Date:   Wed Sep 6 10:17:43 2017 +0200

    graphics: introduce listens.{type|address|network} parameters

commit d718f1a516757606093207190de6b10a40a47d1c
Author: Pavel Hrdina <phrdina>
Date:   Wed Sep 6 10:26:33 2017 +0200

    graphics: introduce listens.socket parameter

commit f1976155cd1711f5009d38b10bcf4bd511927608
Author: Pavel Hrdina <phrdina>
Date:   Wed Sep 6 09:24:53 2017 +0200

    sshtunnels: use <listen> element to get UNIX socket for graphics

Comment 8 zhoujunqin 2017-09-26 10:27:17 UTC
I can reproduce this issue with package:
virt-install-1.4.1-7.el7.noarch
virt-manager-1.4.1-7.el7.noarch
virt-manager-common-1.4.1-7.el7.noarch

Then try to verify this bug with new build:
virt-install-1.4.3-1.el7.noarch
virt-manager-1.4.3-1.el7.noarch
virt-manager-common-1.4.3-1.el7.noarch

Steps:
Need 2 hosts: HostA and HostB.


0. Set spice listen type='socket' to guest on HostA.
# virsh edit rhel7.4
...
    <graphics type='spice'>
      <listen type='socket'/>
    </graphics>
...

1. Start guest
# virsh start rhel7.4
 
# virsh dumpxml rhel7.4
...
    <graphics type='spice'>
      <listen type='socket' socket='/var/lib/libvirt/qemu/domain-30-rhel7.4/spice.sock'/>
    </graphics>
...

2. Launch virt-manager on HostA and open guest window.
# virt-manager

3. Launch virt-manager on HostB and try to open guest window.
File->Add connection->Hypervisor choosing 'QEMU/KVM'->Tick 'Connect to remote host'->Method 'SSH'->Username: root ->Hostname: $HostA ->Connect.

4. Open guest console 'rhel7.4' on HostA.

Result:
After step2, virt-manager can open guest console on HostA.
After step4, virt-manager can also open guest console on remote HostB.

Since we can connect to SPICE graphics on remote host using SSH tunnel, move this bug from ON_QA to VERIFIED, thanks.

Comment 11 errata-xmlrpc 2018-04-10 11:40:46 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/RHEA-2018:0726

Comment 12 LunaTowne 2023-02-16 11:20:57 UTC
You can check the error log for your guest spice from the VM and see what the error is. If it's something like "Virt-manager cannot connect to guest spice unix socket", then it's likely that the port is closed or not running. You can run: sudo ifconfig | grep "lo" to get a list of all open ports. Make sure you're using virt-manager on a different host than your guest machine. If so, close all other programs and use only this command (and don't forget to replace <HTTPSERVER> by your actual hostname). Well, now I would like to visit https://casinosanalyzer.com/casino-bonuses/grandevegascasino.com website in order to read things about Grande Vegas Casino Bonus Codes online.


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