unknown filesystem type 'vboxsf' after vagrant up
Asked Answered
S

5

5

i want to setup environment using vagrant but display error after vagrant up. here is my spec

im using : - OS X Yosemite Version 10.10.5 - VirtualBox vesion 5.2.6 - Vagrant 2.0.1

and this is my Vagrant file

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.network "private_network", ip: "192.168.33.99" 
  config.vm.synced_folder "./", "/vagrant", type:"virtualbox", :owner => 'apache', :group => 'apache', mount_option: ['dmode=777', 'fmode=755']
end

but went i run 'vagrant up' it display error like this

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=48,gid=48 vagrant /vagrant

The error output from the command was:

mount: unknown filesystem type 'vboxsf'

i did run this code

vagrant plugin install vagrant-vbguest
vagrant vbguest

display error message

The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-862.14.4.el7.x86_64
An error occurred during installation of VirtualBox Guest Additions 5.2.6. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Redirecting to /bin/systemctl start vboxadd.service
Job for vboxadd.service failed because the control process exited with error code. See "systemctl status vboxadd.service" and "journalctl -xe" for details.
Unmounting Virtualbox Guest Additions ISO from: /mnt

and this code

vagrant plugin install vagrant-winnfsd

but still didn't work. anyone can help me?

evendo i can go through with vagrant ssh. i can't update any file and folder in vagrant folder.

what should i do

Spiderwort answered 4/12, 2018 at 8:52 Comment(0)
H
4

If you still want use config.vm.box = "centos/7" then do this:

  1. Run command vagrant plugin uninstall vagrant-vbguest
  2. Run command vagrant plugin install vagrant-vbguest --plugin-version 0.21

Alternative Solution:

  1. You just can change config.vm.box = "centos/7" to config.vm.box = "generic/centos7"
  2. Uninstall the plugin using this command vagrant plugin uninstall vagrant-vbguest (If you already downloaded it)
  3. After that run command vagrant up
Herbart answered 2/1, 2021 at 23:57 Comment(0)
G
2

I believe this is a symlink issue that can be resolved by running ln -sf /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf. There is also a ticket about this exact issue found here https://www.virtualbox.org/ticket/16670#comment:3 that seems to be resolved.

Gauche answered 4/12, 2018 at 16:28 Comment(0)
N
1

Documentation about synced folders

By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant.

Just remove this line:

config.vm.synced_folder "./", "/vagrant", type:"virtualbox", :owner => 'apache', :group => 'apache', mount_option: ['dmode=777', 'fmode=755']

I have had the same issue, but removing a similar line all have worked like a charm.

Nostradamus answered 21/11, 2019 at 18:0 Comment(0)
K
0
vagrant plugin install vagrant-vbguest #install plugin
vagrant destroy #clean repos
vagrant up #relaunch

set auto_update to false, if you do NOT want to check the correct additions version when booting this machine

config.vbguest.auto_update = false
Kitchenmaid answered 29/1, 2021 at 16:44 Comment(0)
C
0

Try to use vbguest before loading the machine e after reinstalling the plugin:

vagrant plugin uninstall vagrant-vbguest
vagrant plugin install vagrant-vbguest
vagrant vbguest
vagrant up / vagrant reload
Contraceptive answered 24/8, 2022 at 16:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.