Vagrant 1.0.7 and a hostonly setup of centos-5.8-x86_64

22 skatījumi
Pāriet uz pirmo nelasīto ziņojumu

Mike Ottinger

nelasīta,
2013. gada 15. jūn. 01:51:3215.06.13
uz vagra...@googlegroups.com
Hi folks,

  I'm attempting to build out a multi-vm setup of centos 5.8 VMs using hostonly networking to allow for the two to communicate with each other. What happens though is upon a fresh provisioning of the VM, no DNS server is available (the /etc/resolv.conf is empty) thus causing the provisioning to fail since it can't access any remote repositories. What fixes it is a vagrant reload which causes the /etc/resolv.conf to get populated thus allowing for resolving of IPs. But it's annoying that this doesn't work straight-away.

  I've looked at setting :auto_config => false which appears to introduce another set of problems. I've also tried to be clever and invoke an inline shell command to either place nameserver values in the /etc/resolv.conf or also restart the network service, none of which seems to work.

  Has anyone encountered something similar to this and if so any steps to remedy?

Thanks!

c...@lionsden.org

nelasīta,
2013. gada 18. jūn. 09:40:1518.06.13
uz vagra...@googlegroups.com
Vagrant will always set NAT networking for eth0. To do hostonly networking you would therefor have to set private networking in the Vagrantfile as per http://docs.vagrantup.com/v2/multi-machine/index.html
Of course you may also have to set the iptables firewall rules accordingly.

As for /etc/resolv.conf ... if you allow NAT networking on eth0 of the VM and use DHCP then /etc/resolv.conf will be populated when the VM boots and enters runlevel 3. 
Atbildēt visiem
Atbildēt autoram
Pārsūtīt
0 jauni ziņojumi