geerlingguy/packer-centos-7

vagrantu up crashes with "vboxsf is not available" on Windows 10

kjartab opened this issue · 11 comments

I am running into this issue when running vagrant reload, or vagrant halt + vagrant up.

vagrant destroy + vagrant up solves the issue until it is haltet or reloaded.

Environment:
geerlingguy/centos7 version 1.7
virtualbox 5.1.12 r112440
windows 10

Any idea what is causing this?

It was working previously on the same pc and I'm not really sure what introduced this error; virtualbox, vagrant or the box itself.

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

It could be the guest additions. I just updated the box to use Guest Additions 5.1.14.

Either upgrade VirtualBox to 5.1.14, or try installing vagrant plugin install vagrant-vbguest.

I ran into this same issue and this related issue has a solution using a FixGuestAdditions ruby class in the Vagrantfile to correct the kernel-devel that causes this problem to occur.

@njappboy - Did that solution fix the problem for you?

@geerlingguy Installing vagrant-vbguest solved my problem. But it is of course nicer to have it working out of the box so that you don't have to add plugins to the installation list (Vagrant + Virtualbox).

Awesome, and yeah, it would be nice to not have to install that plugin—however it is impossible for me to identify the version of VirtualBox installed and make the right box version get downloaded. Since the share requires the Guest Additions, and every new version of VirtualBox potentially breaks the older Guest Additions, the best solution is to (a) always update to the newest box version and VirtualBox, and (b) have the vagrant-vbguest plugin installed (just to be safe).

Thanks for the information..i was facing the same issue and it solved my problem too.

Installing plugin didn't solve the problem for me. I did updated everything to latest version.

OS: Windows 10 Enterprise 10.0.16299 (Build 16299)
Virtual Box: 5.2.12 r122591 (Qt5.6.2)
Vagrant: 2.1.2
Plugin: vagrant-vbguest (0.15.2)

Vagrantfile Sync Folder Config
config.vm.synced_folder "vagrant_data", "/vagrant_data"

Output from vagrant up command (copying relevant part only):

==> default: Rsyncing folder: /cygdrive/c/Users/XXX/Documents/XXX/Vagrant/centos-7-ansible/ => /vagrant
==> default: Mounting shared folders...
    default: /vagrant_data => C:/Users/XXX/Documents/XXX/Vagrant/centos-7-ansible/vagrant_data
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_data /vagrant_data

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Please suggest solution.

Thank you. vagrant plugin install vagrant-vbguest worked for me.

Also please try updating to the latest box version (try vagrant box update) if you're using the geerlingguy/centos7 box.

vagrant plugin install vagrant-vbguest it's worked for me

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:

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

home@home-PC MINGW64 /c/vagrant
$ vagrant box update ubuntu/xenial64
The machine with the name 'ubuntu/xenial64' was not found configured for
this Vagrant environment.

home@home-PC MINGW64 /c/vagrant
$ vagrant box update db
==> db: Checking for updates to 'ubuntu/xenial64'
db: Latest installed version: 20181114.0.0
db: Version constraints:
db: Provider: virtualbox
==> db: Box 'ubuntu/xenial64' (v20181114.0.0) is running the latest version.

home@home-PC MINGW64 /c/vagrant
$

======================
Issue not resolved on xenial64