Mounting failed with the error no such device virtualbox

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/myf...

You’re using share folders, so you need to install VirtualBox 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"

Maybe you’re just missing the kernel header files.

VM

Inside VM, you should 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.

    • Debian: sudo 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

Building the main Guest Additions module

If above didn’t work, here are more sophisticated steps to fix it. This assumes that you’ve already VBoxGuestAdditions installed (as shown above).

The most common reason why mounting shared folder doesn’t work may related to building Guest Additions module which failed. If in /var/log/vboxadd-install.log you’ve the following error:

The headers for the current running kernel were not found.

this means either you didn’t install kernel sources, or they cannot be found.

If you installed them already as instructed above, run this command:

$ sudo sh -x /opt/VBoxGuestAdditions-5.0.16/init/vboxadd setup 2>&1 | grep KERN
+ KERN_VER=2.6.32-573.18.1.el6.x86_64
+ KERN_DIR=/lib/modules/2.6.32-573.18.1.el6.x86_64/build

So basically vboxadd script is expecting your kernel sources to be available at the following dir:

ls -la /lib/modules/$(uname -r)/build

Check if the kernel dir exists (symbolic link points to the existing folder). If it’s not, please install them to the right folder (e.g. in /usr/src/kernels).

So vboxadd script can enter your kernel source directory and run make kernelrelease, get the value and compare with your current kernel version.

Here is the logic:

KERN_VER=`uname -r`
KERN_DIR="/lib/modules/$KERN_VER/build"
if [ -d "$KERN_DIR" ]; then
    KERN_REL=`make -sC $KERN_DIR --no-print-directory kernelrelease 2>/dev/null || true`
    if [ -z "$KERN_REL" -o "x$KERN_REL" = "x$KERN_VER" ]; then
        return 0
    fi
fi

If the kernel version doesn’t match with the sources, maybe you’ve to upgrade your Linux kernel (in case the sources are newer than your kernel).

CentOS

Try:

vagrant plugin install vagrant-vbguest vagrant vbgues

If won’t work, try the following manual steps for CentOS:

$ sudo yum update
$ sudo yum install kernel-$(uname -r) kernel-devel kernel-headers # or: reinstall
$ rpm -qf /lib/modules/$(uname -r)/build
kernel-2.6.32-573.18.1.el6.x86_64
$ ls -la /lib/modules/$(uname -r)/build
$ sudo reboot # and re-login
$ sudo ln -sv /usr/src/kernels/$(uname -r) /lib/modules/$(uname -r)/build
$ sudo /opt/VBoxGuestAdditions-*/init/vboxadd setup

Содержание

  1. Getting /sbin/mount.vboxsf: mounting failed with the error: No such device #4
  2. Comments
  3. virtualbox.org
  4. Shared folder Mounting failed : No Such Device
  5. Shared folder Mounting failed : No Such Device
  6. Re: Shared folder Mounting failed : No Such Device
  7. Re: Shared folder Mounting failed : No Such Device
  8. Re: Shared folder Mounting failed : No Such Device
  9. Re: Shared folder Mounting failed : No Such Device
  10. Re: Shared folder Mounting failed : No Such Device
  11. Re: Shared folder Mounting failed : No Such Device
  12. Re: Shared folder Mounting failed : No Such Device
  13. Re: Shared folder Mounting failed : No Such Device
  14. Re: Shared folder Mounting failed : No Such Device
  15. Re: Shared folder Mounting failed : No Such Device
  16. Re: Shared folder Mounting failed : No Such Device
  17. Re: Shared folder Mounting failed : No Such Device
  18. Virtualbox VM Ubuntu 18.04 failure mounting shared folder — no such device or address
  19. 3 Answers 3
  20. virtualbox.org
  21. Shared folder Mounting failed : No Such Device
  22. Shared folder Mounting failed : No Such Device
  23. Re: Shared folder Mounting failed : No Such Device
  24. Re: Shared folder Mounting failed : No Such Device
  25. Re: Shared folder Mounting failed : No Such Device
  26. Re: Shared folder Mounting failed : No Such Device
  27. Re: Shared folder Mounting failed : No Such Device
  28. Re: Shared folder Mounting failed : No Such Device
  29. Re: Shared folder Mounting failed : No Such Device
  30. Re: Shared folder Mounting failed : No Such Device
  31. Re: Shared folder Mounting failed : No Such Device
  32. Re: Shared folder Mounting failed : No Such Device
  33. Re: Shared folder Mounting failed : No Such Device
  34. Re: Shared folder Mounting failed : No Such Device

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

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

