- CentOS 7 VM - 10.0.2.100
- Windows Server 2012 R2 VM - 10.0.2.15
Goal - Ping each other; communicate with each other
Problem - Cannot ping each other; communicate with each other
On the CentOS VM, I have auto_config turned off because Vagrant was having trouble automatically changing the IP for me. So I made Vagrant recognize it as 10.0.2.100 and then changed the network manually on the VM.
On the Windows VM, Vagrant defaulted the IP address to 10.0.2.15.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "centos/7"
master.vm.network "private_network", ip: "10.0.2.100", auto_config: false
master.vm.box = "centos_7_v2"
master.vm.hostname = "master.local.com"
master.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
config.vm.define "nodeone" do |nodeone|
nodeone.vm.box = "windows_2012_r2_standard"
nodeone.vm.hostname = "nodeone.local.com"
nodeone.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
end
I have the configuration --natdnshostresolver1 added to both VMs, and then added the following into my own hosts file (on my Mac).
10.0.2.15 nodeone.local.com
10.0.2.100 master.local.com