Laravel homestead stuck on VM login

2020-08-09 08:02发布

问题:

Ill try to use laravel homestead vagrant box. When I do vagrant up it stucks on default: Warning: Connection refused. Retrying...

My intel virtualization technology is enabled. I've enabled the GUI and it shows:

I've got Vagrant 1.6.5 and VirtualBox 4.3.16.

Anybody has encountered this problem as well...?

回答1:

Default login and password is just vagrant.



回答2:

A few things to try:

  1. First, make sure your virtual machine is completely shut down, and relaunch Virtual Box.

  2. Make sure "PAE/NX" is enabled, which you can do in the processor tab of the Virtual Box GUI. A description of how to do that is here.

  3. When vagrant up gets stuck at Warning: Connection refused. Retrying..., try entering vagrant as both the username and password in the GUI and see if it will continue the loading process.

  4. See related StackOverflow questions Vagrant stuck connection timeout retrying and Vagrant up timeout.



回答3:

Also just in case check if the network adapter #1 is cable connected. That fixed the issue for me (ie: on VirtualBox > box settings > Network > Adapter 1 > Advanced > tick "Cable Connected). Or better, add this to your vagrant file:

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


回答4:

You can simply type vagrant ssh on the command line / terminal of the host machine (Assuming you've already fired up the machine with vagrant up). To quote the vagrantup.com website:

This command will drop you into a full-fledged SSH session