LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/forumdisplay.php?f=90)
-   -   VMs on different servers cannot communicate (http://www.linuxquestions.org/questions/showthread.php?t=4175449553)

sanaz 02-10-2013 10:31 AM

VMs on different servers cannot communicate
 
Hi all,

I have two virtual machines on different servers and I want to measure lan speed between these two VMS. I want to use iperf. The problem is that my VMs are host only and their ip address is only valid in their host. Not only for iperf, I want to know in general how can I communicate with VMs from another VM?
For e.g my first VM has ip x on server a and my second VM has ip y on server b. When I try to ping VM2 inside VM1, it assumes that it should look for y on server a. How can I say this VM is on another server b?

Any help is appreciated

acid_kewpie 02-10-2013 01:36 PM

you can't say "it's on a different server", you need to deal with these things generically with proper networking. Either you'd route it between the hosts, from one internal subnet to another (note that the two vm networks would need to be different), or my preferred option would be to use bridged networking to make the VM's reside on the same network as the two hosts, meaning all machines can communicate with all others.

sanaz 02-10-2013 04:13 PM

Thanks for reply, I did not get what you means, could you please explain? I want to know how can I provide a route between to host?
You said:
route it between the hosts, from one internal subnet to another (note that the two vm networks would need to be different)

acid_kewpie 02-10-2013 04:26 PM

well you'd need to enable ip_forward on both host boxes, and configure each host to route the destination network to the other host. Note you've not said what VM solution you're using here...

I'd *really* encourage you to use bridging instead though, it's worth the reconfiguring for the resulting simplicity.


All times are GMT -5. The time now is 04:15 PM.