求助!使用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 协议》,转载必须注明作者和本文链接
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 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年前 评论

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