
Ich beginne mit der Migration von Wamp zur Laravel Homestead Vagrant Box, bin jedoch ratlos, als ich die Box starten wollte. Ich habe alle Assets heruntergeladen und konfiguriert und Vagrant Up ausgeführt, um die Box zu booten. Hier ist jedoch das Ergebnis von 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.
Hier ist das Ergebnis des Vagrant-Halts:
$ 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...
Es scheint, dass das Problem beim Öffnen von SSH liegt. Die Antworten hierhttps://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retryinghat nicht geholfen, obwohl es ein ähnliches Problem zu sein scheint.
Ich verwende Windows 8.1.
Antwort1
Das Timeout der SSH-Verbindung während der Bootphase kann verschiedene Gründe haben, beispielsweise:
- Das System wartet auf eine Benutzerinteraktion (z. B.Die Freigabepartition ist nicht bereit),
sshd
Fehlkonfiguration,- Fehlkonfiguration der Firewall (falls sie nicht lokal ist),
- Nichtübereinstimmung Ihres privaten Schlüssels,
- der Bootvorgang dauert zu lange (versuchen Sie, den Wert zu erhöhen
config.vm.boot_timeout
), - Überprüfen Sie, ob die Virtualisierung im BIOS aktiviert ist (gemäßKommentar).
Um das Problem zu beheben, führen Sie es bitte wie folgt aus:
VAGRANT_LOG=debug vagrant up
Wenn nichts Offensichtliches vorliegt, versuchen Sie, von einem anderen Terminal aus eine Verbindung herzustellen, und zwar über vagrant ssh
oder durch:
vagrant ssh-config > vagrant-ssh; ssh -F vagrant-ssh default
Wenn SSH immer noch fehlschlägt, führen Sie es erneut aus miteine GUI(z.B config.gui = true
).
Ist dies nicht der Fall, prüfen Sie die laufenden Prozesse (z. B. durch: vagrant ssh -c 'pstree -a'
) oder verifizieren Sie Ihre sshd_config
.
Wenn es sich um eine Wegwerf-VM handelt, können Sie destroy
sie immer up
wieder verwenden. Erwägen Sie auch ein Upgrade Ihres Vagrant und Ihrer Virtualbox.