Problem with settings ip address and hostname #1504

Closed
abtris opened this Issue Mar 26, 2013 · 2 comments

Projects

None yet

2 participants

@abtris
abtris commented Mar 26, 2013

I have vagrant 1.1.2 and this Vagrantfile

Vagrant.configure("2") do |config|

  config.vm.box = "precise"
  config.vm.box_url = "http://files.vagrantup.com/precise32.box"

  config.vm.provider :virtualbox do |v|
    v.gui = false
  end

  config.vm.synced_folder "data/", "/vagrant/data"

  config.vm.define :master do |master|
    master.vm.hostname = "master.vm"
    master.vm.network :forwarded_port, guest: 8080, host: 8080
    master.vm.network :forwarded_port, guest: 80, host: 3000
    master.vm.network :private_network, ip: "33.33.33.10"
  end

  config.vm.define :slave do |slave|
    slave.vm.hostname = "slave.vm"
    slave.vm.network :private_network, ip: "33.33.33.20"
  end

end

After 1st start:

  • master ok (ip: 33.33.33.10, hosts: 127.0.1.1 master.vm master precise32)
  • slave - bad (ip: 33.33.33.10 (ifconfig), hosts:127.0.1.1 slave.vm slave master.vm master precise32)

I reload, slave and ip address set correctly to 33.3.33.20. Hostname still some.

Any suggestion what's wrong?

@abtris
abtris commented Mar 26, 2013

I upgrade to 1.1.4 and ip address is now correctly set. But problem with /etc/hosts are the some.

@mitchellh
Owner

Thanks, great to hear it is working!

Vagrant doesn't manage /etc/hosts. However, if it is necessary for proper host name setting for a guest, I'm happy to merge any pull requests for the guest integration (plugin/guests in core).

@mitchellh mitchellh closed this Mar 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment