I have vagrant 1.2.2 installed in my development machine; a laptop. I use same laptop in three different environments with different networking settings.
My VagrantFile looks like:
Vagrant.configure("2") do |config|
config.vm.box = "lucid32"
config.vm.network :forwarded_port, guest: 80, host: 88
config.vm.network :forwarded_port, guest: 56789, host: 56789
config.vm.network :public_network, :bridge => 'Intel(R) 82579V Gigabit Network Connection'
config.vm.hostname = "web"
end
It successfully sets hostname as web
in headless Ubuntu.
But when I try to ping web
from host OS (Windows), it doesn't resolve the IP address.
I cannot change the hosts file in Windows every time as class C subnet mask and IP ranges are different when I move to other office.
Is there a way to access guest from host machine via hostname web
?