简体   繁体   English

与没有网络的VMWare来宾系统通信

[英]Communication with a VMWare guest system without network

does anybody know an API that allows to send and receive data to/from a VMWare guest system without using an IP network? 有没有人知道一个API,允许在不使用IP网络的情况下向/从VMWare客户系统发送和接收数据?

I have to communicate with a program inside a VMWare guest but the guest is not allowed to have an IP network. 我必须与VMWare客户机内的程序通信,但不允许guest虚拟机拥有IP网络。 As file transfers into the VM via Drag&Drop are possible I assume that there is an API - I just need to know if this API is open to 3rd party programmers or if it is only available fro the VMWare Player itself. 由于文件通过Drag&Drop传输到VM,我可以假设有一个API - 我只需要知道这个API是否对第三方程序员开放,或者它是否只能从VMWare Player本身获得。

Sure, you can access those with the VIX API . 当然,您可以使用VIX API访问这些。

More specificely, the Drag&Drop is implemented with following functions: 更具体地说,拖放是通过以下功能实现的:

Basically all VixVM functions may be relevant for your tasks. 基本上所有VixVM功能都可能与您的任务相关。 They are all documented in the official VIX API reference . 它们都记录在官方VIX API参考中

It turns out that there is a solution for my problem: 事实证明,我的问题有一个解决方案:

Virtual Serial Port 虚拟串口

VM-Ware allows to create virtual serial ports for the guest that are connected on host side to a named pipe. VM-Ware允许为主机端连接到命名管道的guest虚拟机创建虚拟串行端口。

I therefore created two helper programs, one on host side which listens on a TCP port and a specific named pipe and transfers all the incoming data between them. 因此,我创建了两个辅助程序,一个在主机端侦听TCP端口和特定命名管道,并在它们之间传输所有传入数据。

A second helper program runs in the guest VM and does the same between the serial port and the TCP port I want to access. 第二个帮助程序在来宾VM中运行,并在串行端口和我想要访问的TCP端口之间执行相同的操作。

The only draw-back is that the serial speed is limited to 128kBit/sec. 唯一的缺点是串行速度限制在128kBit / sec。 May be that can be increased by using multiple virtual serial ports... 可以通过使用多个虚拟串口来增加...

Virtual Machine Communication Interface (VMCI) 虚拟机通信接口(VMCI)

Using VMCI there is an API for creating a shared memory region that is accessible from both hast and guest system. 使用VMCI有一个API,用于创建可从hast和guest系统访问的共享内存区域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM