1

Is is possible to do IPC between two virtual machine on top of same host using XEN ? Can one program in one VM send a signal to other program in other VM ? both VM are on top of same physical host.

Host os Fedora , guest OS also fedora, Xen version - 3.6.11-4.fc16.x86_64

Any suggestion to communication between two program present in two different VM on top of same physical host?

Thanks in advance .

bholanath
  • 1,699
  • 1
  • 22
  • 40

1 Answers1

0

One possible reach is:

  • Create an internal network between sender guest and receiver guest machine isolated from host network.
  • Create a signal server using RPC. The server will be installed on the machine you want to send the signals. For sending signals you can make the server execute the function kill(). If you don't know how to RPC, you can have a look here.
  • Implement the client using RPC.
  • Install the client in the PC you want to send signals from.
  • Create a infinite-loop process you can send signals to.
  • Try send a signal remotely to check connections are working.
SonicARG
  • 499
  • 9
  • 14
  • thank you SonicARG. I will try and let you know. As per my knowledge , kill is used to send signal , and that too in a single program where we can create multiple child process and send signal to each other. As per my understanding, even we can't send signal to two different program in a single host using kill. Am I right? – bholanath Oct 19 '13 at 16:43
  • If you try to syncronize child processes (`fork`ed processes), then `kill()` is not the appropiate solution; in that case, you'll have to use semaphores in shared memory areas (have a look [here](http://stackoverflow.com/questions/6847973/do-forked-child-processes-use-the-same-semaphore)). – SonicARG Oct 19 '13 at 19:06
  • About the limitation of `kill()`, the scope of application depends on the _pid_ value you specify to the function: - `> 0`: Kill the process with PID value - `== 0`: Kill the process group of the application - `==-1`: Kill __all__ processes - `< -1`: Kill process group with absoute value of specified (`-1093 -> group 1093`) – SonicARG Oct 19 '13 at 19:11
  • Even more, you can send many `kill()` to any processes you want to (is like a ordinary syscall), but be aware not to signal yourself beacuse it'd mean you're killing yourself! – SonicARG Oct 19 '13 at 19:15