VirtualBox/Vagrantがうまく動かない時にやったこと
バージョンを上げたら、VirtualBox・Vagrantがうまく動かなかったので 試したことをメモっておく。 (Windows環境)
VirtualBoxのバージョンを上げてみる/下げてみる
最新のバージョン
https://www.virtualbox.org/wiki/Downloads
過去のバージョン
https://www.virtualbox.org/wiki/Download_Old_Builds
ダウングレードは、 普通に、古いバージョンのインストーラーを実行してインストールしなおすだけでOK。
Vagrantのバージョンを上げてみる/下げてみるる
最新のバージョン
https://www.vagrantup.com/downloads
過去のバージョン
https://releases.hashicorp.com/vagrant/
変更点
https://github.com/hashicorp/vagrant/blob/v2.2.13/CHANGELOG.md
ダウングレードする場合は、 [プログラムと機能]でアンインストールした後、インストールし直す必要あり。
Boxを最新にしてみる
listで、boxの一覧を確認できる。
> vagrant box list centos/7 (virtualbox, 2004.01)
boxを最新にする場合はupdateを実行。
> vagrant box update
特定のboxのみ更新する場合はボックス名を指定。
> vagrant box update --box ボックス名
共有フォルダ
共有フォルダを利用する場合、Guest Additionsを自動で更新するために、 vagrant-vbguestをインストールする。
> vagrant plugin install vagrant-vbguest
既にインストール済みの場合は最新の状態にしておく。
> vagrant plugin update vagrant-vbguest > vagrant plugin list vagrant-vbguest (0.26.0, global)
下記のコマンドでvbguestの状態を確認できる。
> vagrant vbguest --status [default] GuestAdditions 6.1.16 running --- OK.
エラーになる場合は、
> vagrant vbguest --status [default] No Virtualbox Guest Additions installation found.
vbguestを更新して、再起動。
> vagrant vbguest > vagrant reload