From 3e7d16a2eddbb6552283664719202ee864b2ab7a Mon Sep 17 00:00:00 2001 From: Alexandre Balmes Date: Wed, 27 Apr 2016 13:50:39 +0200 Subject: [PATCH 1/2] Fix NFS mount on OSX Avoid this error: ``` NFS requires a host-only network to be created. Please add a host-only network to the machine (with either DHCP or a static IP) for NFS to work. ``` --- Vagrantfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 0cbe547..f80c628 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -17,7 +17,7 @@ Vagrant.configure(2) do |config| # Create a private network, which allows host-only access to the machine # using a specific IP. - # config.vm.network "private_network", ip: "192.168.33.10" + config.vm.network "private_network", type: :dhcp # Create a public network, which generally matched to bridged network. # Bridged networks make the machine appear as another physical device on @@ -25,8 +25,8 @@ Vagrant.configure(2) do |config| # config.vm.network "public_network" config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder "./vagrant-files", "/tmp/vagrant-files" - config.vm.synced_folder "./workshop/www", "/var/www" + config.vm.synced_folder "./vagrant-files", "/tmp/vagrant-files", type: "nfs", mount_options: ["nolock", "actimeo=1", "fsc"] + config.vm.synced_folder "./workshop/www", "/var/www", type: "nfs", mount_options: ["nolock", "actimeo=1", "fsc"] config.vm.provider "virtualbox" do |vb| vb.gui = false From 9042ec74045a7a5c1bddb0be5d63959ad3c39e0a Mon Sep 17 00:00:00 2001 From: Alexandre Balmes Date: Wed, 27 Apr 2016 14:14:45 +0200 Subject: [PATCH 2/2] Remove NFS options for non-osx computer Poor guys :'( --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index f80c628..fd8161d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,8 +25,8 @@ Vagrant.configure(2) do |config| # config.vm.network "public_network" config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder "./vagrant-files", "/tmp/vagrant-files", type: "nfs", mount_options: ["nolock", "actimeo=1", "fsc"] - config.vm.synced_folder "./workshop/www", "/var/www", type: "nfs", mount_options: ["nolock", "actimeo=1", "fsc"] + config.vm.synced_folder "./vagrant-files", "/tmp/vagrant-files" + config.vm.synced_folder "./workshop/www", "/var/www" config.vm.provider "virtualbox" do |vb| vb.gui = false