Bug 59747 - RFE: serial port forwarding
Summary: RFE: serial port forwarding
Status: RESOLVED MOVED
Alias: None
Product: Spice
Classification: Unclassified
Component: virt-viewer (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 08:04 UTC by Zhou Zheng Sheng
Modified: 2018-06-05 14:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Zhou Zheng Sheng 2013-01-23 08:04:29 UTC
It will be very useful if we can do the following with the virtual machine serial port.

1) client local peripheral serial device <=> VM serial port
This means Spice client to forward data read from /dev/ttySX to the VM serial port and vice versa. This will enable us to attach a serial peripheral device to the virtual machine serial port.

2) client local process <=> VM serial port
This means Spice client to forward data read from an IPC mechanism with a local process to the VM serial port. This will enable us to record the data steam from VM serial port, run a script against the VM serial port or do other things like forwarding the data to socat. If the the guest start a agetty on the remote serial port, we can get access to the guest console from the client.

3) VM1 serial port <=> VM2 serial port
In the above 2), if the client local process is socat, then we can connect two VMs' serial ports using a pair of back-to-back Spice client like as follow.
VM1 serial port <=> Spice client1 <=> client local process(socat) <=> Spice client2 <=> VM2 serial port
This enables VMs communicate with each other via serial port just like they are connected with serial cable.

I had a look at QEMU and Spice server code, and find there is already support for spicevmc and char device VDI and there is a port channel concept at the client side. I think adding a channel at the client side to just forward serial port data stream may not be hard. If the Spice client can export an Unix socket at the client side and forward the data to the guest console. Then we can use socat to forward the data to /dev/ttySX which is 1) or to other process which is 2). Can we do this?
Comment 1 Marc-Andre Lureau 2014-11-10 11:16:51 UTC
See "SPICE for text mode serial consoles" thread in spice ML
Comment 2 Christophe Fergeau 2015-09-03 09:13:11 UTC
(In reply to Marc-Andre Lureau from comment #1)
> See "SPICE for text mode serial consoles" thread in spice ML

Link to the thread is http://lists.freedesktop.org/archives/spice-devel/2014-January/015919.html
The 'port' feature is integrated in qemu/libvirt and can be tested with spicy.
Comment 3 GitLab Migration User 2018-06-05 14:19:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice-gtk/issues/49.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.