Majid Abdolhosseini
Majid Abdolhosseini

Reputation: 2301

vagrant + virtualbox Timed out while waiting for the machine to boot

sorry I'm really new to vagrant I am running vagrant 1.4.3 and virtualbox 4.3.26. and my host OS is ubuntu 14.04.2.

I am a php developer and I'm trying to make my development environment ready for couple of projects.

and every box I try from vagrantbox.es I get the same error when running vagrant up command. and the error is :

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. 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.vm.boot_timeout") value.

I've looked through same questions and I tried

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

after adding these lines I get login page in my box so its booting and I can run my commands in the GUI interface. but surprisingly I get same error. I thought with myself maybe its because the guest OS couldn't login and I add these lines to my vagrant file

config.ssh.username   = "vagrant"
 config.ssh.password   = "vagrant"
 config.ssh.insert_key = "true"

but I get this error

There are errors in the configuration of this machine. Please fix
the following errors and try again:

SSH:
* The following settings shouldn't exist: insert_key, password

and actually I'm screwed and I don't know what else should I do .

Upvotes: 4

Views: 4450

Answers (2)

Hamid Naghipour
Hamid Naghipour

Reputation: 3625

go to in virtual box and stop the run connection. click on start and wait for login with user and pass: vagrant. inside of that write this command:

sudo vim /etc/systemd/system/network-online.targets.wants/networking.service

And changing the following line at the end of the file:

TimeoutStartSec=5min

to:

TimeoutStartSec=30sec

I have then rebooted the system and it works fine.

Upvotes: 1

Majid Abdolhosseini
Majid Abdolhosseini

Reputation: 2301

I upgraded my vagrant to 1.7.2 and my problem is solved now. but I don't see my box running in virtualbox interface . after all I can now ssh to my box and there is no problem.

Upvotes: 0

Related Questions