0

環境
Windows 10 Pro
Vagrant 2.2.4
VirtualBox 6.0.4 r128413 (Qt5.6.2)
box: laravel/homestead (virtualbox, 7.1.0)
Vagrantのプラグイン: vagrant-hostmanager(1.8.9 global)
Hyper-Vインストール済み

行ったこと

  • VirtualBoxのバージョンを6に上げた
  • Vagrantを最新版にした
  • Hyper-Vをインストールした

VirtualBoxがバージョン6からHper-Vと共存できるようになったとのことでVirtualBoxとVagrantのバージョンを最新版に上げてHyper-VをインストールしたらSSHの部分でタイムアウトするようになりました。VirtualBoxで見ようにも起動しても画面が見れず、閉じようとすると停止中から進みません。

調べてみるとSSHの鍵があっていない?とのことなのですがVagrantでうまく起動させられない状態で、その上homesteadは通常のVagrantfileと書き方が違うようなのでどのようにすればいいか教えていただきたいです。

ログは以下の通りです。

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' version '7.1.0' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 4040 (guest) => 4040 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
    homestead-7: 27017 (guest) => 27017 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    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.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
3
  • SSH以前に正しく起動できていずにタイムアウトしているように見えます(私も以前リリース直後にHyper-VとVBoxの併用を試してみましたがまともに使えず断念し戻した覚えがあります)。Vagrantfileのvb.guiを用いるなりVBoxのほうからヘッドレスなVMにGUIをアタッチするなりすることができるはずなので起動できているか確かめてみては?
    – hinaloe
    2019年3月4日 7:55
  • すみませんコメントに気づかず回答してしまいました。VBoxなのですがHyper-Vインストール時に仮想環境を起動させようとすると途中で動かなくなった(応答停止ではない)ためVBoxから表示のとこまではいけませんでした。vb.guiのほうは後で確認してみます。
    – kin
    2019年3月4日 8:37
  • vb.guiを追加してみたのですが、現れた画面の左上でカーソル?が数秒明滅した後表示された画面が止まってしまいました。Hyper-Vなしの時は問題なく起動していました。
    – kin
    2019年3月4日 9:13

1 件の回答 1

1

結論から言いますとHype-Vがやはり関係していたようです。

Hyper-Vをアンインストールして再起動してみたらタイムアウトせず問題なく起動しました。
何がエラーになっていたかまではどのログを見るべきかもわからなかったのでわかりませんでした。
Hyper-Vと共存できるようなことを見た気がしましたがまだ完全ではないのかもしれません。

1

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。