vagrant upでunable to mount VirtualBox shared folders.

雑学

備忘録です。
vargrant upで以下のメッセージが出力されました。

Vagrant was unable to mount VirtualBox shared folders.

ログは以下

> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-6.8' version '2.3.4' is up to date...
   (略)
==> default: Mounting shared folders...
    default: /vagrant => C:/XXX/XXX/XXX
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=500,gid=500 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

以下のページを参考にしました。
vagrantのshared folderのmountに失敗してしまった場合

$ vagrant plugin install vagrant-vbguest
$ vagrant vbguest

と実行で対処。別のエラーが出ましたが、それは別の記事にて。

参考リンク