#991776 virt-viewer: Cannot connect to display with IPv6 literal as host

Package:
virt-viewer
Source:
virt-viewer
Description:
Displaying the graphical console of a virtual machine
Submitter:
Kevin Otte
Date:
2025-02-17 17:36:08 UTC
Severity:
important
Tags:
#991776#5
Date:
2021-08-01 15:32:23 UTC
From:
To:
Dear Maintainer,

When attempting to connect to a remote display, and socat is present on the
remote system, I am unable to connect:

-
kjotte@mystic:~$ virt-viewer -vv -c qemu+ssh://agamemnon.home.nivex.net/system icarus
Opening connection to libvirt with URI qemu+ssh://agamemnon.home.nivex.net/system
Guest icarus is running, determining display
Guest icarus has a spice display
Opening indirect TCP connection to display at ::1:5901
Setting up SSH tunnel via agamemnon.home.nivex.net
2021/08/01 11:22:00 socat[54337] E TCP: wrong number of parameters (4 instead of 2)

(virt-viewer:159986): GSpice-WARNING **: 11:22:00.585: incomplete link header (0/16)
-

This is likely because the IPv6 literal "::1" is being passed directly to socat
without being wrapped in brackets (eg: [::1]).

The problem does not occur if socat is not present on the remote system as it
falls back to netcat.

#991776#10
Date:
2021-12-19 22:21:30 UTC
From:
To:
Issue filed upstream and fix merged:
https://gitlab.com/virt-viewer/virt-viewer/-/issues/66

Should show up in a future release.