66
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2017-08-07

久しぶりに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

いけたっぽい。

66
50
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
66
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?