From 9e8ae68dfb7a82caccaf93ac932766004f72490d Mon Sep 17 00:00:00 2001 From: Joshua Pan Date: Fri, 24 Nov 2017 08:57:31 -0800 Subject: [PATCH] vagrant: Add NFS backend for file synchronization for OSX. This is intended to fix serious issues with frequent guest crashes on OSX High Sierra with Virtualbox and the default file synchronization. Note from Tim: We've tried this idea before, and it worked for Mac, but caused problems for non-Mac users of our Vagrant setup that resulted in it being reverted in 1432e9afb0acd0472e89e1af77404bd6b73097b6. Hopefully the new conditional will handle things correctly in both Mac and Linux. --- Vagrantfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 3e8a576e27..bea7349905 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -30,7 +30,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| host_ip_addr = "127.0.0.1" config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder ".", "/srv/zulip" + if (/darwin/ =~ RUBY_PLATFORM) != nil + config.vm.synced_folder ".", "/srv/zulip", type: "nfs" + config.vm.network "private_network", type: "dhcp" + else + config.vm.synced_folder ".", "/srv/zulip" + end vagrant_config_file = ENV['HOME'] + "/.zulip-vagrant-config" if File.file?(vagrant_config_file)