Version 2.3.0 fails to connect network on VirtualBox
SSH timeouts when vagrant up with this version.
Network seems not to be configured correctly?
Open VirtualBox -> right click the Box base VM -> Open VM Configuration -> Network -> Adapter 1 -> "Cable connected" is not checked by default.
Reverted back to v2.2.9 solved the problem.
VirtualBox had a regression, which is fixed in:
- 5.1.6
- 5.0.28
See mitchellh/packer/issues/3757
Solutions (any of):
- Upgrade VirtualBox (recommended)
- Downgrade your bento boxes to 2.2.9
- Add the following to your
Vagrantfile
config.vm.provider 'virtualbox' do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
This also seems to be effecting kitchen (1.13.0)
@montge Any fixes for kitchen?
For kitchen, you can use the box parameter under driver in kitchen.yml file to specify a different image. But the recommended VBOX upgrade solution should work for kitchen users too.
@chris-fa there is no fix for kitchen, kitchen is not broken - this has to do with the virtualbox version more than anything else.
Closing this one as it's answered and we've got 3 dupes.
@rickard-von-essen I believe this doesn't work for a vagrant reload --provision (or at least it isn't working for me); However, it does work doing vagrant destroy --force and then vagrant up
@rickard-von-essen I'm using virtual box 5.1.6 and using bento/centos7.2 version 2.2.9 and added to my Vagrantfile vb.customize ["modifyvm", :id, "--cableconnected1", "on"], but it still hangs. Should I delete some kind of cache or global configuration file or similar, so that it works?
I am also running VB 5.1.6 with the bento/ubuntu-16.04 box and am still running into the hanging on ssh issue.
EDIT: After testing again, adding the vb.customize ["modifyvm", :id, "--cableconnected1", "on"] to the Vagrantfile and destroying and upping the machine it did get past the hang.
@bgroff what about vagrant halt and vagrant up? Does it get past the hang or it gets stuck again? (like me 😭 )
@chris-fa Yes, a vagrant halt followed by a vagrant up hangs.
@bgroff :( I am working with chef, so every vagrant up after destroying is 12 mins provision RIP
Should this ticket be reopened? VB 5.1.6 does not fix this issue. Also as @chris-fa stated even if you add vb.customize ["modifyvm", :id, "--cableconnected1", "on"] to the Vagrantfile, a vagrant halt then vagrant up hangs on ssh auth.
So the issue is for 2.3.0 but the issues above reference 2.2.9 with 5.1.6 (which flips the problem the other way) - in the interest of sanity if folks could report the complete matrix of what they are considering broken.
Basically: If using bento 2.3.0 then Virtualbox 5.1.6 and Vagrant 1.8.6 are required
If you're seeing that specific permutation fail then I'd like to get a repro case but I'm trying to separate some signal from noise here.
@cheeseplus I tried with box 2.2.9 too, no luck. I then went back to bento/centos-6.7 (version 2.2.7) and it worked. I couldnt find a way of making it work with bento/centos-7.2
In the interests of separating out precise problem, the condition is only if you're doing a vagrant halt correct?
(Trying to stem cross-posting still and get a repro)
Also what version of Vagrant?
I have to apologize for the noise. I thought I had upgraded to 5.1.6 which I had not. So please disregard my input for the moment.
My issue was that on virtualbox 5.0.26 I could not run vagrant up with a clean init using bento/ubuntu-16.04. It had nothing to do with vagrant halt or reload. It was a fresh up.
I can confirm that if you upgrade to virtualbox 5.1.8 bento/ubuntu-16.04 will get past the SSH auth method: private key hang.
I can also confirm that the problem still exists if you only upgrade Virtual Box to 5.0.28.
Is this something that can be fixed in a later version of vagrant or should I put min versions on Virtual Box and Vagrants when people try to run our software?
As the person building bento I, by necessity have to lock down the versions of everything, because of unexpected regressions like we've seen here. On a fresh up, with no pre-existing vagrant box of the same name, it will fail as vagrant defaults to grabbing the latest off Atlas - this can be mitigated in your Vagrantfile by specifying a version and test-kitchen (via kitchen-vagrant) can do the same.
The issue here is trying to deal with upstream errors in several projects. This can't be fixed in Vagrant without HashiCorp testing every single new version of hypervisor and hard coding it in which would be an exercise in madness. So the aforementioned solutions are your best bet here @bradallenfisher - fwiw, 5.1.8 also has some serious regressions so we stuck with 5.1.6 across the board on bento until the situation improves.
cool. Thanks @cheeseplus