• Register
1 vote
1k views

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

 OR

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

 OR

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

Solution:

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.

Vagrant

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.

VM

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
1 answer 9 views
9 views
Question: What I'm doing wrong? Currently, I am using the VirtualBox with OS X as host and CentOS on the guest VM. In OS X I created folder myfolder, added it as shared folder to the VM, turned on the VM, in CentOS created folder /home/user/myfolder and ... /user/myfolder and have output: /sbin/mount.vboxsf: mounting failed with the error: No such device Can anyone point me in the right direction?
asked Apr 23 munim01 21k points
0 votes
1 answer 12 views
12 views
Problem: I'm using VirtualBox with OS X as host and CentOS on the guest VM. In OS X I created folder myfolder, added it as shared folder to the VM, turned on the VM, in CentOS created folder /home/user/myfolder and typing: sudo mount -t vboxsf myfolder /home/user/myfolder and have output: /sbin/mount.vboxsf: mounting failed with the error: No such device What I'm doing wrong?
asked Apr 23 munim01 21k points
0 votes
1 answer 7 views
7 views
Problem: I'm using VirtualBox with OS X as host and CentOS on the guest VM. In OS X I created folder myfolder, added it as shared folder to the VM, turned on the VM, in CentOS created folder /home/user/myfolder and typing: sudo mount -t vboxsf myfolder /home/user/myfolder and have output: /sbin/mount.vboxsf: mounting failed with the error: No such device What I'm doing wrong?
asked Apr 23 munim01 21k points
0 votes
1 answer 5 views
5 views
Problem: I like to check my pendrive, if it's correctly bootable without rebooting my actual computer. Can I do?
asked Apr 22 ochena 22.1k points
0 votes
1 answer 2 views
2 views
Problem: I'm opening my VM VirtualBox Machine Setting -> Storage -> Adds hard disk -> Cloned.VDI.On the right in the information section I have: Type(format): Normal (VMDK). It's ok? How to fix this error? I have free 110Gb of ROM on my disk
asked 1 day ago sumaiya simi 43.9k points
0 votes
1 answer 2 views
2 views
Problem: When I used vagrant up to boot a VM, I found the following error ox80004005 (Note that I am using Oracle VM Virtualbox for the virtualization) kayan@kayan-VirtualBox:~/vagrant/rpm$ vagrant up Bringing machine 'default' up with ' ... error: VT-x is not available (VERR_VMX_NO_VMX) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 6 views
6 views
Problem: Can anyone know about this? What i have to do about my whatsapp dp? If anyone know then please answer me
asked Mar 21 niyatiry 3.9k points
1 vote
1 answer 11 views
11 views
Problem: I've installed a Ubuntu VM using VirtualBox, but when I start it up the input lag is really noticeable. For example, when I type something there is a noticeable delay before the words show up on the screen. What can I do to reduce this lag? Plese help to fix this issue.
asked Mar 6 Sabbir Hossain 14.6k points
0 votes
2 answers 477 views
477 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 4 views
4 views
Problem: I'm trying to run spyder from anaconda 3.7 on CentOS7. I get the error; libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: Can't open configuration file /home/labs/training/student9/.drirc: No such file or directory. libGL error: No matching ... .so mesa-dri-drivers-17.2.3-8.20171019.el7.x86_64 rpm -qa | grep nvidia return nothing any clue how this problem can solved?
asked Apr 24 ochena 22.1k points