Vagrant 无法挂载共享文件夹 - 没有这样的文件或目录
Vagrant unable to mount shared folders - No such file or directory
我有这个 Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.hostname = "app.local"
config.vm.network :private_network, ip: "192.168.20.20"
config.vm.synced_folder ".", "/vagrant", :mount_options => ['dmode=774','fmode=775']
config.vm.provider :virtualbox do |vb|
vb.name = "MyBox"
vb.memory = 512
vb.cpus = 2
end
config.vm.provision :shell, path: "install.sh"
end
我到目前为止使用没有问题(在 Ubuntu 和 Windows 上)。在 Windows 10,我升级了 Oracle VM Virtual Box (5.1.16) 和 Vagrant (1.9.2),现在尝试安装盒子时出现此错误:
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=774,fmode=775,uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
: No such file or directory
我也看到了这个:
GuestAdditions versions on your host (5.1.16) and guest (4.3.36) do not match.
* Stopping VirtualBox Additions
然后似乎删除了 GuestAdditions 并安装了 5.1.16 版本,步骤以:
结尾
vboxadd.sh: Building Guest Additions kernel modules. vboxadd.sh:
Starting the VirtualBox Guest Additions.
Could not find the X.Org or XFree86 Window System, skipping.
在此之后,我仍然得到:
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 4.3.36 VBoxService inside the vm
claims: 5.1.16 Going on, assuming VBoxService is correct... Got
different reports about installed GuestAdditions version: Virtualbox
on your host claims: 4.3.36 VBoxService inside the vm claims:
5.1.16 Going on, assuming VBoxService is correct...
这是一个错误还是我做错了什么?
这似乎已在 5.1.18 中修复。更新到最新版本解决了我的问题。
- Shared Folders: fixed case insensitive filename access (5.1.16 regression; Windows guests only; bug #16549)
- Shared Folders: fixed access to long pathes (5.1.16 regression; Windows guests only; bugs #14651, #16564)
我有这个 Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.hostname = "app.local"
config.vm.network :private_network, ip: "192.168.20.20"
config.vm.synced_folder ".", "/vagrant", :mount_options => ['dmode=774','fmode=775']
config.vm.provider :virtualbox do |vb|
vb.name = "MyBox"
vb.memory = 512
vb.cpus = 2
end
config.vm.provision :shell, path: "install.sh"
end
我到目前为止使用没有问题(在 Ubuntu 和 Windows 上)。在 Windows 10,我升级了 Oracle VM Virtual Box (5.1.16) 和 Vagrant (1.9.2),现在尝试安装盒子时出现此错误:
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=774,fmode=775,uid=1000,gid=1000 vagrant /vagrant The error output from the command was: : No such file or directory
我也看到了这个:
GuestAdditions versions on your host (5.1.16) and guest (4.3.36) do not match. * Stopping VirtualBox Additions
然后似乎删除了 GuestAdditions 并安装了 5.1.16 版本,步骤以:
结尾vboxadd.sh: Building Guest Additions kernel modules. vboxadd.sh: Starting the VirtualBox Guest Additions. Could not find the X.Org or XFree86 Window System, skipping.
在此之后,我仍然得到:
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 4.3.36 VBoxService inside the vm claims: 5.1.16 Going on, assuming VBoxService is correct... Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 4.3.36 VBoxService inside the vm claims: 5.1.16 Going on, assuming VBoxService is correct...
这是一个错误还是我做错了什么?
这似乎已在 5.1.18 中修复。更新到最新版本解决了我的问题。
- Shared Folders: fixed case insensitive filename access (5.1.16 regression; Windows guests only; bug #16549)
- Shared Folders: fixed access to long pathes (5.1.16 regression; Windows guests only; bugs #14651, #16564)