LoginSignup
6
4

More than 5 years have passed since last update.

Vagrant was unable to mount VirtualBox shared folders.でvagrantでフォルダがマウント出来ない

Posted at

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

6
4
0

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
6
4