The text was updated successfully, but these errors were encountered:

ran into a similar issue myself.

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

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

Went for a plugin:
vagrant vbguest plugin

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

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.

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

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

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

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

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.

Источник

virtualbox.org

End user forums for VirtualBox

  • Board indexGeneralVirtualBox on Windows Hosts
  • Change font size
  • Print view
  • FAQ
  • Login

Shared folder Mounting failed : No Such Device

by neilghosh » 24. Aug 2010, 20:42

I am running Ubuntu 10.04 on the latest Virtual Box.
I have installed VBoxAdditions and created a shared folder D:dev as the name «dev» in settings

But while mounting inside linux terminal I get following error
please help

Created a folder /home/neil/d

sudo mount.vboxsf dev /home/neil/d

mounting failed with the error : No Such Device

Re: Shared folder Mounting failed : No Such Device

by Sasquatch » 24. Aug 2010, 20:49

Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we’re talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 11:54

Re: Shared folder Mounting failed : No Such Device

by Martin » 25. Aug 2010, 13:30

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 25. Aug 2010, 14:30

You should first install guest additions in order to use the shared folders.

And that’s most of the time my problem; getting guest additions to install completely and correctly under some distros such as Fedora or Ubuntu Studio. And of course I have done everything said in «HOWTO: Install Linux Guest Additions» step by step, but I get this message in the log file: » Makefile:23: *** Error: unable to find the sources of your current linux kernel. Specify KERN_DIR= and run Make again.. Stop.»

Any idea how to fix the problem?

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 20:21

Yes Martin , I tried with «dev» and other names , same error .

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 20:22

Pyruzan wrote: You should first install guest additions in order to use the shared folders.

And that’s most of the time my problem; getting guest additions to install completely and correctly under some distros such as Fedora or Ubuntu Studio. And of course I have done everything said in «HOWTO: Install Linux Guest Additions» step by step, but I get this message in the log file: » Makefile:23: *** Error: unable to find the sources of your current linux kernel. Specify KERN_DIR= and run Make again.. Stop.»

Any idea how to fix the problem?

Whenever I install guest additions it replaces the same . SO I think it is installed properly

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 25. Aug 2010, 22:18

What is the output when you run VitualBox GAs in Termianl?

If you got this like me: «Building VirtualBox Guest Additions kernel modules . fail!» then it doesn’t matter how many times you repeat that, neither the visuals and full screen mode nor the shared folders work.

But if that part goes right then there should be no problem.

I myself create two folders on the guest desktop named «Pyruzan» and «Downloads», then I will go to settings of the VM and select my desired 2 shared folders from host and name them «Pyruzan» and «Downloads». Then simply paste these two lines in Terminal and enter:

Code: Select all Expand viewCollapse view sudo mount -t vboxsf -o uid=1000,gid=1000 Pyruzan /home/pyruzan/Desktop/Pyruzan &&
sudo mount -t vboxsf -o uid=1000,gid=1000 Downloads /home/pyruzan/Desktop/Downloads

Piece of cake, but as I said before my problem is to get GAs installed correctly .

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 26. Aug 2010, 12:35

And finally, I figured out what the problem is.

All these difficulties come up just because this howto: «HOWTO: Install Linux Guest Additions + Xorg config» tells you to go the long painful way instead of easy simple one!

