Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

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

pnpk
sencorp
幼稚園・保育園向けインターネット写真サービス「はいチーズ!」を提供しています。
https://sencorp.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした