Search code examples
sshvagrant

vagrant up: config.ssh.timeout


I do not understand why I cannot "vagrant up" anymore after I run some provisioning scripts (I use ansible).

[default] Waiting for machine to boot. This may take a few minutes...
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.ssh.timeout" value) time period. This can
mean a number of things.

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.ssh.timeout") value.

What can be broken? What is vagrant trying to do when running vagrant up? Connecting with the default user, i.e. "vagrant" ?

Obviously it is related to SSH. Yes I pushed some SSH keys but I do not think I changed the vagrant user at all so "vagrant up" should still work right? I also changed a little bit the /etc/sudoers file but I tried without modifying it and it does not seem to work anyway...

Well, I am running out of ideas.. Thanks.


Solution

  • My 2 cents

    1. Set vbox.gui to true in your Vagrantfile, this will help you to see if the box is booted correctly. It cloud get stuck during the boot process, however, vagrant is expecting an exit code from it, it timed out and you get what you saw.

    2. After seeing the error message, run vagrant ssh and see what you get. NOTE: you may need to enable debug to see more info: VAGRANT_LOG=debug vagrant up

    BTW: make sure your vagrant (1.3.5) + VirtualBox (4.3.2) stays current.