The problem is in the following line:
Code: Select all Expand viewCollapse view sudo apt-get install build-essential linux-headers-generic
where the latest kernel headers that you receive probably don’t match with the version of your current kernel, hence VB GAs’ kernel modules can’t be installed correctly.
Yeah, I know, it says first update your distro, but many users don’t have such a bandwidth to download about 200MB of packages in a couple of minutes!

Here is the easy simple way without the need of updating your whole ubuntu:
first run this command to get your current kernel version:
Code: Select all Expand viewCollapse view uname -r
then this:
Code: Select all Expand viewCollapse view sudo apt-get install linux-headers-`uname -r`
and if needed (probably not):
Code: Select all Expand viewCollapse view sudo apt-get install build-essential

That’s it, you’re all good to go with installing VB GAs without any problem.

And by the way, VirtualBox Rocks, it’s the best out there and also FREE.

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 26. Aug 2010, 18:58

I had to create a new Hard DIsk with new Ubuntu installation because I has some urgent work.
Anyway thanks for your response .Will keep these in mind when I face the issue next time.

Anyway Love Oracle Virtual Box !

Re: Shared folder Mounting failed : No Such Device

by Sasquatch » 28. Aug 2010, 00:04

Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we’re talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.

Re: Shared folder Mounting failed : No Such Device

by marciogreison » 18. Nov 2010, 01:58

Hello, I am using as host the seventh and windows as guest Debian lenny, and also had this same problem to access a share, but after examining the problem a little more and with your help, I managed to solve by downloading the headers kernel «linux-headers-*» and reinstalling the «guest additions», now the command: mount-s . vboxsf worked ..

Re: Shared folder Mounting failed : No Such Device

by peab » 18. Nov 2010, 15:15

Источник

Virtualbox VM Ubuntu 18.04 failure mounting shared folder — no such device or address

I am running Virtualbox 5.1.34 — I have many VMs where mounting shared folder is not a problem. My host machine is a very-capable Dell workstation running Centos 7.

I created a VM from ubuntu-18.04.3-desktop-amd64.iso, the install went fine, I mounted the proper GuestAdditions ISO and installed it, it appeared to be successful.

I have created the shared folder in the Virtualbox control panel and corresponding mount point folder on the VM, both named «v-host» (I’ve done this many-many times) I shut down and restarted the VM.

/sbin/mount.vboxsf: mounting failed withe error: No such device or address

I have three Ubuntu 18.04-server VMs (no GUI) that do not have this problem — I installed GuestAdditions, rebooted them and mounting the shared folder works fine.

I also have an Ubuntu 16.04 desktop where shared folder mount works as well. But I can’t get 18.04 to work.

3 Answers 3

Virtualbox 5.1 is too old for modern Linux distributives. It has only support for kernel 4.17. Ubuntu 18.04.3 Desktop has 5.0 kernel.

But you can install 4.15 kernel in any Ubuntu 18.04 from built in repositories. Or install Ubuntu 18.04.1 Desktop and update it (by default kernel did not upgrades for newer versions).

Ubuntu in a VirtualBox Guest VM
Installing guest additions

before installing the Guest Additions
dkms must be installed in the Ubuntu guest OS .

My suspicion is that linux distros with kernel version 5 do not play nice with Virtualbox version 5.1.34. Perhaps they do with Virtualbox 6 but I do not have authorization to upgrade Virtualbox on the system in question.

Ubuntu 16.04 desktop has kernel version 4.15 and has no problem installing guest additions. Ubuntu 18.04 and Mint 19.3, both with kernel version 5, report the same error in /var/log/vboxadd-install.log

It appears that the argument list for a macro has changed.

Источник

virtualbox.org

End user forums for VirtualBox

  • Board indexGeneralVirtualBox on Windows Hosts
  • Change font size
  • Print view
  • FAQ
  • Login

Shared folder Mounting failed : No Such Device

by neilghosh » 24. Aug 2010, 20:42

