vmware:2端口之间的虚拟端口串口

时间:2011-08-29 14:52:13

标签: linux serial-port debian vmware vmware-player

我在Windows 7上。
我想通过串口连接2个VM(ware)Debian。

首先,我正在尝试创建“读者”VM 我试着像这样添加一个串口:
- 名称:/ dev / ttyS1
- 这个结束是客户 - 另一端是虚拟机。

但我的程序无法打开/ dev / ttyS1串口(程序通过实际的硬件串口成功)。

怎么了?

2 个答案:

答案 0 :(得分:0)

计算机上有两个物理COM端口吗?将2个虚拟机映射到这些端口,并使用空调制解调器连接端口。

我能想到的另一件事是通过主机管道连接两个VM端口,但我从未尝试过这样做。

答案 1 :(得分:0)

You would need some sort of a proxy.
I did this with KVM a while ago and how it worked was like this:

serial -> socket (guest #1)
serial -> socket (guest #2)
python script connects to both sockets and acts as a proxy so to speak. When data comes from s1, it gets written onto s2 and vice versa. Used that for kernel debugging and it's slow but functional.

You could do the same on Windows with pipes