vagrant起動時に、こんな感じのエラーが出た場合の対処方法。
稀に自分の環境ではこれが発生するが、稀なので対応方法を忘れて調べるのに時間がかかるのでメモ。
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=1000,gid=1000 vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
対処方法
vagrant上でsudo yum install -y kernel kernel-devel gcc
を実行
vagrantから抜けてvagrant reload
を実行
その他の方法
以下の方法でも解決出来ると聞いたが、こちらは未確認。
次回再発したら試してみたい。
vagrant provision