开发者

Talk to VM through host operating system

I have here a Windows distribution server that runs an ANT task to build enterprise software. What I need to do is to have the ANT task copy and run a VM image (Linux), and then...talk to that Linux VM through the host operating system (through the ant task itself). We need to be able to send files and/or commands to it.

Is there a practical way to go about thi开发者_运维百科s? I know that we already have a way to send commands to VMs that are also running Windows (so windows-windows interaction) -- but is there a way to do a windows-linux interaction?


I've implemented the thing you wanted. Of course, for my own purposes, and then just found this question by googling on keywords "vmware" and "ant".

https://github.com/zhuravlik/ant-vix-tasks

This is the taskset for Ant to manage VMWare VMs. It works via VIX API, so Linux guests should be supported by it.

I did not test it with VMWare Server, though. Only with Workstation. But the API is common, so it should work.


Using ssh is probably the simplest. There is an ant task for that. Scp task is also there to copy files


It will depend on what you need to do, but:

  • The Linux system could expose an SSH server, and the host can do just about anything it needs to via SSH.
  • The Linux system could expose a web service that the host consumes.
  • The Linux system could expose a Samba share which the host then connects to and reads/writes from (if all you need to do is deal with some files, but that seems unlikely).

There are probably dozens of options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