[Spice-devel] Problem using Spice in combination with SSH tunnel

Victor Toso victortoso at redhat.com
Mon Mar 6 08:38:49 UTC 2023


Hi Thomas,

On Thu, Mar 02, 2023 at 01:32:10PM +0000, Thomas Semmler wrote:
> Hello everyone,
> 
> I encountered a problem I can't make heads or tails of. I have
> a server running KVM/libvirt as a virtualization host. The
> virtual machines on this server are setup to use the spice
> protocol. When using the servers desktop environement I can use
> virt-manager or remmina to connect to the virtual machine's
> spice server(s) without a problem. The spice server is
> listening on localhost only. 
> 
> I wanted to connect from a remote client to the server via a
> ssh tunnel and then connect to spice over the tunnel. I tried
> with both virt- manager (which has an integrates ssh tunnel
> option) and remmina (which also has an integrated setting to
> create a tunnel) on the client to establish a connection, but
> it is not working as intended.
> 
> While I can see a video output of the desktop, the video output
> does not resize to the window width and hight and none of the
> input methods are working. I can not send keypresses or mouse
> movements the the virtual machine on the server.

I've never tested this so I'm not sure how it should work.

Every SPICE channel is a TCP socket that is established after the
initial handshake. IIRC, the first connection is kept for the
graphics (which you can use) but the connection of others seemed
to fail over your ssh tunnel. I'd guess the proxying over ssh
tunnel needs more tweaks.

I see that oVirt has some how-to with this, perhaps that can be
helpful to you:

https://ovirt-infra-docs.readthedocs.io/en/latest/Phoenix_Lab/Ssh_Spice_Tunnel/index.html

> I started virt-manager on the client with the debug option
> (--dubug) and attached the resulting output, containing a few
> spice errors, to this email.
> 
> In case you require more information please let me know.
> 
> Thanks,
> Thomas

Cheers,
Victor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20230306/7acf84b6/attachment.sig>


More information about the Spice-devel mailing list