I am running Ubuntu 10.04 on the latest Virtual Box.
I have installed VBoxAdditions and created a shared folder D:dev as the name «dev» in settings

But while mounting inside linux terminal I get following error
please help

Created a folder /home/neil/d

sudo mount.vboxsf dev /home/neil/d

mounting failed with the error : No Such Device

Re: Shared folder Mounting failed : No Such Device

by Sasquatch » 24. Aug 2010, 20:49

Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we’re talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 11:54

Re: Shared folder Mounting failed : No Such Device

by Martin » 25. Aug 2010, 13:30

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 25. Aug 2010, 14:30

You should first install guest additions in order to use the shared folders.

And that’s most of the time my problem; getting guest additions to install completely and correctly under some distros such as Fedora or Ubuntu Studio. And of course I have done everything said in «HOWTO: Install Linux Guest Additions» step by step, but I get this message in the log file: » Makefile:23: *** Error: unable to find the sources of your current linux kernel. Specify KERN_DIR= and run Make again.. Stop.»

Any idea how to fix the problem?

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 20:21

Yes Martin , I tried with «dev» and other names , same error .

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 25. Aug 2010, 20:22

Pyruzan wrote: You should first install guest additions in order to use the shared folders.

And that’s most of the time my problem; getting guest additions to install completely and correctly under some distros such as Fedora or Ubuntu Studio. And of course I have done everything said in «HOWTO: Install Linux Guest Additions» step by step, but I get this message in the log file: » Makefile:23: *** Error: unable to find the sources of your current linux kernel. Specify KERN_DIR= and run Make again.. Stop.»

Any idea how to fix the problem?

Whenever I install guest additions it replaces the same . SO I think it is installed properly

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 25. Aug 2010, 22:18

What is the output when you run VitualBox GAs in Termianl?

If you got this like me: «Building VirtualBox Guest Additions kernel modules . fail!» then it doesn’t matter how many times you repeat that, neither the visuals and full screen mode nor the shared folders work.

But if that part goes right then there should be no problem.

I myself create two folders on the guest desktop named «Pyruzan» and «Downloads», then I will go to settings of the VM and select my desired 2 shared folders from host and name them «Pyruzan» and «Downloads». Then simply paste these two lines in Terminal and enter:

Code: Select all Expand viewCollapse view sudo mount -t vboxsf -o uid=1000,gid=1000 Pyruzan /home/pyruzan/Desktop/Pyruzan &&
sudo mount -t vboxsf -o uid=1000,gid=1000 Downloads /home/pyruzan/Desktop/Downloads

Piece of cake, but as I said before my problem is to get GAs installed correctly .

Re: Shared folder Mounting failed : No Such Device

by Pyruzan » 26. Aug 2010, 12:35

And finally, I figured out what the problem is.

All these difficulties come up just because this howto: «HOWTO: Install Linux Guest Additions + Xorg config» tells you to go the long painful way instead of easy simple one!

The problem is in the following line:
Code: Select all Expand viewCollapse view sudo apt-get install build-essential linux-headers-generic
where the latest kernel headers that you receive probably don’t match with the version of your current kernel, hence VB GAs’ kernel modules can’t be installed correctly.
Yeah, I know, it says first update your distro, but many users don’t have such a bandwidth to download about 200MB of packages in a couple of minutes!

Here is the easy simple way without the need of updating your whole ubuntu:
first run this command to get your current kernel version:
Code: Select all Expand viewCollapse view uname -r
then this:
Code: Select all Expand viewCollapse view sudo apt-get install linux-headers-`uname -r`
and if needed (probably not):
Code: Select all Expand viewCollapse view sudo apt-get install build-essential

That’s it, you’re all good to go with installing VB GAs without any problem.

And by the way, VirtualBox Rocks, it’s the best out there and also FREE.

Re: Shared folder Mounting failed : No Such Device

by neilghosh » 26. Aug 2010, 18:58

I had to create a new Hard DIsk with new Ubuntu installation because I has some urgent work.
Anyway thanks for your response .Will keep these in mind when I face the issue next time.

