{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/7668","repository_url":"https://api.github.com/repos/mitchellh/vagrant","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7668/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7668/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7668/events","html_url":"https://github.com/mitchellh/vagrant/issues/7668","id":168838037,"number":7668,"title":"1.8.5: Unable to use private network after switching from ifconfig to ip","user":{"login":"mvanbaak","id":1928231,"avatar_url":"https://avatars.githubusercontent.com/u/1928231?v=3","gravatar_id":"","url":"https://api.github.com/users/mvanbaak","html_url":"https://github.com/mvanbaak","followers_url":"https://api.github.com/users/mvanbaak/followers","following_url":"https://api.github.com/users/mvanbaak/following{/other_user}","gists_url":"https://api.github.com/users/mvanbaak/gists{/gist_id}","starred_url":"https://api.github.com/users/mvanbaak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvanbaak/subscriptions","organizations_url":"https://api.github.com/users/mvanbaak/orgs","repos_url":"https://api.github.com/users/mvanbaak/repos","events_url":"https://api.github.com/users/mvanbaak/events{/privacy}","received_events_url":"https://api.github.com/users/mvanbaak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/core","name":"core","color":"eb6420"},{"url":"https://api.github.com/repos/mitchellh/vagrant/labels/guest/redhat","name":"guest/redhat","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-02T09:23:00Z","updated_at":"2016-08-09T10:36:09Z","closed_at":null,"body":"In https://github.com/mitchellh/vagrant/pull/7460 all RedHat/CentOS guests were switched from `ipconfig` to `ip` for the network config.\r\nSince that commit Amazon linux guests cannot be used as the networking of them is broken.\r\n\r\nOne thing I noticed while debugging is that when a guest has more then one network interface (which is the case when you specify a private network in your Vagrantfile) is that ifconfig and ip return the available nic's in different order:\r\n\r\n```bash\r\nvagrant@insided-dev:~$ ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'\r\neth0\r\neth1\r\nvagrant@insided-dev:~$ ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'\r\neth1\r\neth0\r\nvagrant@insided-dev:~$\r\n```\r\n\r\nThis bug is preventing our company to use vagrant > 1.8.4, and thus preventing us from using Virtualbox > 5.0\r\n\r\n\r\n### Vagrant version\r\nVagrant 1.8.5\r\n\r\n### Host operating system\r\nMac OS X 10.11\r\n\r\n### Guest operating system\r\nAmazon linux 2016.3\r\n\r\n### Vagrantfile\r\n```ruby\r\nVagrant.configure(\"2\") do |config|\r\n  # This is here because of another bug which is fixed in master\r\n  config.ssh.insert_key = false\r\n  config.vm.box = \"mvbcoding/awslinux\"\r\n  config.vm.network \"private_network\", ip: \"192.168.33.10\"\r\nend\r\n```\r\n\r\n### Debug output\r\n```bash\r\n==> default: Configuring and enabling network interfaces...\r\n INFO ssh: SSH is ready!\r\n INFO ssh: Execute:  (sudo=false)\r\n INFO guest: Autodetecting host type for [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>]\r\n INFO ssh: Execute: grep 'ostree=' /proc/cmdline (sudo=false)\r\n INFO ssh: Execute: cat /etc/issue | grep 'Linux Mint' (sudo=false)\r\n INFO ssh: Execute: [ -x /usr/bin/lsb_release ] && /usr/bin/lsb_release -i 2>/dev/null | grep Trisquel (sudo=false)\r\n INFO ssh: Execute: grep 'Amazon Linux AMI' /etc/os-release (sudo=false)\r\n INFO guest: Detected: amazon!\r\n INFO guest: Execute capability: configure_networks [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, [{:type=>:static, :adapter_ip=>\"192.168.33.1\", :ip=>\"192.168.33.10\", :netmask=>\"255.255.255.0\", :auto_config=>true, :interface=>1}]] (amazon)\r\n INFO ssh: SSH is ready!\r\n INFO ssh: Execute:  (sudo=false)\r\n INFO guest: Execute capability: network_scripts_dir [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (amazon)\r\n INFO ssh: SSH is ready!\r\n INFO ssh: Execute:  (sudo=false)\r\n INFO guest: Execute capability: network_interfaces [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (amazon)\r\n INFO ssh: Execute: /sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://' (sudo=true)\r\n INFO ssh: Execute: # Down the interface before munging the config file. This might\r\n# fail if the interface is not actually set up yet so ignore\r\n# errors.\r\n/sbin/ifdown 'eth0' || true\r\n\r\n# Move new config into place\r\nmv '/tmp/vagrant-network-entry-eth0-1470128445-0' '/etc/sysconfig/network-scripts/ifcfg-eth0'\r\n\r\n# Bring the interface up\r\nARPCHECK=no /sbin/ifup 'eth0'\r\n (sudo=true)\r\n```\r\n\r\nfull log can be found here:\r\nhttps://gist.github.com/mvanbaak/dfb5ca063456727485ce8803103d44cd\r\n### Expected behavior\r\nBring up the box, have eth0 configured on the NAT, have eth1 configured for the private network\r\n\r\n### Actual behavior\r\nBring up the box, try to configure eth0 for the private network, breaking networking of the guest completely\r\n\r\n### Steps to reproduce\r\n1. Use the provided Vagrantfile\r\n2. run `vagrant up`\r\n\r\n### References\r\n- https://github.com/mitchellh/vagrant/pull/7460\r\n"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/238516104","html_url":"https://github.com/mitchellh/vagrant/issues/7668#issuecomment-238516104","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/7668","id":238516104,"user":{"login":"mvanbaak","id":1928231,"avatar_url":"https://avatars.githubusercontent.com/u/1928231?v=3","gravatar_id":"","url":"https://api.github.com/users/mvanbaak","html_url":"https://github.com/mvanbaak","followers_url":"https://api.github.com/users/mvanbaak/followers","following_url":"https://api.github.com/users/mvanbaak/following{/other_user}","gists_url":"https://api.github.com/users/mvanbaak/gists{/gist_id}","starred_url":"https://api.github.com/users/mvanbaak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvanbaak/subscriptions","organizations_url":"https://api.github.com/users/mvanbaak/orgs","repos_url":"https://api.github.com/users/mvanbaak/repos","events_url":"https://api.github.com/users/mvanbaak/events{/privacy}","received_events_url":"https://api.github.com/users/mvanbaak/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T10:36:09Z","updated_at":"2016-08-09T10:36:09Z","body":"@bjoernhaeuser That looks like a different issue."}}
{"actor":{"display_login":"mvanbaak"}}