Laravel Homestead vagrant up times out

Running Win 10 Pro v 1607, VirtualBox 5.0.30, Vagrant 1.9.1 and Homestead 1.0.1.

I had same issues as described. Vagrant up command would run cleanly but hang at the SSH username: private key message. Reinstalled, checked .yaml file, recreated ssh keys - tried all the usual stuff without success.

Finally working when I changed the network setting in my Virtual Box.

  1. Brought up VirtualBox program with windows UI
  2. Clicked on Network - in the 'Adapter 1' tab, then opened up Advanced
  3. Clicked 'Cable Connected' checkbox
  4. At console $ prompt, vagrant halt
  5. then vagrant up

All then worked as expected. Unticked 'cable connected' and again vagrant up hanged. Reset 'cable connected' and vagrant up running correctly again.

The default settings for importing the base Laravel/Homestead box leaves the 'cable connected' setting unchecked/off

See vagrant issue 7648 for some background

If you don't want to keep ticking the cable connected box, the permanent fix is:

Locating the Vagrantfile file in the Homestead folder (probably its file path is ~/Homestead/Vagrantfile), and adding following to the Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| block fixes issue:

config.vm.provider 'virtualbox' do |vb|
    vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end

With this change to the Vagrantfile vagrant up works on new imported laravel/homestead box


If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.

I had virtualization turned on, but in VirtualBox it showed that no, I turned off Hyper-V and it all worked.


I sometimes hang on vagrant up with the error SSH username: private key

try

vagrant halt vagrant up


If it times out on ssh-key authentication it seems to be a host/guest communication error.

To confirm try ssh [email protected]

If it throws an error or times-out again make sure the virtual machine is shut down completely, by running vagrant halt and using the Virtualbox GUI to confirm this.

Under network I sure my adapter was "Cable Connected" and for my host only adapter I set "allow all" for promiscuis mode.

Virtual box Network settings screen

!Virtual box Network settings screen]2

I then ran vagrant up --provision and there was no wait during the authentication between the two.

After the vagrant provisioner script has run you may now vagrant ssh in