双向Vagrant Rsync

前端之家收集整理的这篇文章主要介绍了双向Vagrant Rsync前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已将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,

猜你在找的Linux相关文章