
私は Wamp から Laravel Homestead Vagrant Box への移行を開始していますが、Box の起動時に行き詰まっています。すべてのアセットをダウンロードして構成し、Vagrant up を実行して Box を起動しましたが、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.
vagrant halt の結果は次のとおりです。
$ 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...
問題はSSHを開くことにあるようです。答えはここにありますhttps://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retrying同様の問題のようですが、役に立ちませんでした。
Windows 8.1 を実行しています。
答え1
ブートフェーズ中の SSH 接続タイムアウトは、次のようなさまざまな理由で発生する可能性があります。
- システムはユーザーの操作を待ちます(例:共有パーティションの準備ができていません)、
sshd
誤った設定、- ファイアウォールの設定ミス(ローカルでない場合)
- 秘密鍵の不一致、
- 起動プロセスに時間がかかりすぎる( を増やしてみてください
config.vm.boot_timeout
)、 - BIOSで仮想化が有効になっているかどうかを確認します(コメント)。
問題をデバッグするには、次のように実行してください。
VAGRANT_LOG=debug vagrant up
明らかな問題がない場合は、次の方法で別の端末から接続してみてくださいvagrant ssh
。
vagrant ssh-config > vagrant-ssh; ssh -F vagrant-ssh default
SSHがまだ失敗する場合は、次のコマンドで再実行してください。GUI(例config.gui = true
)。
そうでない場合は、実行中のプロセス (例: vagrant ssh -c 'pstree -a'
) を確認するか、 を確認してくださいsshd_config
。
使い捨ての VM であれば、いつでも再利用できますdestroy
。Vagrantup
と Virtualbox のアップグレードも検討してください。