求助!使用vagrant运行homestead时无法挂载共享文件

  • 环境win10 Hyper-v
  • ubuntu20.04
  • 11.30 homestead
    已经尝试过(依旧报错):
    vagrant plugin install vagrant-vbguest
    错误代码如下:
    homestead: H:/code => /home/vagrant/code
    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 cifs -o vers=3.02,credentials=/etc/smb_creds_vgt-f3457f81eaf3132420c88789aa2db42b-66f0bd5cbca4d218f5f0b8a5f1712727,uid=1000,gid=1000,mfsymlinks,_netdev,nofail //169.254.173.72/vgt-f3457f81eaf3132420c88789aa2db42b-66f0bd5cbca4d218f5f0b8a5f1712727 /home/vagrant/code

The error output from the last command was:

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

求各位大佬支招
本作品采用《CC 协议》,转载必须注明作者和本文链接
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 2

我曾经尝试过在 Hyper-V 里面搭建 Homestead,但是失败了,我就放弃了。没想到真有人在里面成功运行了。

3年前 评论
JunYu (楼主) 3年前

homestead 我没用过,我在mac 上自己搭建的vagrant + virtualbox + centos7 碰到的挂载文件夹失败,用的第一种方法解决了, 你的方法我也用过,但时好时坏。
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 dmode=775,fmode=664,uid=997,gid=995 testvm /testvm

The error output from the command was:

mount: unknown filesystem type ‘vboxsf’

download.virtualbox.org/virtualbox/ 下载VBoxGuestAdditions.iso 挂载
运行VBoxLinuxAdditions.run

或者

在virtualbox 安装目录有
VBoxGuestAdditions.iso

Macos 在
/Applications/VirtualBox.app/Contents/MacOS

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!