Anyway Love Oracle Virtual Box !

Re: Shared folder Mounting failed : No Such Device

by Sasquatch » 28. Aug 2010, 00:04

Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we’re talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.

Re: Shared folder Mounting failed : No Such Device

by marciogreison » 18. Nov 2010, 01:58

Hello, I am using as host the seventh and windows as guest Debian lenny, and also had this same problem to access a share, but after examining the problem a little more and with your help, I managed to solve by downloading the headers kernel «linux-headers-*» and reinstalling the «guest additions», now the command: mount-s . vboxsf worked ..

Re: Shared folder Mounting failed : No Such Device

by peab » 18. Nov 2010, 15:15

Источник

I’m running Debian 9 as Host and I installed correctly Windows 7 as guest by using Oracle VirtualBox (v. 5.2.6); both the OSs work fine and I need to have a folder shared between those 2 operative systems.

In order to be able to get this, I followed these steps:

  1. GuestAddition installation, by running, as super-user:

    apt-get install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)

  2. Creating the candidate folder /home/quant/Scrivania/VirtualBox/Data by modifying the Oracle VirtualBox Manager settings (Shared Folders);

  3. mounting the device by running:

    mount -t vboxsf Data /home/quant/Scrivania/VirtualBox/Data/

At the point (3), I got the following error message in the terminal:

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

It seems like the folder does not exist although I manually create the local folder and set it as shared folder in the VirtualBox manager.

Someone could suggest a solution?

Hope I has been clear when I asked the question. Thanks you all in advice!

asked Feb 25, 2018 at 22:50

Quant.Pi's user avatar

1

Your error: /sbin/mount.vboxsf: mounting failed with the error: No such device could be caused because you are mounting the SF with the same name for the share and mount point. They should be different (i.e share is called ~/share and mount point ~/host) You will also need to make sure you have followed these steps correctly:

  • Create a folder on the Host computer (ubuntu) that you would like to share, for example ~/share
  • Boot the Guest operating system in VirtualBox.
  • Select Devices -> Shared Folders…
  • Choose the ‘Add’ button.
  • Select ~/share
  • Optionally select the ‘Make permanent’ option

After you have completed that process, open your terminal on the host and run:

sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) /home/quant/Scrivania/VirtualBox/Data ~/host

(/home/quant/Scrivania/VirtualBox/Data and ~/host may have to be reversed or changed to the appropriate names)
If that step completes successfully on your Windows guest you should be able to run:

