我已将Vagrant配置为使用Rsync共享文件夹,而不是默认情况下由VirtualBox提供的(令人难以置信的SLOW)vboxsf文件系统:
Vagrant.configure("2") do |config| config.vm.synced_folder ".","/vagrant",type: "rsync",rsync__args: ["--verbose","--archive","-z"] end
显然,有更多配置,但我发现这些指令here,它们通常在从主机到访客同步.
但是,我需要guest虚拟机能够同步回主机,因为我的一些构建工具仅安装在guest虚拟机上.如何在共享文件夹中双向同步?
解决方法
很不幸的是,不行,
引自 documentation:
引自 documentation:
The rsync synced folder does a one-time one-way sync from the machine running to the machine being started by Vagrant.
所以最好使用NFS(如果使用Windows主机,则为SMB)
In some cases the default shared folder implementations (such as VirtualBox shared folders) have high performance penalties. If you're seeing less than ideal performance with synced folders,
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。