Hi everyone I have a vagrant file that has:
config.vm.box = "fso/xenial64-desktop" config.vm.network "forwarded_port", guest: 80, host: 19721, host_ip: "127.0.0.1" config.vm.network "public_network", bridge: "Intel(R) Ethernet Connection I217-LM" There is also config.vm.provision with multiple sudo apt-get When I do vagrant up, it fails on the first apt-get as it can't resolve: Err:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 sshpass amd64 1.05-1 ==> default: Temporary failure resolving 'us.archive.ubuntu.com' I can see in virtual box that the box is running and it has got an ip from dhcp on the corporate network but the dns settings in /etc/resolv.conf are not correct. It has nameserver as local host and the search as the corporate domain: nameserver 127.0.1.1 search corp.company.com The nics look like this: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:4a:c5:81 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global enp0s3 valid_lft forever preferred_lft forever 3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:15:b4:68 brd ff:ff:ff:ff:ff:ff inet 10.7.6.99/24 brd 10.2.7.255 scope global dynamic enp0s8 valid_lft 172754sec preferred_lft 172754sec If I disable enp0s8 and reconnect it, it gets the correct dns in /etc/resolv.conf and then I have to run vagrant provision to get all the packages that should be provisioned Does anyone know what is wrong with the vagrant file that it is not doing this correctly when I run vagrant up? Thanks -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/235ec2b4-b9a9-4474-a979-176a2c1e3102%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
