Vagrant: Virtualbox 5.1.20 regression - vboxsf failure - Vagrant was unable to mount VirtualBox shared folders

Created on 20 Apr 2017  ยท  9Comments  ยท  Source: hashicorp/vagrant

Vagrant version

1.9.3

Host operating system

Win7

Guest operating system

RHEL 6.6

Debug output

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

The error output from the command was:

mount: Protocol error

References

It's a Virtualbox 5.1.20 regression:

Workaround

ln -sf /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

providevirtualbox upstream

Most helpful comment

you just need to install vagrant-vbguest plugin:
vagrant plugin install vagrant-vbguest

All 9 comments

Just updated and I'm seeing similar issue with 5.1.20 using:

Vagrant version

1.9.2

Host operating system

macOS Sierra

Guest operating system

CentOS 7.3

Debug output

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 home_vagrant_.m2 /home/vagrant/.m2

The error output from the command was:

mount: wrong fs type, bad option, bad superblock on home_vagrant_.m2

This is an upstream issue as identified in the virtuabox ticket linked in this issues description. It also looks like the latest guest additions fixes the problem: https://www.virtualbox.org/ticket/16670#comment:4

Cheers!

There's a fix for most debian-based OSs:

ln -sf /usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

I tried the suggestion from https://www.virtualbox.org/ticket/16670#comment:3, installing the latest test build. Then, I rebuilt the Vagrant box (ubuntu/xenial64), but getting the same mount error.

Can confirm the command

ln -sf /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

Also fixed CentOS/7 VM on Vagrant 1.9.4, Virtualbox 5.1.20.

Installing the latest GuestAdditions did not resolve the issue. The symlink did.

Can confirm for Ubuntu 16.04, VirtualBox 5.1.20, Vagrant 1.9.4: symlink has resolved the issue.

you just need to install vagrant-vbguest plugin:
vagrant plugin install vagrant-vbguest

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings