Laravel/Homestead - OSX - Vagrant Connection Timeo

2019-05-11 15:26发布

问题:

Problem

I am attempting to get Laravel Homestead working on my Mac Book Air. I have followed the instruction from http://laravel.com/docs/4.2/homestead but when I vagrant up I get stopped on: default: Warning: Connection timeout. Retrying... After I vagrant up fails because of connection timeout i can not vagrant provision or vagrant reload. I can however vagrant ssh into the machine and I can ping google from the machine. I can also spin up other vagrant boxes on my machine with no problem...

Information:

  • OS: OSX 10.10 (Yosemite)
  • Vagrant: 1.6.5
  • Virtual Box: 4.3.16

I have searched around on the internet and found a few “solutions” that has not worked for me:

  1. Turn on “Hardware Virtualisation”. This is automatically turned on in ant instal based mac computer.

  2. Start VM with v.gui = true. This start the VM with with the server terminal in view. Nothing is throwing any errors. and this did not solve the problem

More Debugging Steps:

  1. Tried just booting up the vagrant box laravel/homestead by running vagrant init laravel/homestead then vagrant up. This still gives the same problem.
  2. I have tried vagrant box laravel/homestead versions 0.1.7, 0.1.8 and 0.1.9(newest) All giving the same problem.

回答1:

Did you let the vagrant output continue after "default: Warning: Connection timeout. Retrying..." Vagrant may actually be retrying the connection. Sounds like you're exiting out when you see that error instead of waiting for vagrant to finish with an actual exit error



回答2:

A year old post and maybe you have solved it, but I was struggling with it recently and just managed to solve it.

I had the same problem everything was configured correctly but there was no way to ping 192.168.10.10.

In my case it seemed that net-tools package wasn't installed in my distro (Archlinux) by default so installing it allowed me to connect.

See the relevant section at Archlinux Wiki.

Hope that helps someone.