为什么 homestead 共享文件夹失败,提示 filesystem "vboxsf" is not available?

安装了 homestead, 一切安好. 就是共享文件夹功能不能用.

报错:

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

值得注意的是, 启动的时候有这么一句:

[homestead-7] GuestAdditions 5.1.16 running --- OK.

既然 guest 和我的都是 5.1.16 了, 而且启动成功了, 为什么还会出错.

  • virtualbox 5.1.16
  • vagrant 1.9.3
  • win10

已试过的方法:

  • 安装 vguest 插件
  • 创建软连接
阅读 5.3k
3 个回答

vagrant plugin install vagrant-vbguest

vagrant reload

这是我使用的 Vagrantfile, 不过我的宿主机是mac, 虚拟机是linux.
说实话 在win上用Vagrant 坑挺多的

 
Vagrant.configure("2") do |config|
 
  config.vm.box = "laravel/homestead"

  config.vm.hostname = "zqw"
  config.vm.network "private_network", ip: "11.11.11.11" 
  config.vm.synced_folder "<本地文件夹>", "<虚拟机文件夹>", type: 'nfs' #使用 NFS 同步方式来提高文件同步速度
  config.ssh.forward_agent = true
   
end

需要执行 vagrant halt 关机后 冷启动。。。

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