It seems that Vagrant is failing to bring the private network it creates up after creating it. Looking though the code and commit history I think this is a regression introduced by https://github.com/mitchellh/vagrant/commit/67f3c8b48cc51c2489d0d9258b778be7355804c2
$ vagrant -v
Vagrant 1.9.1
My host is macOS 10.12.2
I'm running Bento's CentOS 7.2
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-7.2"
config.vm.network "private_network", ip: "192.168.100.100"
end
Not sure if it's needed, but if so can be provided
The 2nd network interface is up
The 2nd network interface is down. (You have to run ifup manually to fix it.)
vagrant upvagrant ssh and examine the output of ip link showNone that I know of
I just checked, and this works fine in Vagrant 1.9.0 so it does look like a regression.
I'm running into this as well. It looks like the commit 67f3c8b dropped the ifup on the interface and expects the network manager to bring it up. However, the script that's installed has NM_CONTROLLED=no. If I set that to yes and restart NetworkManager.service then it does bring the device up. So it seems like either ifup needs to be called manually or NM_CONTROLLED needs to be yes.
I have the same problem:
vagrant -v
Vagrant 1.9.1
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
end
vagrant up --debug
Log file: https://www.dropbox.com/s/bvsnid3k2mj3mab/vagrant.log?dl=0
Vagrant 1.9.1
NixOS 16.09.git.3414ae5 (Flounder)
Red Hat Enterprise Linux Server release 7.3 (Maipo)
# fail if the interface is not actually set up yet so ignore
# errors.
/sbin/ifdown 'eth1'
# Move new config into place
mv -f '/tmp/vagrant-network-entry-eth1-1482363723-0' '/etc/sysconfig/network-scripts/ifcfg-eth1'
# attempt to force network manager to reload configurations
nmcli c reload || true
# Restart network (through NetworkManager if running)
if service NetworkManager status 2>&1 | grep -q running; then
service NetworkManager restart
else
service network restart
fi
in this file, /etc/sysconfig/network-scripts/ifcfg-eth1' we should retrieve :
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
NM_CONTROLLED=yes
(...)
But, in this file, I /etc/sysconfig/network-scripts/ifcfg-eth1' i got :
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
NM_CONTROLLED=no
(...)
And, since network-manager is started, my system only restart network managed using NM.
But, when NM_CONTROLLED=no restarting network using service network restart work perfectly.
@dgersting @tpodom @vbalastegui
It should be fix on this pull request : https://github.com/mitchellh/vagrant/issues/8148
For now, I suggest you to use https://releases.hashicorp.com/vagrant/1.9.0/
Fixed via #8148. Thanks for the report!
Been banging my head against the wall all weekend trying to figure out why my eth1 would not start on vagrant up; now i know why. I manually applied the changes here https://github.com/mitchellh/vagrant/pull/8148/files and all works again. thanks!
Most helpful comment
I'm running into this as well. It looks like the commit 67f3c8b dropped the ifup on the interface and expects the network manager to bring it up. However, the script that's installed has
NM_CONTROLLED=no. If I set that to yes and restart NetworkManager.service then it does bring the device up. So it seems like either ifup needs to be called manually or NM_CONTROLLED needs to beyes.