如何将Linux(主机)中的服务器与Qemu guest Linux(usper)中的客户端连接

发布于 2025-01-25 19:40:14 字数 471 浏览 3 评论 0原文

我想通过TCP套接字A Server 应用程序在主机中运行的应用程序在QEMU Guest中运行的客户端在主机中运行。 我使用端口 5104 用于服务器中的套接字。 我启动服务器

然后,我发现我无法启动QEMU,将端口作为访客客户端的输入点,如这样:

qemu-system-arm ... -net user,hostfwd=tcp:127.0.0.1:5104-:5104

给出错误“无法设置主机转发规则...”

我猜QEMU也像服务器一样的作用然后,端口已经由先前启动的服务器采用,然后无法执行此操作。

哪个是正确的语法?文档讨论了该选项 Guestfwd ,但我尝试了所有可能性,但找不到解决方案。应该做到这一点。

有建议吗?

I want to connect via TCP socket a server app running in the host with a client running in the QEmu guest.
I use port 5104 for the socket in the server.
I start the server.

Then I found that I can not launch the QEmu giving that port as the input point for the client in the guest, like this:

qemu-system-arm ... -net user,hostfwd=tcp:127.0.0.1:5104-:5104

Gives the error "Could not setup host forwarding rule ..."

I guess that qemu acts like a server also and then the port is already taken by the server previously launched and then is not possible to do it.

Which is the correct syntax? The documentation talks about the option guestfwd but I tried all the possibilities and I couldn't found the solution. It should be way to do it.

Any suggestion?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文