[Resolved]vagrant shared folder mount failed. Vagrant is unable to mount VirtualBox shared Folders__virtualbox

Source: Internet
Author: User
Tags virtualbox shared folder oracle vm virtualbox vm virtualbox
problem Phenomenon

Open the notebook to the company and start the Vagrant virtual machine. Prompt for the following error

Take a look at the screenshot


Error message:

Vagrant is unable to mount VirtualBox shared folders. This is usually
Because the filesystem "vboxsf" is not available. This filesystem is
Made available via the VirtualBox Guest additions and kernel module.
Please verify which these are guest additions are properly installed in the
Guest. This isn't a bug in vagrant and are usually caused by a faulty
Vagrant Box. For context, the command attempted is:
Mount-t vboxsf-o uid=1001,gid=1001 Work_/work
The error output from the command is:
/sbin/mount.vboxsf:mounting failed with the Error:no such file or directory

Let us translate the following:

Vagrant cannot mount the VirtualBox shared folder because the file system "VBOXSF" is not available.

This file system is obtained through the VirtualBox customer Add kernel module, please confirm that it is installed correctly.

This is not a question of vagrant, but a problem virtualbox caused.

Please try to execute the following command:

Mount-t vboxsf-o uid=1001,gid=1001 Work_/work

The error message for the command output is:

SBIN/MOUNT.VBOXSF: Mount failed: This file or directory could not be found
problem Analysis of this shared folder, you can put the directory of Windows and Linux directory to each other, when the new file under Win, delete, modify and other operations, will automatically sync to the Linu of a directory,
In the native development environment, to write PHP code, can bring a lot of convenience.
In the wrong phenomenon, "this is not a question of vagrant, but a problem caused by VirtualBox"
See this sentence I smiled, vagrant and vitualbox with each other, this began to shake each other? Ha ha
I just thought, where is this shared directory configured? From the Vagrantfile configuration file, see this section of configuration:

# Share An additional folder to the guest VM. The argument is # the ' path on the ' host to the
  actual folder. The second argument is
  # the "Path on" the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # Config.vm.synced_folder '. /data ","/vagrant_data "
  #config. Vm.synced_folder" E:/project/projects/server ","/work/", Owner:" Www-data ", Group: "Www-data"
  #自动同步的目录
  config.vm.synced_folder "d:/project/php/", "/work/", Owner: "Www-data", group : "Www-data"

You can also see this configuration when you open the Oracle VM VirtualBox software:

I tried to turn the automatic mount on. Then reboot, invalid. Replace the new catalog remap, invalid.
problem Reason

Baffled, I once again remembered the wrong phenomenon in the sentence, "This is not vagrant problem, but VirtualBox caused by the problem", perhaps these words are correct.

Along this line of thought, I visited the VirtualBox official website Buglist, found this information



As you can see, it is in 5.1.20 this version of the problem, I looked at the version I use is 5.1.16, even worse than this version of the problem is still low.

The bottom one says that the problem has been fixed in 5.1.22. Solving Method

So, upgrade right now. Download a new version of the installation, restart, sure enough, the problem solved, please look at the screenshot, hint shared directory, Mount success.


The information provided in the thought -error phenomenon, though not credible, has to be believed, at least to provide a direction to solve the problem. Try it with it, it might be miraculous.
If you have questions, communicate in the comments. Thank you, little buddy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.