• 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?

7 5 2
3,870 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.

9 7 4
38,600 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
10 6 4
31,120 points

Related questions

0 votes
2 answers 388 views
Problem : Currently I am facing following issue: Failed to open a session for the virtual machine ubuntu. Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT). Result Code: E_FAIL (0x80004005) Component: ConsoleWrap Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 115 views
I'm getting something like this. Can anyone please tell me how to fix this. C:\Users\krush\Documents\ML using Python>pip install pocketsphinx Collecting pocketsphinx Using cached pocketsphinx-0.1.3.zip Building wheels for collected packages: pocketsphinx Running setup.py bdist_wheel for pocketsphinx: started ... ------------------------- Command "C:\Users\krush\Anaconda3\python.exe -u -c "impor
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 18 views
I'm trying to install spaCy using pip install spacy but I'm getting the following error .. I have VS 2015 installed, and I have the following Python install .. 3.5.2 |Anaconda 2.5.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 ... others. This is not a unique problem to this specific library but more generally anytime I try to install Python libraries that need C to build on Windows.
asked Oct 24, 2020 psandprop 2.4k points
1 vote
2 answers 371 views
Problem : I am very new to Ionic, I have recently started working on Ionic but I am facing below error: Runtime Error Uncaught (in promise): Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/stewart/Development/ionic/theWhoZoo/src/pages ... say they do match. import { MyRatingModel } from '../model/myratingModel'; How can I fix above error need Ionic expert help.
asked Apr 22, 2020 stewart 4k points
0 votes
1 answer 11 views
I keep on recieving this error in my php project “failed to open stream: no such file or directory” each time I need to include a php file. What is the best practice to include another php file from a different folder? Is it also possible to include a php file located in a different domain?
asked Oct 12, 2020 azriel 590 points
0 votes
1 answer 208 views
Problem : I am trying to develop some selenium tests which should run with headless firefox but the following error suddenly popped up in my server.log file when I was trying to connect to the webdriver via following command: driver = webdriver.Firefox(firefox_profile = profile, log_path = ... spec as below: python 2.7.12, Firefox: Mozilla Firefox 57.0.3, geckodriver: 0.19.1, selenium: 3.8.0
asked Dec 3, 2019 alecxe 7.5k points
0 votes
1 answer 14 views
I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below: gcc -Wall utilsmodule.c -o Utilc After executing the command, I get this error message: > utilsmodule.c:1:20: fatal error: ... solutions over the internet but the problem still exists. I have no problem with Python.h. I managed to locate the file on my machine.
asked Oct 25, 2020 psandprop 2.4k points
0 votes
1 answer 741 views
Problem : When I am trying to execute jupyter notebook in the virtual environment in my Arch Linux, the below error occurred. “Error executing Jupyter command 'notebook': [Errno 2] No such file or directory” The python version is 3.6, and the jupyter version is 4.3.0 I have researched a lot, but I am just unable to find anything relevant to above issue.
asked Jan 3, 2020 alecxe 7.5k points