久しぶりにvagrant upするとエラーが発生!?
Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.
Fatal error: local() encountered an error (return code 1) while executing 'vagrant provision'
Aborting.
どんなエラーが発生したのか確認するために、'vagrant provision'を実行
Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.
vagrant reload
を実行するとさらにエラーが出た
[default] GuestAdditions versions on your host (5.1.26) and guest (4.2.14) do not match.
...
An error occurred during installation of VirtualBox Guest Additions 5.1.26. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
どうやらホストとゲストでGuestAdditionsのバージョンが違うからっぽい。
そういえばVirtualBoxのバージョンを最新にしたおぼえあり。。。
Vagrant側のGuestAdditionsのバージョンをあげればいけるっぽいからVirtualBoxと同じバージョンのGuestAdditionsのISOを探す
http://download.virtualbox.org/virtualbox/
あった↓
http://download.virtualbox.org/virtualbox/5.1.26/VBoxGuestAdditions_5.1.26.iso
ゲスト側を更新してみる
$ vagrant ssh
$ wget http://download.virtualbox.org/virtualbox/5.1.26/VBoxGuestAdditions_5.1.26.iso
$ sudo mkdir /VBoxGuestAdditions
$ sudo mount -o loop,ro VBoxGuestAdditions_5.1.26.iso /VBoxGuestAdditions
$ sudo sh /VBoxGuestAdditions/VBoxLinuxAdditions.run
$ rm VBoxGuestAdditions_5.1.26.iso
$ sudo umount /VBoxGuestAdditions
$ sudo rmdir /VBoxGuestAdditions
$ exit
※やり方はほぼここそのまま。
そしてvagrantをリロード
vagrant reload
いけたっぽい。