我正在努力通过SMB无所事事地安装共享文件夹。
启用了Hyper-V和SMB功能的Windows 10 Pro
带有vagrant-vbguest
(0.21.0,全局)插件的Vagrant 2.2.6
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: hyperv
authorize: c:/Users/sgrat/.ssh/id_rsa.pub
keys:
- c:/Users/sgrat/.ssh/id_rsa
folders:
- map: Sites/mysite
to: /home/vagrant/mysite
php: '7.3'
type: "smb"
smb_host: 127.0.0.1
smb_username: vagrant
smb_password: vagrant
sites:
- map: mysite.test
to: /home/vagrant/mysite
databases:
- mysitedb
features:
- mariadb: true
- ohmyzsh: false
- webdriver: false
Vagrant requires administrator access to create SMB shares and
may request access to complete setup of configured shares.
==> homestead: Setting hostname...
==> homestead: Mounting SMB shared folders...
homestead: C:/Users/sgrat/Desktop/Sites/Homestead => /vagrant
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=2.0,credentials=/etc/smb_creds_vgt-4a666e6cffbb30e1d0bc7bb643cb3aee-6ad5fdbcbf2eaa93bd62f92333a2e6e5,uid=1000,gid=1000 //192.168.1.14/vgt-4a666e6cffbb30e1d0bc7bb643cb3aee-6ad5fdbcbf2eaa93bd62f92333a2e6e5 /vagrant
The error output from the last command was:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
我还用vboxsf
在vagrant ssh
之后在来宾计算机上安装了sudo apt-get install virtualbox-guest-x11
fs,甚至检查了最新的cifs-utils
版本。
我什至用名称/密码vagrant
创建了一个本地/管理员用户,并授予了“站点”文件夹和“站点”共享文件夹上的所有特权。
Windows主机上的共享“ Sites”文件夹,因此更新了Homestead共享文件夹路径,从此开始而不是从C:驱动器开始。
正确吗?