首页 文章

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

提问于
浏览
1

我不明白我能找到的答案,所以我会再试一次 . 我在使用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 回答

  • 2

    (1)config.vm.synced_folder“../../ code/test2”,“/ synced_folder”

    来自VM同步文件夹的*将是/ synced_folder

    (2)没有

相关问题