0
I am not able to ping between two virtual machines on different Host, But can ping between two virtual machines if they are in the same Host machine, using a Bridge network to communicate between the two different VM’s.
Vagrantfile look like this on both VM,
ENV['VAGRANT_NO_PARALLEL'] = 'yes'
Vagrant.configure(2) do |config|
config.vm.provision "shell", path: "bootstrap.sh"
MasterCount = 1
(1..MasterCount).each do |i|
config.vm.define "kmaster2" do |masternode|
masternode.vm.network "forwarded_port", guest: "80", host: "5050", auto_correct: "true"
masternode.vm.box = "bento/ubuntu-20.04"
masternode.vm.hostname = "kmaster2.example.com"
masternode.vm.network "public_network", ip: "172.16.16.50", bridge: "ens160"
masternode.vm.provider "virtualbox" do |v|
v.name = "kmaster2"
v.memory = 2048
v.cpus = 2
end
end
end
please refer to the text diagrams below Ping between the Physical machine (241) and Physical machine (242) works ping between VM-11 and VM-12 within the same physical machine works. Ping from VM-21 in Physical machine (242) to Physical machine (241) works But ping between VM-11 and VM-21 does not work. Also, ping from Physical machine 241 to VM-21 (in Phy machine 242) does not work
Any leads would help.
Physical machine (241)
--------------------
| ----------- |
| |VM-11 | |
| ----------- |
| |
| ----------- |
| |VM-12 | |
| ----------- |
|------------------|
Physical machine (242)
--------------------
| ----------- |
| |VM-21 | |
| ----------- |
| |
| ----------- |
| |VM-22 | |
| ----------- |
|------------------|