Help us understand the problem. What is going on with this article?

vagrant up するとGuestAdditions エラーが発生

More than 1 year has passed since last update.

久しぶりに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
※やり方はほぼここそのまま。

https://www.vagrantup.com/docs/virtualbox/boxes.html

そしてvagrantをリロード
vagrant reload

いけたっぽい。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした