Vagrant up timeout

Don Drozdito picture Don Drozdito · May 16, 2014 · Viewed 51.3k times · Source

Having some issues to get my vagrant up, Got the box, run vagrant init and after vagrant up command I get this message.

Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'precise32'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Setting the name of the VM: virtm_default_1400193131859_61200
    ==> default: Fixed port collision for 22 => 2222. Now on port 2201.
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
    ==> default: Forwarding ports...
        default: 22 => 2201 (adapter 1)
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2201
        default: SSH username: vagrant
        default: SSH auth method: private key 
    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.

Any suggestions?

Answer

BrianC picture BrianC · May 19, 2014

There are several different problems which can lead to this timeout problem. A good tip for tracking it down is to enable the GUI mode. This will bring up the VirtualBox machine UI which may provide a better clue as to the problem.

To enable GUI mode, make sure this section in your Vagrantfile is uncommented:

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

Then do a vagrant reload. This should bring up the VirtualBox application showing your virtual machine UI. Usually the problem will become apparent, whether it's a network issue or grub boot loader problem.

After fixing the issue, you can comment this out again, then do another vagrant reload to return to headless mode.

Reference: Vagrant docs