# Timed out while waiting for the machine to boot

**URL:** https://discourse.roots.io/t/timed-out-while-waiting-for-the-machine-to-boot/5943
**Category:** trellis
**Created:** 2016-02-15T14:47:15Z
**Posts:** 16

## Post 1 by @aitor — 2016-02-15T14:47:16Z

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!

---

## Post 2 by @aitor — 2016-02-15T16:05:20Z

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!

---

## Post 3 by @QWp6t — 2016-02-15T16:43:48Z

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

---

## Post 4 by @aitor — 2016-02-15T17:10:56Z

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.

---

## Post 5 by @aitor — 2016-02-16T18:07:35Z

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](https://roots.io/trellis/docs/installing-trellis/)
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...
```

---

## Post 6 by @QWp6t — 2016-02-16T18:36:23Z

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](https://www.arin.net/knowledge/address_filters.html). If that doesn’t fix it, it could be a software firewall on your computer.

> <https://github.com/roots/trellis/blob/master/Vagrantfile#L39>

---

## Post 7 by @aitor — 2016-02-16T18:50:39Z

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

---

## Post 8 by @aitor — 2016-02-16T19:13:49Z

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

---

## Post 9 by @fullyint — 2016-02-16T19:21:33Z

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](http://stackoverflow.com/q/22575261) and [this](https://github.com/Varying-Vagrant-Vagrants/VVV/issues/375) for starters.

---

## Post 10 by @DavidSchargel — 2016-02-16T20:03:34Z

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

---

## Post 11 by @aitor — 2016-02-17T09:47:46Z

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](http://www.amazon.es/gp/product/B00LI4CFZ0?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00).

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

---

## Post 12 by @Twansparant — 2016-02-17T11:13:54Z

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.

---

## Post 13 by @aitor — 2016-02-17T11:45:18Z

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!

---

## Post 14 by @Twansparant — 2016-02-17T12:10:34Z

> [@aitor](#):
>
> 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](https://github.com/dotless-de/vagrant-vbguest)

---

## Post 15 by @aitor — 2016-02-21T07:05:21Z

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.

---

## Post 16 by @ben — 2016-02-22T02:11:10Z

Thanks for the follow up! What a weird issue.

---

## Post 17 by @ben — 2016-02-22T14:11:20Z

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