LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 02-10-2013, 10:31 AM   #1
sanaz
Member
 
Registered: Aug 2012
Posts: 76

Rep: Reputation: Disabled
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
 
Old 02-10-2013, 01:36 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 02-10-2013, 04:13 PM   #3
sanaz
Member
 
Registered: Aug 2012
Posts: 76

Original Poster
Rep: Reputation: Disabled
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)
 
Old 02-10-2013, 04:26 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting two Linux servers to communicate (PING issues) orakris Linux - Networking 3 12-19-2010 08:04 AM
[Tcptraceroute/Traceroute/Ping] Windows VMs & Linux VMs BiFo Linux - Networking 0 08-24-2010 02:07 PM
Can't communicate with servers on same subnet CarlKB Linux - Networking 3 04-20-2009 10:28 AM
LXer: Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) LXer Syndicated Linux News 0 01-14-2009 08:20 PM
vms geletine Other *NIX 9 12-10-2005 03:47 PM


All times are GMT -5. The time now is 02:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration