双向Vagrant Rsync
发布时间:2020-12-14 02:22:33 所属栏目:Linux 来源:网络整理
导读:我已将Vagrant配置为使用Rsync共享文件夹,而不是默认情况下由VirtualBox提供的(令人难以置信的SLOW)vboxsf文件系统: Vagrant.configure("2") do |config| config.vm.synced_folder ".","/vagrant",type: "rsync",rsync__args: ["--verbose","--archive","-z
我已将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, (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |