双向Vagrant Rsync

双向Vagrant Rsync,第1张

概述我已将Vagrant配置为使用Rsync共享文件夹,而不是默认情况下由VirtualBox提供的(令人难以置信的SLOW)vboxsf文件系统: Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__args: ["--verbose 我已将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:
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,
总结

以上是内存溢出为你收集整理的双向Vagrant Rsync全部内容,希望文章能够帮你解决双向Vagrant Rsync所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1033300.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存