• Register
1 vote

Problem :

I am using the VirtualBox with OS X as host and CentOS on a guest VM.

In OS X I created the folder myfolder, added it as a shared folder to a VM, turned on a VM, in CentOS created folder as /home/user/myfolder and typing as below :

sudo mount -t vboxsf myfolder /home/user/myfolder

But have below output:

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

What am I doing wrong in above scenario?

3.9k points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

My shared folder/clipboard stopped to work for some of the reason (most probably due to a patch installation on the virtualbox machine).

sudo mount -t vboxsf Shared_Folder ~/SF/

Gave me following result:

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

The solution for me was just to stop vboxadd and do the setup after that:

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


Below given was a only solution what worked for me:

Installed the Vagrant plugin: From vagrant-vbguest, which can keep the VirtualBox Guest Additions up to date with the use of below command.

vagrant plugin install vagrant-vbguest


This error was resolved by below command:

yum install gcc kernel-devel make

 Hope above given solutions will help you in resolving your all the errors.

38.6k points
1 vote


My shared folder/clipboard stopped to work for some cause may be due to a patch installation on my virtual machine.

sudo mount -t vboxsf Shared_Folder ~/SF/

Gave following result:

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

I was able to solve this problem to stop vbox add and do a setup after that:

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

we are able to solve this issue by following those steps; first of all install Oracle Virtual Box as follows:

  1. run as super-user nano /etc/apt/sources.list.d/virtualbox.list

  2. paste deb http://download.virtualbox.org/virtualbox/debian stretch contrib and after type ctrl+O and ctrl+X to save and quit respectively

  3. run from the terminal:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -

apt update

apt-get install virtualbox-5.2

apt-get install dkms

After, download the .iso image from the Oracle Repository and choosing the version you need on the basis of your host OS and install GuestAdditions by selecting from the virtual machine window menu

Device > Insert ISO image for GuestAdditions

and follow what suggested by the installation guide. Finally, go through

Devices > Shared Folder

and select the path in which is contained the folder you need to share

After searching internet a lot i got some info regrading this from VirtualBox.org itself. In this new version of Guest Additions it has missed a symlink while installation. It breaks the path of /sbin/mount.vboxsf so that the mount command fails.

Using this command i was able to fix the bug.

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

The normal way to get that done from the link provided by Norbert

sudo mount -t vboxsf [-o OPTIONS] sharename mountpoint

So your command should be

sudo mount -t vboxsf [-o OPTIONS] sharename /media/songs

To mount a shared folder during boot, add the following entry to /etc/fstab:

sharename   /media/songs   vboxsf   defaults  0   0

In case you're using share folders, then you need to install Virtual Box Guest additions inside your virtual machine to support that feature.


If you're using Vagrant (OS X: brew cask install vagrant), run:

vagrant plugin install vagrant-vbguest
vagrant vbguest

In case it fails, check the logs, e.g.

vagrant ssh -c "cat /var/log/vboxadd-install.log"

It can also be happen maybe you're just missing the kernel header files.


Inside VM, you must install Guest Additions, kernel headers and start the service and double check if kernel extension is running.

This depends on the guest operating system, so here are brief steps:

  1. Install kernel include headers (required by VBoxLinuxAdditions).

    • RHEL: sudo apt-get update && sudo apt-get install kernel-devel
    • CentOS: sudo yum update && sudo yum -y install kernel-headers kernel-devel
  2. Install Guest Additions (this depends on the operating system).

    • Ubuntu: sudo apt-get -y install dkms build-essential linux-headers-$(uname -r) virtualbox-guest-additions-iso

      If you can't find it, check by aptitude search virtualbox.

    • Debiansudo apt-get -y install build-essential module-assistant virtualbox-ose-guest-utils

      If you can't find it, check by dpkg -l | grep virtualbox.

    • manually by downloading the iso file inside VM (e.g. wget) and installing it, e.g.

      1. wget http://download.virtualbox.org/virtualbox/5.0.16/VBoxGuestAdditions_5.0.16.iso -P /tmp
      2. sudo mount -o loop /tmp/VBoxGuestAdditions_5.0.16.iso /mnt
      3. sudo sh -x /mnt/VBoxLinuxAdditions.run # --keep

        Extra debug: cd ~/install && sh -x ./install.sh /mnt/VBoxLinuxAdditions.run

  3. Double check that kernel extensions are up and running:

    • sudo modprobe vboxsf
  4. Start/restart the service:

    • manually: sudo /opt/VBoxGuestAdditions*/init/vboxadd setup (add sudo sh -x to debug)
    • Debian: sudo /etc/init.d/vboxadd-service start
    • Fedora: sudo /etc/init.d/vboxdrv setup
    • CentOS: sudo service VBoxService start
31.1k points
edited by