0

Now I am using VMware is based on ubuntu (named OS-1).

When I operate the another VMware (OS-2 is also based on ubuntu) in OS-1,

I would like to send command (OS-1) for executing specific script file from OS-1 to OS-2 and also receive the stdout from OS-2.

Is it possible?

OS-1 :

Receiving the specific command for executing the test.py from webserver.

Sending the command such as "python test.py" to OS-2.

OS-2 :

Receiving the command from OS-1.

Returning the stdout result to OS-1 such as "test script"

*** WebServer(in OS-1) ---> OS1 ---> OS2

test.py
print("===========");
print("test script");

1 Answers1

0

The most obvious solution is to create internal network between those two virtual machines.

When those machines are connected it would be relatively simple to execute command, i.e you may use ssh (hint https://stackoverflow.com/a/3586168/3188346).

It is worth to note that this solution will work if you decide to use other VMs provider or dedicated servers.

Community
  • 1
  • 1
luantkow
  • 2,809
  • 20
  • 14