I'm following the official guide for running Laravel 5.1 on Homestead.
But when I try vagrant up
it hangs up at homestead-7: SSH auth method: private key
and eventually times out with the message:
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 the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
My SSH keys were generated using ssh-keygen -t rsa -C "you@homestead"
.
Can't access the machine through vagrant ssh
, it outputs ssh_exchange_identification: read: Connection reset by peer
.
Tried vagrant destroy
and deleting the ~/.homestead
folder to start again from scratch but same result.
Using Ubuntu 16.04 64-bit, Vagrant 1.8.4 and VirtualBox 5.0.18. Virtualization is enabled in my computer, other boxes boot up without problems.
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.
vagrant halt
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With