
Estou começando a migrar do wamp para a caixa vagrant laravel homestead, mas fiquei perplexo quando se tratou de iniciar a caixa. Baixei e configurei todos os ativos e executei o vagrant up para inicializar a caixa, no entanto, aqui está o resultado do vagrant up:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 22 => 2200 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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 you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Aqui está o resultado da parada vagabunda:
$ vagrant halt
==> default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
==> default: Forcing shutdown of VM...
Parece que o problema pode estar abrindo o SSH. As respostas aquihttps://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retryingnão ajudou, embora pareça ser um problema semelhante.
Estou executando o Windows 8.1.
Responder1
O tempo limite da conexão SSH durante a fase de inicialização pode ocorrer por diversos motivos, como:
- sistema espera pela interação do usuário (por exemplopartição de compartilhamento não está pronta),
sshd
configuração incorreta,- configuração incorreta do firewall (caso não seja local),
- incompatibilidade de sua chave privada,
- o processo de inicialização leva muito tempo (tente aumentar
config.vm.boot_timeout
), - verifique se a virtualização está habilitada no BIOS (conformeComente).
Para depurar o problema, execute-o como:
VAGRANT_LOG=debug vagrant up
Se não houver nada óbvio, tente conectar-se a ele de outro terminal, por vagrant ssh
ou por:
vagrant ssh-config > vagrant-ssh; ssh -F vagrant-ssh default
Se o SSH ainda falhar, execute-o novamente comuma GUI(por exemplo config.gui = true
).
Caso contrário, verifique os processos em execução (por exemplo, por vagrant ssh -c 'pstree -a'
:) ou verifique o seu arquivo sshd_config
.
Se for uma VM descartável, você sempre poderá destroy
fazer up
isso novamente. Considere também atualizar seu Vagrant e Virtualbox.