LoginSignup
1

More than 5 years have passed since last update.

vagrantで突然「"vboxsf" is not available.」で起動しなくなった場合

Last updated at Posted at 2017-02-25

vagrant reloadやvagrant up で最初に出てきたエラー

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

Process finished with exit code 1

WEBで探るとどうやらカーネルの更新が必要な様子。

以下のサイトを参考にkernelのアップデートを試みる

そしたら今度は、カーネルモジュールを各種ミラーサイトからダウンロードしようとするところで名前解決に失敗

再度WEBで探り、以下のサイトを参考にホストOS側で名前解決するように設定

名前解決できたので、再びカーネルアップデートを行う。

  • 途中はまりかけたこと。

    • VirtualBoxのキャプチャから抜けるボタンを忘れて焦る⇒[右側Ctrl]
    • VirtualBoxの全画面表示から戻れなくなる⇒[右側Ctrl+F]
    • VirtualBoxのBIOS画面の表示⇒起動時にDELETE(※起動途中にF12って出てくるけど、起動する元デバイスの選択。)
  • 適用したカーネル;http://elrepo.org/linux/kernel/el6/x86_64/RPMS/kernel-ml-4.9.11-1.el6.elrepo.x86_64.rpm

カーネルアップデートできたので再度vagrant reload

  • 変わらず同じエラー
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

Process finished with exit code 1

vboxのリビルドしてみる

[root@localhost vagrant]# /etc/init.d/vboxadd setup
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules     [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
/usr/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
                                                           [  OK  ]
  • カーネルアップデート後にホストOSの方の再起動をしていなかったのが悪かった様子。再起動したら、OKでした!

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
1