-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hang at Configuring and enabling network interfaces...
when using private_network with a static IP
#7876
Comments
Adding another debug, I see |
I monkey patched in #7866 and confirmed that it does indeed fix this issue. With it, the machine comes up with the following:
enp0s3 is DHCP and enp0s8 is host-only static IP, which is the same behavior as Vagrant 1.8.4 |
For the record, monkey patching instructions:
|
Same issue on Debian (stretch, sid, and jessie) GNU/Linux with Vagrant 1.8.6, and a Debian or Ubuntu guest. With a specific IP address configured in my Vagrantfile like so:
Vagrant hangs forever at |
The mentioned patch from @chrisroberts does not resolve the issue for me on Linux. I even attempted to replace My host interfaces are: docker0, eth0-1, lo, vboxnet0-2. Doesn't work on other machines I have with enp0s25, wlp4s0 either. |
Ok, tried manually returning Does anyone know how I could make that IP address work with my Vagrant machine and VirtualBox? If you attempt to set it manually to |
Update: my example config had auto_config:false, but that actually works fine. The problem only occurs with auto_config:true (default). As for 10.0.2.2, make sure you have a host-only network created in vbox that covers that IP. |
I've been having a similar issue but it manifests differently. We have a fairly complicated Vagrant configuration that sets the VM IP address with the config.vm.network setting:
On 1.8.5 we have no issues. This results in /etc/network/interfaces like this:
With 1.8.6, I don't see the command hanging: everything configures and starts up properly, but you just can't reach the VM at the specified IP address. /etc/network/interfaces looks like this:
Note that eth0 is defined twice. If I modify the file and change the second eth0 def to eth1, I can reboot (I thought The other weird thing is that this behavior is inconsistent. While attempting to check on using ifup, I kept creating VMs that worked just fine: the interfaces definition still had two entries for eth0, but apparently the networking service realized this and assigned the second definition to eth1. In other cases, I'll only have eth0 defined. This happens pretty much the same way on both OS X and Linux Mint. I can confirm that the monkey-patch procedure described by @karlkfi works to fix the problem: running with that results in both eth0 and eth1 being properly defined, without requiring any changes to the interfaces configuration. Let me know if you have any other questions about our configuration or environment. |
I still can't set a custom eth0 IP address for my VM. I want to give it |
now i'v got same bug.but when i start vagrant. on Mac os 10.12.6 Virtual Box 5.1.24 vagrant 2.0 |
I also get a hang here -
as soon as I start using this line -
And I specify to bridge to the wifi on a macbook pro on a network I'm currently on. everything was fine wired over ethernet on another network 2 days ago. I've destroyed the instance many times and on vagrant up the hang occurs. |
I couldn't use vagrant to spin up (a once already working vm) that was used in production with similar symptoms today. it looks like the cause this time was different - the NIC that was specified in the .Vagrantfile was unavailable. It would be great if there was enough verbosity to see the cause to make it apparent - as a suggestion. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Vagrant version
1.8.6
Host operating system
Mac OS 10.10.5
Guest operating system
CentOS 7
Host-only Network
Vagrantfile
Expected behavior
Actual behavior
Last ui output is
Configuring and enabling network interfaces...
Vagrant seems to be hanging inside of the redhat-specific version of
configure_networks
.Using a monkeypatch to replace configure_networks and add logging, I was able to determine that
/etc/sysconfig/network-scripts/ifcfg-enp0s3
is being reconfigured from a dhcp iface to a static IP iface. Then the dchp iface is being brought down while vagrant is still connected. Vagrant then hangs - the ssh command never returns.Steps to reproduce
References
Sounds like it might be related to #7866
The text was updated successfully, but these errors were encountered: