使用VirtualBox在Windows中同步Vagrant文​​件夹

时间:2016-03-03 13:32:07

标签: vagrant virtualbox vagrantfile vagrant-windows synced-folder

我不明白我能找到的答案,所以我会再试一次。我在使用VirtualBox的虚拟机上使用Vagrant。我的主机有Windows 10。

根据https://www.vagrantup.com/docs/synced-folders/basic_usage.html我应该编辑Vagrantfile以包含config.vm.synced_folder "src/", "/srv/website"。理解第二个参数没有任何问题(客机上的那个)。

我有两个问题:

1:如果我的Vagrantfile在C:\ Users \ mabj \ Documents \ vagrant \ test2中,我要同步的文件夹在C:\ Users \ mabj \ Documents \ code \ test2中,我该怎么写第一个参数(主机)?

2:使用Windows和VirtualBox,我是否必须添加任何可选参数?

1 个答案:

答案 0 :(得分:2)

(1)config.vm.synced_folder" ../../ code / test2"," / synced_folder"

来自VM同步文件夹的

*将是/ synced_folder

(2)没有