vagrant 无法挂载共享目录

Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxs

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/changjiangWang/article/details/79129510

vagrant 突然有一天发现共享文件夹失效,vagrant up 后提示:

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=1000,gid=1000 vagrant /vagrant


The error output from the command was:


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

大致意思就是 vagrant表示: 这不是我的锅,是因为vagrant box的问题,然后我查询网上解决办法,大部分是说 升级vagrant box 的版本,因为低版本的box确实存在这个bug ,但是我的是之前可以的 ,突然犯病的,我当然不能原谅和接受,然后最后在github上找到一个答案,执行:

vagrant plugin install vagrant-vbguest
等待几分钟后...

安装成功!

重启vagrant  

成功再次挂载!

反正我是这种解决的,有些情况可能是确实是box版本的问题。下面是解决我问题的githu链接

https://github.com/scotch-io/scotch-box/issues/296

原文地址:https://www.cnblogs.com/brady-wang/p/11909769.html