vagrant 无法挂在共享文件夹

vagrant up 后出现下列错误提示

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

已经 Google 了各种,使用了vagrant-vbguest,已经没有解决,把 virtualbox 从 4.3.14降到了4.2.26,还是会出现这个问题
gust 里的系统是 ubuntu12.04,也试过了14.04,host 是 OS X 10.09
请问这个怎么解决?

update:
mount.vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
手动可以挂载

阅读 13.2k
4 个回答

給你分享個能用的Vagrantfile

Guest: Ubuntu 12.04

Host: OS 10.9

新手上路,请多包涵

英文訊息有提到 VirtualBox Guest Additions 就是問題重點
您應該有執行過 guest os 的系統更新,例如 apt-get upgrade 造成掛載指令無法使用

請參考 http://blog.bestlong.idv.tw/2015/07/07/1270

1.安装增强工具

sudo apt-get install virtualbox-guest-utils

2.重启

vagrant reload 
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进