[已解决]vagrant共享文件夹挂载失败.Vagrant was unable to mount VirtualBox shared folders
来源:互联网 发布:云南映象知乎 编辑:程序博客网 时间:2024/06/06 04:45
问题现象
到公司打开笔记本,启动vagrant 虚拟机. 提示以下错误
请看截图
错误信息:
Vagrant was 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 that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1001,gid=1001 work_ /work
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such file or directory
让我们来翻译下:
vagrant 无法装载VirtualBox的共享文件夹,因为文件系统"vboxsf"无法使用.
这个文件系统通过VirtualBox客户添加内核模块获得,请确认是否被正确安装.
这不是vagrant的问题,而是VirtualBox引起的问题.
请尝试执行,以下命令:
mount -t vboxsf -o uid=1001,gid=1001 work_ /work
命令输出的错误信息为:
sbin/mount.vboxsf:挂载失败:找不到这个文件或目录
问题分析
# Share an additional folder to the guest VM. The first 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"
问题原因
百思不得其解时,我再次想起了错误现象中的那句, "这不是vagrant的问题,而是VirtualBox引起的问题",或许这几句话是对的呢.
顺着这个思路,我访问了VirtualBox官网的buglist, 找到了这个信息
可以看到,是在5.1.20这个版本中出现的这个问题, 我看了下我使用的版本是5.1.16, 竟然比这个有问题的版本还低.
最下面写到,已在5.1.22修复了这个问题.
解决方法
那么,立刻升级吧. 下载新版本安装后,重新启动, 果然,问题解决了,请看截图,提示共享目录,挂载成功.
所思所想
- [已解决]vagrant共享文件夹挂载失败.Vagrant was unable to mount VirtualBox shared folders
- Vagrant was unable to mount VirtualBox shared folders
- Vagrant: Failed to mount folders in Linux guest...
- Vagrant can't mount shared folder in VirtualBox
- 解决yum update更新后Vagrant up遇到不能挂载共享目录/vagrant
- vagrant+virtualbox
- vagrant文件夹无法挂载问题
- Vagrant共享
- vagrant入门教程--共享文件夹配置(8)
- VMware中Shared Folders(共享文件夹)配置
- Vagrant
- vagrant
- vagrant
- vagrant
- Vagrant
- vagrant
- vagrant
- vagrant
- linux下设置简单防火墙
- 刷题报告004 洛谷P1007独木桥
- java面试题
- Web数据存储及应用缓存以及web worker
- HDU 畅通工程续
- [已解决]vagrant共享文件夹挂载失败.Vagrant was unable to mount VirtualBox shared folders
- 嵌入式系统的启动过程
- hover不能做事件委托
- windows自动配置ip的脚本
- 面试知识点详解总结
- 1153: 简易版最长序列
- oracle数据库导入导出
- 3.HTML横排导航列表
- hdu 6050 Funny Function (构造矩阵)