net use x: \vboxsvr[whatever your share folder's name is]

Keep your shared folder name simple such as ~/Data or ~/share instead of /home/quant/Scrivania/VirtualBox/Data as that may be another source for your issue. Good Luck!

answered Feb 25, 2018 at 23:44

kemotep's user avatar

kemotepkemotep

4,9507 gold badges16 silver badges34 bronze badges

I simply solved 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.

Rui F Ribeiro's user avatar

Rui F Ribeiro

54.8k26 gold badges144 silver badges221 bronze badges

answered Mar 4, 2018 at 17:18

Quant.Pi's user avatar

Quant.PiQuant.Pi

413 silver badges8 bronze badges

I’m attempting to mount a share in a guest OS in VirtualBox:

$ mount -t vboxsf share /mnt/share
/sbin/mount.vboxsf: mounting failed with the error: No such device

If I click the folder icon in the corner, and click «Shared Folders Settings…», I see: «share» «/Users/me/tmp/vm-transfer» «» «Full», and if I double click the row:

Folder Path: /Users/me/tmp/vm-transfer

Folder Name: share

(unchecked) Read-only

(unchecked) Auto-mount

(unchecked) Make Permanent

The guest has the guest extensions installed:

$ lsmod
Module         Size  Used by
vboxvideo      1838  1
vboxguest    163929  1

asked Mar 5, 2014 at 22:32

Thanatos's user avatar

Try modprobe vboxsf before trying to mount the share.

answered Jul 2, 2014 at 22:06

Khaelex's user avatar

KhaelexKhaelex

2111 silver badge5 bronze badges

I’m leaving the very useful answer from @user287782 marked as the accepted answer, because it’s the root of the problem. In my case, I’m using Gentoo, and on Gentoo, the «VirtualBox guest additions» install themselves as an init.d script, so they can be started with:

/etc/init.d/virtualbox-guest-additions start

Or better,

eselect rc start virtualbox-guest-additions

To make this happen automatically,

eselect rc add virtualbox-guest-additions default

Community's user avatar

answered Jul 2, 2014 at 22:36

Thanatos's user avatar

ThanatosThanatos

2,3524 gold badges24 silver badges34 bronze badges

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox

  2. Right-click your VM, then click Settings

  3. Go to Shared Folders section

  4. Add a new shared folder

  5. On Add Share prompt, select the Folder Path in your host that you want to be accessible inside your VM.

  6. In the Folder Name field, type shared

  7. Uncheck Read-only and Auto-mount, and check Make Permanent

  8. Start your VM

  9. Once your VM is up and running, go to Devices menu -> Insert Guest Additions CD image menu

  10. Use the following command to mount the CD:

sudo mount /dev/cdrom /media/cdrom
  1. Install dependencies for VirtualBox guest additions:
sudo apt-get update
sudo apt-get install build-essential linux-headers-`uname -r`
  1. Run installation script for the guest additions:
sudo /media/cdrom/./VBoxLinuxAdditions.run
  1. Reboot VM
sudo shutdown -r now
  1. Create «shared» directory in your home
mkdir ~/shared
  1. Mount the shared folder from the host to your ~/shared directory
sudo mount -t vboxsf shared ~/shared
  1. The host folder should now be accessible inside the VM.
cd ~/shared

Make the mount folder persistent

This directory mount we just made is temporary and it will disappear on next reboot. To make this permanent, we’ll set it so that it will mount our ~/shared directory on system startup

  1. Edit fstab file in /etc directory
sudo nano /etc/fstab
  1. Add the following line to fstab (separated by tabs) and press Ctrl+O to Save.
shared	/home/<username>/shared	vboxsf	defaults	0	0
  1. Edit modules
sudo nano /etc/modules
  1. Add the following line to /etc/modules and save
vboxsf
  1. Reboot the vm and log-in again
shutdown -r now
  1. Go to your home directory and check to see if the file is highlighted in green.
cd ~
ls

If it is then congratulations! You successfully linked the directory within your vm with your host folder.

Bonus:

How to point apache’s web directory to our folder in the host.

  1. Remove apache’s old html directory (WARNING! Backup your data if necessary)
sudo rm -rf /var/www/html	
  1. Add a symbolic link in its place
sudo ln -s ~/shared /var/www/html

Добрый день,
есть ли какой-нибудь нормальный/извращенный/шаманский способ увидеть содержимое общей папки Virtual Box в AltLinux 6.0? или вообще способ перекинуть информацию на виртуальную машину с AltLinux 6.0?


Записан


Добрый день,
есть ли какой-нибудь нормальный/извращенный/шаманский способ увидеть содержимое общей папки Virtual Box в AltLinux 6.0? или вообще способ перекинуть информацию на виртуальную машину с AltLinux 6.0?

Самый простой способ передачи файлов с Linux в виртуалку — через scp. :)

По поводу использования общих папок написал на http://www.altlinux.org/VirtualBox#.D0.9E.D0.B1.D1.89.D0.B8.D0.B5_.D0.BF.D0.B0.D0.BF.D0.BA.D0.B8:

1. Установите в гостевой операционной системе дополнения гостевой операционной системы и virtualbox-guest-utils:

apt-get install kernel-modules-virtualbox-addition-$(uname -r | cut -d "-" -f2,3) virtualbox-guest-utils2. Добавьте в свойствах виртуальной машины (раздел «Общие папки») папку. Для этого выберите путь и укажите имя папки (по умолчанию используется имя последней папки в указанном пути).
3. В гостевой операционной системе выполните

