vagrant-reload icon indicating copy to clipboard operation
vagrant-reload copied to clipboard

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

Open mlabour opened this issue 10 years ago • 9 comments

Hi Getting the following error. Please would you recommend a path to resolution? Thank you

Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was:

mount -t vboxsf -o uid=id -u vagrant,gid=getent group vagrant | cut -d: -f3 vagrant /vagrant mount -t vboxsf -o uid=id -u vagrant,gid=id -g vagrant vagrant /vagrant

The error output from the last command was:

stdin: is not a tty /sbin/mount.vboxsf: mounting failed with the error: No such device

mlabour avatar Jul 09 '15 12:07 mlabour

ran into a similar issue myself.

If you haven't already, you may need to rebuild the VirtualBox guest additions:

sudo /etc/init.d/vboxadd setup

Found the above solution here: https://github.com/mitchellh/vagrant/issues/1657

bcolesberry avatar Nov 09 '15 19:11 bcolesberry

cd /opt/VBoxGuestAdditions-*/init  
sudo ./vboxadd setup

This works

4ft35t avatar Jan 26 '16 06:01 4ft35t

Works first time, but fails afterwards. Specially if you need this to work before shell script.

Went for a plugin: vagrant vbguest plugin

a plugin: vbguest

esteban-xrow avatar Apr 21 '16 12:04 esteban-xrow

This may be related to the missing kernel sources in your VM.

See:

So try to install Guest Additions and check the log file for details, e.g. follow these steps and it VBoxLinuxAdditions fails, then check the /var/log/vboxadd-install.log for more details.

kenorb avatar Jun 08 '16 16:06 kenorb

Like @esteban-xrow said, just install Vagrant plugin: vagrant-vbguest, which can keep your VirtualBox Guest Additions up to date.

vagrant plugin install vagrant-vbguest

kiwenlau avatar Jul 03 '16 04:07 kiwenlau

@kiwenlau YES thank you that worked! vagrant plugin install vagrant-vbguest

engineerChick avatar Jul 12 '16 21:07 engineerChick

thx

ehlxr avatar Jul 16 '17 11:07 ehlxr

I was able to resolve this on bento/centos-7.2 by performing the following:

yum update yum install kernel-headers kernel-devel

Then reboot the vagrant, and run the following sudo /opt/VBoxGuestAdditions-*/init/vboxadd setup

joshbranham avatar Aug 09 '17 13:08 joshbranham

So I was fighting with this same issue for quite a while. rcvboxadd was complaining that I did not have kernel-headers installed. I am on CentOS 7 with kernel 3.10.0-957.21.2.el7.x86_64 and with just doing a yum install kernel-headers it was installing the latest of 3.10.0-957.21.3.el7.x86_64 which is a little newer and not matching my current kernel. So I erased the headers with yum and explicitly installed the version that matched my kernel. I also had to reinstall gcc. I then installed my specific kernel version of kernel-devel. With these now matching my kernel version, I then ran /usr/sbin/rcvboxadd setup and it finally built everything correctly and started the service up. After that I mounted my HOST folder to my Linux GUEST with: sudo mount -t vboxsf -o rw,uid=1000,gid=1000 REPOS ~/REPOWIN

REPO is the name of the share in the properties of my VM in the Shared Folders section.

I hope this helps someone else out - I could've probably just updated my kernel to the already installed version of kernel-headers and kernel-devel - but either way, this small victory is a great way to finish off a Friday.

BludGeonT avatar Jul 13 '19 00:07 BludGeonT