Skip to content
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

Version 2.3.0 fails to connect network on VirtualBox #688

Closed
shusugmt opened this issue Oct 8, 2016 · 39 comments
Closed

Version 2.3.0 fails to connect network on VirtualBox #688

shusugmt opened this issue Oct 8, 2016 · 39 comments

Comments

@shusugmt
Copy link

shusugmt commented Oct 8, 2016

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.

@rickard-von-essen
Copy link
Collaborator

rickard-von-essen commented Oct 8, 2016

VirtualBox had a regression, which is fixed in:

  • 5.1.6
  • 5.0.28

See hashicorp/packer/issues/3757

Solutions (any of):

  1. Upgrade VirtualBox (recommended)
  2. Downgrade your bento boxes to 2.2.9
  3. Add the following to your Vagrantfile
config.vm.provider 'virtualbox' do |vb|
  vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end

@rickard-von-essen rickard-von-essen changed the title bento/ubuntu-14.04 version 2.3.0 virtualbox broken? Version 2.3.0 fails to connect network on VirtualBox Oct 8, 2016
@montge
Copy link

montge commented Oct 10, 2016

This also seems to be effecting kitchen (1.13.0)

@christopher-francisco
Copy link

@montge Any fixes for kitchen?

@jpujari-cartera
Copy link

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.

@cheeseplus
Copy link
Contributor

@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.

@christopher-francisco
Copy link

@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

@christopher-francisco
Copy link

@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?

@bgroff
Copy link

bgroff commented Oct 13, 2016

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.

@christopher-francisco
Copy link

@bgroff what about vagrant halt and vagrant up? Does it get past the hang or it gets stuck again? (like me 😭 )

@bgroff
Copy link

bgroff commented Oct 14, 2016

@chris-fa Yes, a vagrant halt followed by a vagrant up hangs.

@christopher-francisco
Copy link

@bgroff :( I am working with chef, so every vagrant up after destroying is 12 mins provision RIP

@bgroff
Copy link

bgroff commented Oct 14, 2016

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.

@cheeseplus
Copy link
Contributor

cheeseplus commented Oct 14, 2016

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 cheeseplus reopened this Oct 14, 2016
@christopher-francisco
Copy link

@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

@cheeseplus
Copy link
Contributor

cheeseplus commented Oct 17, 2016

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)

@cheeseplus
Copy link
Contributor

Also what version of Vagrant?

@bgroff
Copy link

bgroff commented Oct 17, 2016

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.

@bradallenfisher
Copy link

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?

@cheeseplus
Copy link
Contributor

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.

@bradallenfisher
Copy link

cool. Thanks @cheeseplus

@ferrarimarco
Copy link

ferrarimarco commented Nov 16, 2016

Hi everyone. I have the same issue on Virtualbox 5.1.8, using the 2.3.0 ubuntu 16.04 image.

Thanks

EDIT: Vagrant 1.8.6

@cheeseplus
Copy link
Contributor

@ferrarimarco what version of Vagrant? We really need more detail on these postings as "me too" follow ups are often not actually the same root issues.

@ferrarimarco
Copy link

ferrarimarco commented Nov 16, 2016

@cheeseplus I am using Vagrant 1.8.6 on Windows 7

@cheeseplus
Copy link
Contributor

cheeseplus commented Nov 16, 2016

@ferrarimarco what is the actual issue here? please gist the detailed log and also make sure to remove any existing vagrant boxes and reimport as the importing function in 5.0.x was where one bug was as well.

@ferrarimarco
Copy link

@cheeseplus Here is the log. I followed your procedure. Thanks

vagrant bento log.txt

@wstaples
Copy link

I'm having the same issue on Windows 7 64-bit, Vagrant 1.8.7 and VirtualBox 5.1.8. I was on virtualbox 5.0.something and I upgraded to see if it would resolve the issue. I went with the --cableconnected1 solution and that has fixed it for me.

@cheeseplus
Copy link
Contributor

cheeseplus commented Nov 16, 2016

The timeout error, especially lately, has been from Vagrant itself or a buggy version of VirtualBox. I am unable to repro on a Windows 7 machine but the box is coming up normally on Linux and OSX workstations.

Is there anything in your Vagrantfile that is messing with the key?

When we've seen this in the past it's almost always been something that wasn't installed or for whatever reason needed to be reinstalled wrt Vagrant or Vbox. There is potential it's a Windows specific issue in Vagrant (1.8.7) was just released but I've not heard anything on that front from folks who are using it daily.

Also running vagrant with a debug log may reveal more - I know this is frustrating but as bento relies on all the above software we need to be very clear about what exactly is failing as most of the time it's something upstream.

@wstaples
Copy link

If I open the Virtualbox console and show the gui I can see that the box is stuck on start job is running for Raise network interfaces. It has a timer and will stop after 5 minutes however vagrant throws a timeout error first. Another thing of note when I installed vbox 5.1.8 I had to use the -msiparams NETWORKTYPE=NDIS5 which could also be a factor (and would explain why it works in linux).

@ferrarimarco
Copy link

@cheeseplus I tried with a minimal Vagrant file (just the box, CPU and memory configuration) and it happened again.
I enabled the GUI and it shows the "Emergency mode" (see the attached screenshot).

Thanks

image

@cheeseplus
Copy link
Contributor

Could you please open a separate issue?

This is starting to sound different and more specific than the initial issue which many have reported as solved and this is why I was trying to avoid the pile on posts because the underlying causes are likely different here.

@ferrarimarco
Copy link

@cheeseplus are you talking to me about the separate issue? If so, will do. no problem

@cheeseplus
Copy link
Contributor

Yes @ferrarimarco - this seems uniquely different and given @wstaples comments could be specific to Windows (plus whatever vagrant and vbox bugs exist)

@ferrarimarco
Copy link

@cheeseplus done, #719 thanks

@cheeseplus
Copy link
Contributor

I'm going to close out this thread because we have solved for the initial report and some other issues appear specific to other conditions.

jbeezley added a commit to OpenGeoscience/geonotebook that referenced this issue Nov 20, 2016
jbeezley added a commit to OpenGeoscience/geonotebook that referenced this issue Nov 20, 2016
kyleady added a commit to kyleady/chef-gogs that referenced this issue Dec 17, 2016
@remram44
Copy link

VirtualBox had a regression, which is fixed in:

5.1.6
5.0.28

I'm having the issue on 5.0.30 r112061 (MacOS). 5.1.12 r112440 worked.

@cheeseplus
Copy link
Contributor

At this point we don't expect anything 5.0.x to work with bento.

@rutsky
Copy link

rutsky commented Jan 25, 2017

Had the issue on currently default Virtualbox 5.0.24 version on Ubuntu 16.04.
Installing 5.0.32 from xenial-proposed on fixed the issue (should be released in 16.04.2).

@rmccue
Copy link

rmccue commented Jun 9, 2017

Also experiencing this issue on the very latest of everything (Vagrant 1.9.5, VirtualBox 5.1.22, macOS 10.12). Is this another regression in VirtualBox?

@cheeseplus
Copy link
Contributor

That's a vbox regression @rmccue or you have an old bento box. I am locking this one as with others because most of these are old versions of upstream software I can't do anything about. If folks have similar problems, please open a new issue with all the version information and we can move from there.

@chef chef locked and limited conversation to collaborators Sep 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests