VMware Communities
seanh1986
Enthusiast
Enthusiast
Jump to solution

How can VMs talk to each other?

Using Workstation 6.0, I've created multiple VM's with different OS's. I want to somehow enable them to communicate together and recognize that each other are there.

I know the general idea behind VM's is that they don't need to recognize that each other are there, etc.

Basically I have two linux VM's and i want to establish a secure (OpenSSH) communication between them... but to do so I need them to know each other is there.

Any ideas?

0 Kudos
1 Solution

Accepted Solutions
KevinG
Immortal
Immortal
Jump to solution

Ok, I have them both connected through VMnet8... But

I'm still not 100% sure on how to actually make them

communicate.

Like say I want to copy a file from VM "A" onto VM

"B", how can i do it given that they are both hooked

up to VMnet8 ?

Use the same Linux commands that you would with two physical Linux systems to copy files. ( scp, ftp...etc)

Aside, is there a limit to the number of VM's I can

hook up to VMnet8?

I don't remember if there is a limit, but you will most likely never reach it if there was a limit.

For example, if I wanted to hook up and entire office

building onto the same Virtual Network and be able to

share files...could they ALL just hook-up to the same

VMnet8?

When using NAT, the VM's are on a private network and can not normally be accessed from outside the host.

Or is this just a tool that only works within

workstation 6.0 ?

Physical machines on your local network will not see the virtual network.

p.s. Thanks a lot for your help Kevin, both in this

thread and the other one! Smiley Happy

Glad I could help

View solution in original post

0 Kudos
7 Replies
louyo
Virtuoso
Virtuoso
Jump to solution

>>Any ideas?

Sure, make sure they are on the same subnet (I would use bridged with static IP address) then, if you want them to address each other by name, put entries in each /etc/hosts file. It works just the same as if they were on a "real" network.

Lou

0 Kudos
seanh1986
Enthusiast
Enthusiast
Jump to solution

Can this be done using NAT networking as well? That is currently the desired form of networking.

If i set the two VM's both to custom Ethernet and set them up with the same VMnet# (option in Edit : Virtual Network Settings... ), I believe they now have the same subnet, correct?

Inside the /etc/hosts file, all thats written there is the local host (at the moment)

I need to know the IP Address of the other VM to add it correct?

(i.e. 192.168.168.xx, or something?)

The general form would be: "IPaddress name of other VM " ?

Each VM is running on a DHCP. Does that not mean their IP Addresses are dynamic and MAY be constantly changing?

0 Kudos
KevinG
Immortal
Immortal
Jump to solution

You should not have to change any of the default settings in "Edit" -> "Virtual network Settings". I?f you select NAT in each VM ( VM -Settings-> NIC) the VM's will be connected to the same virtual switch vmnet8 so they will be able to communicate with each other.

seanh1986
Enthusiast
Enthusiast
Jump to solution

Ok, I have them both connected through VMnet8... But I'm still not 100% sure on how to actually make them communicate.

Like say I want to copy a file from VM "A" onto VM "B", how can i do it given that they are both hooked up to VMnet8 ?

Aside, is there a limit to the number of VM's I can hook up to VMnet8?

For example, if I wanted to hook up and entire office building onto the same Virtual Network and be able to share files...could they ALL just hook-up to the same VMnet8?

Or is this just a tool that only works within workstation 6.0 ?

p.s. Thanks a lot for your help Kevin, both in this thread and the other one! Smiley Happy

0 Kudos
Liz
Virtuoso
Virtuoso
Jump to solution

All VMs in any given network eg vmnet1 (host only) or all vms in vmnet8 (NAT) can talk to each other and the host, the difference with vmnet8 is all vms running on your host pc can talk out as your PC would to other machines on the network.. However, the machines on your network CANNOT talk bck to the guests. You can setup port forwarding, but you can only do host port 80 to 1 vm, you cant split it over a number for example.

If you wanted your whole office to talk to them, you would used bridged.. Then they act like more physical machines under your desk.

KevinG
Immortal
Immortal
Jump to solution

Ok, I have them both connected through VMnet8... But

I'm still not 100% sure on how to actually make them

communicate.

Like say I want to copy a file from VM "A" onto VM

"B", how can i do it given that they are both hooked

up to VMnet8 ?

Use the same Linux commands that you would with two physical Linux systems to copy files. ( scp, ftp...etc)

Aside, is there a limit to the number of VM's I can

hook up to VMnet8?

I don't remember if there is a limit, but you will most likely never reach it if there was a limit.

For example, if I wanted to hook up and entire office

building onto the same Virtual Network and be able to

share files...could they ALL just hook-up to the same

VMnet8?

When using NAT, the VM's are on a private network and can not normally be accessed from outside the host.

Or is this just a tool that only works within

workstation 6.0 ?

Physical machines on your local network will not see the virtual network.

p.s. Thanks a lot for your help Kevin, both in this

thread and the other one! Smiley Happy

Glad I could help

0 Kudos
seanh1986
Enthusiast
Enthusiast
Jump to solution

Currently I'm trying to simulate that environment using one computer.

Ideally, each computer will have one (or more) VM's on it and using NAT we want the VM to essentially act as the physical computer. But being that it's virtual, it makes it much easier to do updates to all the comptuers.

(i.e. do an installation once and then just copy a file onto all the computers rather than doing all those installations)

Right now what I'm trying to set up is two VM's, each running OpenSSH, with one being embedded within the other.

(i.e. I want the second VM to not allow direct connection for SSH except by going though the first)

like...

\[The world] <====> \[ VM # 1 ] <===> \[VM #2]

but "\[the world]" cannot directly connect to "\[VM#2]" without going through "\[VM#1]"

...does that make any sense?

0 Kudos