kazu22002の技術覚書

PHPer, Golang, AWS エンジニアの日々

vagrantで起動時にエラーが出た時の対処

vagrantを起動しようとしてみたらなんか動かなかったので、windows10にしていたのでバージョンが影響かと思い、いろいろやってみました。

エラーの内容

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.

ひたすらタイムアウトが出てくる。わからなかったのでアップデートしてみる。

virtualboxのアップデート

virtualbox5.0を入れてみた。

Downloads – Oracle VM VirtualBox

アップデートしてみたら別なエラー変わった。

Vagrant has detected that you have a version of VirtualBox installed
that is not supported. Please install one of the supported versions
listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3

virtualboxのバージョンを上げすぎたみたい。これは上げちゃいけなかったみたいだと思い、4.3に下げてみると前のエラーに戻った。

別な理由見たい。

virtualboxでコンソールが開くかみてみる。

virtualboxでログインできるかやってみる。ダブルクリックでコンソールが起動するのだがエラーがでてきた。

なんかこれが原因っぽい気がします。

検索してみると、これだと思える記事を見つけました。

d.hatena.ne.jp

同じエラーが出ているので、これっぽいです。

BIOSの設定で仮想化支援機構が有効になっていないため、有効化する必要があるみたいです。

とりあえずBIOSの設定画面を起動させます

DELLのx250を使用していますが、どうやってBIOSの設定画面を開けばいいのかわからない。。。

BIOS起動

ThinkPad BIOS設定画面にいけない → 10分後に解決
korya-sugoi.com

やっぱり検索すればなんでも出てくるもんですね。ありがたい。

F1を連打と書いてあるのに、押しっぱなしにしてずっと起動しなかったのは私のミスです。

ちゃんと設定を変更し、完了したので、vagrant起動してみた。

vagrant起動

vagrant up

起動できたー。。。

というわけで、vagrantを活用してみるぞ。。。