Timed out while waiting for the machine to boot

After a VirtualBox update, I can’t up vagrant box.

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...

How can be fixed? Thank you!

I tryied to run a new vagrant box with the same results. Also, I checked my SSH key is in its place (~/.ssh/id_rsa.pub) and, finally, I downgrade VirtualBox to 4.3.

I have no idea what happens! Any help will be appreciated!

Have you tried waiting it out? What happens if you just wait for it to either boot or fail?

If I wait, ends with this warning:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured (“config.vm.boot_timeout” value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout (“config.vm.boot_timeout”) value.

If I open VitualBox after time out I can see the virtual machine ansible_default open.

Hi, without more ideas, I have decided to reinstall all from scratch, included my OS:

  1. OSX 10.11 (El Capitan)
  2. All requeriments listed here
  3. I cloned trellis and bedrock
  4. Run ansible galaxy
  5. I configured wordpres sites and run vagrant up.

With the same results. This is the terminal output:
(I am in desperation mode. Any help, clue or way to research will be wellcome)

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...

Try changing the IP address of the VM. That’s in your Vagrantfile, line 39. It doesn’t have to be 192.168.50.x. It can be anything in the ipv4 private address space. If that doesn’t fix it, it could be a software firewall on your computer.

1 Like

Thank you. I forget to mention, I have a new router! Maybe this is the way to search.

Nothing changes with other IP for the VM. Tomorrow i will try to reinstall old router… thanks anyway.

Sounds like you’ve tried a lot. I’m sure it is frustrating. I’m not aware of what this might be. Googling ‘vagrant virtualbox update "Connection timeout"’ turned up quite a variety of causes and resolutions. Perhaps you’ve looked through those results, e.g., this and this for starters.

1 Like

I am wondering if it has to do with Vagrant trying to use your private keys versus seeing the default insecure keypair and automatically replacing it. Possibly pursue one or two things:

  1. Are the chmod permissions on your ssh keys and the authorized_keys file restricted to 600?

  2. Try adding ‘config.ssh.insert_key = false’ to your Vagrantfile to see if you can force the default insecure key pair to be used.

David

1 Like

I have some good news. Installing old router again, everything works. I have bad news too: I have no idea what happens with my new 70€ router.

Should I open ports or somethig like that in the router?

I bumped into these connection timeouts errors too, but only on some wifi networks. On my own network everything worked fine. This suggestion helped me (I think):

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end

Not sure why, but it helped.
I also updated my Virtualbox and Guest Additions to the latest version (5.0.*) and I haven’t noticed any timeouts anymore.

I don’t think your new router itself is causing these problems, more likely some network setting.

2 Likes

I was trying with VB GUI but nothing changes. I can see the startup process at VB interface. It is stopped at

vagrant-ubuntu-trusty-64 login: _

I can login with vagrant/vagrant user/psswrd, but the terminal of host still freeze.

I have updated VB to v5 but how can I update guest additions? Thanks!

I use a Vagrant plugin for that: https://github.com/dotless-de/vagrant-vbguest

1 Like

Yesterday a friend of mine, telecommunication engineer, came home to help me with the router. We checked net cards of virtual machines for six o seven hours and how dhcp was assign IP. :sweat: Finally he decided that new router was defective. I am returning it to Amazon.

Bad luck.

1 Like

Thanks for the follow up! What a weird issue.

This topic was automatically closed after 12 hours. New replies are no longer allowed.