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 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
[Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (vmwindow:185) Showing VM details: <vmmDomain name=truenas id=0x614645132d00> [Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (engine:316) window counter incremented to 2 [Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (console:721) Starting connect process for proto=spice trans=ssh connhost=server1 connuser=thomas connport= gaddr=127.0.0.1 gport=5901 gtlsport=None gsocket=None [Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (sshtunnels:253) Pre-generated ssh command for ginfo: ssh -l thomas server1 sh -c 'nc -q 2>&1 | grep "requires an argument" >/dev/null;if [ $? -eq 0 ] ; then CMD="nc -q 0 127.0.0.1 5901";else CMD="nc 127.0.0.1 5901";fi;eval "$CMD";' [Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=27 for viewer [Thu, 02 Mar 2023 13:15:35 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277860 ERRFD=31 [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.DisplayChannel object at 0x61464408a540 (SpiceDisplayChannel at 0x1d0cf2ceba0)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=33 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (console:856) Viewer connected cb (virt-manager:277671): GSpice-WARNING **: 13:15:36.104: Warning no automount-inhibiting implementation available [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.CursorChannel object at 0x61465c853c80 (SpiceCursorChannel at 0x1d0d2458320)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=35 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.UsbredirChannel object at 0x61464408a840 (SpiceUsbredirChannel at 0x1d0d245a380)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=37 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.UsbredirChannel object at 0x61465c83d340 (SpiceUsbredirChannel at 0x1d0d245a690)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=39 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.RecordChannel object at 0x61465c83cec0 (SpiceRecordChannel at 0x1d0d245a9a0)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=41 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.PlaybackChannel object at 0x61465c83d600 (SpicePlaybackChannel at 0x1d0d245acb0)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=43 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (viewers:601) Requesting fd for channel: <SpiceClientGLib.InputsChannel object at 0x61465c0424c0 (SpiceInputsChannel at 0x1d0d2458620)> [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:277) Generated tunnel fd=45 for viewer [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277861 ERRFD=26 [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277862 ERRFD=32 [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277863 ERRFD=34 [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277864 ERRFD=36 (virt-manager:277671): GSpice-WARNING **: 13:15:36.828: incomplete link header (-104/16) [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277865 ERRFD=38 (virt-manager:277671): GSpice-WARNING **: 13:15:36.844: incomplete link header (-104/16) [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277866 ERRFD=39 (virt-manager:277671): GSpice-WARNING **: 13:15:36.858: incomplete link header (-104/16) [Thu, 02 Mar 2023 13:15:36 virt-manager 277671] DEBUG (sshtunnels:201) Opened tunnel PID=277867 ERRFD=40 (virt-manager:277671): GSpice-WARNING **: 13:15:36.877: incomplete link header (-104/16) (virt-manager:277671): GSpice-CRITICAL **: 13:15:39.667: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:39.846: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:40.006: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:40.173: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:40.324: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:40.471: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:40.637: spice_inputs_channel_key_press_and_release: assertion 'channel->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:41.656: spice_inputs_channel_key_press: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:41.852: spice_inputs_channel_key_press: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (vmwindow:243) Closing VM details: <vmmDomain name=truenas id=0x614645132d00> (virt-manager:277671): GSpice-CRITICAL **: 13:15:42.026: spice_inputs_channel_key_release: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed (virt-manager:277671): GSpice-CRITICAL **: 13:15:42.026: spice_inputs_channel_key_release: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277860 ERRFD=31 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277861 ERRFD=26 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277862 ERRFD=32 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277863 ERRFD=34 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277864 ERRFD=36 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277865 ERRFD=38 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277866 ERRFD=39 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (sshtunnels:154) Close tunnel PID=277867 ERRFD=40 [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (console:592) Viewer object cleaned up [Thu, 02 Mar 2023 13:15:42 virt-manager 277671] DEBUG (engine:323) window counter decremented to 1 [Thu, 02 Mar 2023 13:15:43 virt-manager 277671] DEBUG (manager:196) Closing manager [Thu, 02 Mar 2023 13:15:43 virt-manager 277671] DEBUG (engine:323) window counter decremented to 0 [Thu, 02 Mar 2023 13:15:43 virt-manager 277671] DEBUG (engine:343) No windows found, requesting app exit [Thu, 02 Mar 2023 13:15:43 virt-manager 277671] DEBUG (connection:838) conn.close() uri=qemu+ssh://thomas@server2/system