Homestaed 在 macOS Catalina 系统下没法启动

升级系统后习惯性的进入 homestaed 执行 vagrant up,结果发现报错了git

==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Exporting NFS shared folders...
NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":

exports:2: exported dir/fs mismatch: /Users/yuanchao/Code /System/Volumes/Data
==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Exporting NFS shared folders...
==> homestead-7: Preparing to edit /etc/exports. Administrator privileges will be required...
==> homestead-7: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp,actimeo=1,nolock 192.168.10.1:/Users/yuanchao/Code /home/vagrant/Code

Stdout from the command:



Stderr from the command:

mount.nfs: access denied by server while mounting 192.168.10.1:/Users/yuanchao/Code

后研究发现是由于 Catalina 系统对权限划分的更细致,因此咱们要赋予 vagrant 用户一些权限github

sudo vim /etc/sudoers

# 添加到文件结尾后保存
vagrant ALL=(ALL) NOPASSWD:ALL

# 删除以前的 exports 文件
sudo rm /etc/exports

# 进入目录执行 up
vagrant up

参考地址

https://discourse.roots.io/t/nfs-mounting-in-trellis-on-mac-os-catalina/16785/8vim

vagrant 2.2.6 已针对 Catalina 作了修复ui

相关文章
相关标签/搜索