Vagrantで共有フォルダのエラーがでるのでその対応

centos/7 の場合

vbguestのバージョンが「0.29.0」の場合、

> vagrant plugin list
・・・
vagrant-vbguest (0.29.0, global)

centos/7」のboxを指定して、

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder ".", "/vagrant", type:"virtualbox"
end

起動すると、エラーがでる。

> vagrant up
・・・

Stderr from the command:

umount: /mnt: not mounted

一旦、削除。

> vagrant destroy

下記の記事を参考にして、

Vagrant No VirtualBox Guest Additions installation found [Fixed] - DevopsRoles.com
https://www.devopsroles.com/vagrant-no-virtualbox-guest-additions-installation-found-fixed/

「0.21.0」のバージョンをインストール。

> vagrant plugin uninstall vagrant-vbguest
> vagrant plugin install vagrant-vbguest --plugin-version 0.21

> vagrant plugin list
・・・
vagrant-vbguest (0.21.0, global)
  - Version Constraint: 0.21

改めて起動すると、エラーはでなくなった。

> vagrant up

問題なく共有されている。

> vagrant vbguest --status
[default] GuestAdditions 6.1.16 running --- OK.

bento/centos-7.8 の場合

bento/centos-7.8の場合、

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "bento/centos-7.8"
  config.vm.synced_folder ".", "/vagrant", type:"virtualbox"
end

vbguestのバージョンが「0.29.0」だと、
起動時に下記のようなエラーがでるが、

> vagrant up
・・・

The error output from the command was:

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

vbguestのバージョンを、同じように「0.21.0」にしたらエラーはでなくなった。