mount -t vboxsf <имя папки> /mnt4. Общая папка становится доступна в /mnt.


Записан

Андрей Черепанов (cas@)


отказывается =( пишет
reading Package Lists… Done
Building Dependency Tree…Done
Selecting kernel-modules-virtualbox-addition-std-def#4.0.12-alt1.M60P.2.196615.0.M60P.1 for ‘kernel-modules-virtualbox-addition-std-def’
Selecting kernel-modules-virtualbox-addition-std-def#4.0.12-alt1.M60P.2.196615.0.M60P.1 is already the newest version.
E: Couldn’t find package virtualbox-guest-utils

а вот когда я устанавливаю дополнения, я не могу найти файл VBoxLinuxAdditions-x86.run, есть VBoxLinuxAdditions.run и VBoxLinuxAdditions-x86.exe.
а когда я делаю автозапуск пишет что все путем, но Failed на против пункта
Building the main Guest Additions module


Записан


отказывается =( пишет
reading Package Lists… Done
Building Dependency Tree…Done
Selecting kernel-modules-virtualbox-addition-std-def#4.0.12-alt1.M60P.2.196615.0.M60P.1 for ‘kernel-modules-virtualbox-addition-std-def’
Selecting kernel-modules-virtualbox-addition-std-def#4.0.12-alt1.M60P.2.196615.0.M60P.1 is already the newest version.
E: Couldn’t find package virtualbox-guest-utils

Подключайте онлайновые репозитории и ставьте оттуда: http://www.altlinux.org/Install

а вот когда я устанавливаю дополнения, я не могу найти файл VBoxLinuxAdditions-x86.run, есть VBoxLinuxAdditions.run и VBoxLinuxAdditions-x86.exe.
а когда я делаю автозапуск пишет что все путем, но Failed на против пункта
Building the main Guest Additions module

Незачем ставить дополнения из стороннего источника и собирать их. Не занимайтесь самодеятельностью.


Записан

Андрей Черепанов (cas@)


В моем AltLinux’е нет утилиты Synaptic, и пункта «Программное обеспечение» в ALT Linux Control Center тоже нет. А в новом дистрибутиве, правда я установила сервер, вообще нет графической оболочки, только командная строка.

В статье http://www.altlinux.org/Install написано, что править нужно файлы /etc/apt/sources.list.d/*.list
А вот тут: http://sysadmins.ws/viewtopic.php?f=8&t=1236 , что править файл /etc/apt/sources.list

При подключении вот этиx gbitn NOT FOUND.

http://altlinux.mega.kg/pub/distributions/p6/branch/ i586 classic
http://altlinux.mega.kg/pub/distributions/p6/branch/ noarch classic

http://altlinux.org/pub/distributions/ALTLinux/ говорит: 0% Connecting to altlinux.org (194.107.17.137) на этом останавливается и больше не хочет со мной общаться.

rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/p6/branch/ i586 classic
rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/p6/branch/ noarch classic

rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/t6/branch/ i586 classic
rpm http://ftp.altlinux.org/pub/distributions/ALTLinux/t6/branch/ noarch classic

А вот эти подошли. Он чего-то скачал и сказал что все «OK u DONE»

apt-get install kernel-modules-virtualbox-addition-$(uname -r | cut -d "-" -f2,3) virtualbox-guest-utilsЭта команда тоже выполнилась без ошибок, а вот при

mount -t vboxsf <имя папки> /mnt
пишет
/sbin/mount.vboxsf: mounting failed with the error: No such device


Записан


А вот в новом дистрибутиве Altlinux 6.0, который весит 3 с половиной гига было немного по-другому. опять же подошли эти репозитории, другие нет. при этом выдал пару ошибок, но в конечном счете что-то подгрузил.
при выполнении команды

apt-get install kernel-modules-virtualbox-addition-$(uname -r | cut -d "-" -f2,3) virtualbox-guest-utils
много всего скачивал и даже спросил разрешение на что-то. к сожалению повторить команду оказывается не могу, ибо он мне говорит, что все установлено. я согласилась и он еще долго что-то закачивал и распаковывал. но в итоге при

mount -t vboxsf <имя папки> /mntпишет NO such device =((((

Вру, в этом дистрибутиве после перезагрузки все заработало. а вот в моем обрезанном увы =(

« Последнее редактирование: 15.04.2013 13:33:05 от KellyDink »


Записан


mount -t vboxsf <имя папки> /mnt

mount -t vboxsf //vboxsrv/имя_папки /mnt


Записан

Сноси Винду, переходи на Линукс ! :)


не помогло, ответ все тот же =(
/sbin/mount.vboxsf: mounting failed with the error: No such device


Записан


На будущее, Кентавр это два дистрибутива в одном образе: серверный вариант (может быть и без кнопочек — графической среды) и десктоп (с графическим окружением Gnome) — рабочая станция. Остальные (KDesktop, Simply Linux) ориентированы на декстоп, то есть, идут «из коробки» с графическим окружением.

В статье http://www.altlinux.org/Install написано, что править нужно файлы /etc/apt/sources.list.d/*.list
А вот тут: http://sysadmins.ws/viewtopic.php?f=8&t=1236 , что править файл /etc/apt/sources.list

По большому счёту это не принципиально, но считается, что лучше вносить изменения в /etc/apt/sources.list.d/*.list, где есть, например, alt.list, в котором достаточно раскоментировать две строчки (с архитектурой, в вашем случае это i586 — 32-х битный вариант) и обязательно архитектуронезависымый — noarch. Все другие лучше закоментировать, в том числе и источник на болванке — cdrom.

« Последнее редактирование: 15.04.2013 16:00:16 от sb »


Записан


1. Репозитории лучше ставить так:
apt-repo rm all
apt-repo add p6

2. После установки модуля ядра надо его загрузить или просто перезагрузиться.


Записан

Андрей Черепанов (cas@)


1. Репозитории лучше ставить так:
apt-repo rm all
apt-repo add p6

2. После установки модуля ядра надо его загрузить или просто перезагрузиться.

мой altlinux утверждает что не знает такой команды.

а в чем разница между сервером и клиентом? в очередной раз при установке я галочками отметила все возможные графические модули и он меня не спросил сервер мне устанавливать или клиент.
хотя в предыдущий раз, галочки оставила по умолчанию и он меня спросил. но при установке сервера не установил графическую оболочку. ее можно как-то доставить? команды rmp gnome, rmp xorg не помогли =(

а еще кто-нибудь связывался с установкой cryptopro на altlinux? я вроде все пакеты по инструкции установила, тока при попытки запроса сертификата не дал выбрать вообще ни один криптопровайдер. завис на «ожидании».

« Последнее редактирование: 17.04.2013 10:05:46 от KellyDink »


Записан


мой altlinux утверждает что не знает такой команды.

Смотрите http://www.altlinux.org/Su (повышение прав пользователя до рута) либо установите

apt-get update && apt-get install apt-repo


Записан


apt-get install apt-repo
помогло, команды выполнила. ошибки нет.
даже папку подключила! спасибо!

тока с криптопро справиться не могу =(


Записан


тока с криптопро справиться не могу =(

А давайте, наверное, в отдельную тему с этим (наверное, в разное), чтобы всё в кучу не валить :) Там обстоятельно опишите, что нужно получить и что (и как) вы для этого делаете. Может кто чего и подскажет.


Записан



Записан


Понравилась статья? Поделить с друзьями:
  • Mountain 00015 неизвестная ошибка ghost recon breakpoint
  • Mount vboxsf mounting failed with the error no such device vboxsf
  • Mount to nfs server failed rpc error
  • Mount protocol error nfs
  • Mount nfs network error 53