Open gtirloni opened 7 years ago
Creating this here but if there's a chance this is actually a bug in Vagrant itself, feel free to close it.
This is long time unattended issue by RedHat/CentOS teams... STOCK CentOS vagrant box has following ifcfg preventing network.service from being restarted even WITHOUT private network configured...
-bash-4.2# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" ONBOOT="yes" TYPE="Ethernet" PERSISTENT_DHCLIENT="yes"
-bash-4.2# systemctl restart network Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
Workaround (not so flexible)... Rebuild and repackage Stock Box by adding: config.vm.provision "shell", privileged: true, inline: "[[ -s /etc/sysconfig/network-scripts/ifcfg-eth0 ]] && rm -rf /etc/sysconfig/network-scripts/ifcfg-eth0"
Vagrantfile created by
vagrant init centos/atomic-host
and private network enabled:Result:
Network interfaces:
Error messages:
Vagrant Box