はじめに
vagrant upを行うとエラーが出て起動しなくなった。
解消方法メモ
前提(エラー発生の過程)
- vagrant、visalboxの環境は安定稼働していたため、
updateせず初期インストールからそのままにしていた。 - 突然、vagrant upが動作しなくなった。
エラー発生時の環境
- Windows 10 64bit
- VisalBox バージョン 5.1.22 r115126 (Qt5.6.2)
- Vagrant 1.9.1
エラー内容
VBoxManage.exe: error: Details: code E_FAIL (0x80004005),
component MachineWrap, interface IMachine
検証1:VisalBoxを最新バージョンへ上げてみる
5.1.22 -> 5.2.0へ変更しvagrant up
私のvagrntではVisualBox 5.1系までしかサポートしてしていないようだ。
エラーは変わったが、悪化してしまった。
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:
4.0, 4.1, 4.2, 4.3, 5.0, 5.1
A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.
検証2:vagrantを最新バージョンへ上げてみる
1.9.1 -> 2.0.1へ変更しvagrant up
Vagrantのバージョンを上げたらVisualBox5.2に対応するかも?
思い切ってvagrantもバージョン上げてみました。
↓
起動成功!直りました。
Current machine states:
default running (virtualbox)
偶然解決したので、後付けで原因調査
issues #8501にも同内容が記載されていた。
まとめ
- Vagrant VisualBox両方を最新バージョンへ上げることで解消した。
- 次回からはトライ&エラーをする前にissuesでまず検索しようと思う