vmware:2个虚拟机之间的虚拟端口串行

发布于 2024-12-02 02:27:23 字数 215 浏览 2 评论 0原文

我使用的是 Windows 7。
我想通过串口连接2个VM(ware) Debian。

首先,我尝试创建“阅读器”虚拟机。
我尝试添加这样的串行端口:
- 名称:/dev/ttyS1
- 此端是客户端。
- 另一端是虚拟机。

但是我的程序无法打开/dev/ttyS1串行端口(程序成功使用实际的硬件串行端口)。

怎么了?

I'm on Windows 7.
I would like to connect 2 VM(ware) Debian by serial port.

First I'm trying to create the "reader" VM.
I tried to add a serial port like this :
- name : /dev/ttyS1
- This end is is the client.
- The other end is a virtual machine.

But my program cannot open the /dev/ttyS1 serial port (the programs succeed with a actual hardware serial port).

What's wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凑诗 2024-12-09 02:27:23

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

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

Do you have two physical COM ports on the computer? Map 2 virtual machines to these ports, and connect ports with null modem.

Another thing I can think about is connecting two VM ports through host pipe, but I have never tried to do this.

守不住的情 2024-12-09 02:27:23
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
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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文