laravel - Vagrant up stuck -


i'm running vagrant up , i'm facing issue seemed 1 @ beginning vagrant stuck connection timeout retrying. i've tried solutions in there, did vagrant destroy, vagrant suspend, vagrant up command doesn't work, have quit , vagrant reload vm working. it's annoying , frustrating.

i'm using vagrant homestead version 0.4.4 @ moment , part of issue works once vm started.

my current system osx el captain.

let me know if need more details.

my vagrantfile:

require 'json' require 'yaml'  vagrantfile_api_version ||= "2" confdir = $confdir ||= file.expand_path("vendor/laravel/homestead", file.dirname(__file__))  homesteadyamlpath = "homestead.yaml" homesteadjsonpath = "homestead.json" afterscriptpath = "after.sh" aliasespath = "aliases"  require file.expand_path(confdir + '/scripts/homestead.rb')  vagrant.configure(vagrantfile_api_version) |config|     if file.exists? aliasespath         config.vm.provision "file", source: aliasespath, destination: "~/.bash_aliases"     end      if file.exists? homesteadyamlpath         homestead.configure(config, yaml::load(file.read(homesteadyamlpath)))     elsif file.exists? homesteadjsonpath         homestead.configure(config, json.parse(file.read(homesteadjsonpath)))     end      if file.exists? afterscriptpath         config.vm.provision "shell", path: afterscriptpath     end end 

command up output when error:

~/projects/credentialsapi (feature/10)$vagrant bringing machine 'default' 'virtualbox' provider... ==> default: checking if box 'laravel/homestead' date... ==> default: newer version of box 'laravel/homestead' available! ==> default: have version '0.4.4'. latest version '0.5.0'. run ==> default: `vagrant box update` update. ==> default: resuming suspended vm... ==> default: booting vm... ==> default: waiting machine boot. may take few minutes...     default: ssh address: 127.0.0.1:2222     default: ssh username: vagrant     default: ssh auth method: private key     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying...     default: warning: remote connection disconnect. retrying... timed out while waiting machine boot. means vagrant unable communicate guest machine within configured ("config.vm.boot_timeout" value) time period.  if above, should able see error(s) vagrant had when attempting connect machine. these errors hints may wrong.  if you're using custom box, make sure networking working , you're able connect machine. common problem networking isn't setup in these boxes. verify authentication configurations setup properly, well.  if box appears booting properly, may want increase timeout ("config.vm.boot_timeout") value. ~/projects/credentialsapi (feature/10)$ 

vagrant ssh-config command output:

~/projects/credentialsapi (development)$vagrant ssh-config host default   hostname 127.0.0.1   user vagrant   port 2204   userknownhostsfile /dev/null   stricthostkeychecking no   passwordauthentication no   identityfile "/users/pabloleone/projects/credentialsapi/.vagrant/machines/default/virtualbox/private_key"   identitiesonly yes   loglevel fatal   forwardagent yes 

first of all, try run vagrant vagrant_log=debug variable debug issue.


if won't help, while it's showing timeout messages, in terminal run: vagrant status see whether vm running correctly or not. or run virtualbox directly gui , check machine state.


if it's running, check whether ssh credentials correct, following command:

vagrant ssh-config 

in order to:

  • check hostname , port (e.g. 127.0.0.1:2222),
  • your private key (identityfile).

also try logging in vm manually by:

vagrant ssh 

or this command (change default proper host above ssh-config command):

vagrant ssh-config > vagrant-ssh && ssh -f vagrant-ssh default 

since works after vagrant reload (so virtualization support in bios enabled), possibly ssh server not started default on resume due issues. should check ssh logs fixing via vagrant reload && vagrant ssh , check whether logs by:

sudo tail /var/log/secure 

if that's case, workaround check whether ssh service run, add following line like:

config.vm.provision :shell, run: "always", path: "scripts/check_ssh_service.sh" 

similar issue: apache doesn't start after vagrant reload


finally check following list possible solutions ssh timeout problem:

  • make sure firewall or antivirus not blocking program (which doubt happen often)
  • give vagrant machine time timeouts happen. if dont have fast pc / mac, vm take while boot ssh ready state, timeouts happen.
  • therefore, first try let vagrant timeout before concluding there fault.
  • if vagrant times out increase timeout limit in vagrant file few min , try again.
  • if still doesnt work, try clean boot vagrant machine through virtualbox interface , enable gui of machine beforehand. if gui doesn't show happening (ie. blackscreen, no text) while booting, vagrant machine has got problems.
  • destroy entire machine through vb interface , reinstall.
  • delete ubuntu image files in vagrant images folder in user folder , redownload , install.
  • do have intel processor supports 64bit hardware virtualisation? google it. if do, make sure there no setting in bios disabling feature.
  • disable hyper-v feature if running windows 7 or 8. google how disable.
  • make sure running through ssh enabled client. use git bash. download: http://git-scm.com/downloads
  • install 32bit version of ubuntu trusty32 or precise32. change version in vagrant file , reinstall vagrant in new directory.
  • make sure using latest vagrant , virtualbox versions.
  • last resorts: format computer, reinstall windows , buy intel core isomething processor.

source: github post @dezinerdudes


see also: ssh timeout - cant connect via ssh no matter what


Comments