2

I have been tasked with creating two virtual instances of Ubuntu on my windows 7 machine and having them transfer files back and forth over a virtual internal network. I configured the two instances in virtual box and made an internal network in the network settings of virtual box.

I then noticed both VMs had the same IPs. I experienced exactly what is described in:

Why are my two virtual machines getting the same IP address?

So, I then tried the ping command and it was successful. I want these VMs to communicate with each other. My question is: was I pinging myself? If I was, how do I ping the other VM?

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Preston Roy
  • 131
  • 5

2 Answers2

2

Yes, the VM is pinging its own local interface with the IP.

The only way to make them communicate is to change the IP on one of the VMs. Then they will talk over the virtual network if all the other settings and configurations are correct.

0xSheepdog
  • 2,742
  • 1
  • 20
  • 31
0

As pointed out by 0xSheepdog, the VM was clearly pinging itself. By default virtual box will set the IP address of the machine to 10.0.2.15. So, when I ran ping 10.0.2.15, I should have known better. I was able to find the following video tutorial explaining how to solve this problem, starting by using vboxmanage.exe on the host OS:

https://www.youtube.com/watch?v=lhOY-KilEeE

As demonstrated in the video, this will create an internal virtual network and the VMs will have connectivity. That is, they will be able to ping each other.

Preston Roy
  • 131
  • 5