LoginSignup
4
5

More than 5 years have passed since last update.

Homesteadでvagrant up時、SSH接続できずにハングアップする (providor=VirtualBox)

Last updated at Posted at 2017-04-19

やったこと

Homesteadを利用して、Laravel開発環境をローカルに構築しようとしてました。
Laravel 5.4 Laravel Homestead

上記を参考にvagrant box追加、yaml設定、vagrant upと進めたところ、vagrant up処理中に下記でエラーになってしまいました。

$ vagrant up

~略~

homestead-7: SSH auth method: private key # ここで止まる

#以下コンソールにエラー出力

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.

調べたこと

調べたところ、下記フォーラムのコメントの部分を行ったところ、解決しました(vagrant upがエラーなく完了する)。
https://laracasts.com/discuss/channels/laravel/homestead-hangs-at-ssh-auth-method-private-key?page=0

"Settings" -> "Network" and choose "Adapter 1" then expand the option by clicking on the arrow and make sure that "Cable Connected" is checked.

とりあえずVirtualBoxのネットワーク設定ということは分かりました。
ただ、Cable Connectedが何を意味してるのかは正しく理解できていないです。
Adapter1=NATなので、外部ネットワークに接続するか否か?みたいなとこなのかな。(擬似的なLANケーブルを指すかどうか、的な)
あとで調べます。

※ 2017/04/20 追記

やはりケーブルに接続するかどうかの設定のようです。
http://vboxmania.net/content/%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E8%A8%AD%E5%AE%9A

ケーブル接続
VirtualBoxはネットワークケーブルの接続状態もエミュレートします。
チェックを付ければケーブルを接続した状態になり、チェックを外せばケーブルを抜いた状態になります。
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5