From 71119590e80b86ecc668e465f67b684a2380e0b9 Mon Sep 17 00:00:00 2001 From: Simo Leone Date: Tue, 2 Sep 2014 13:17:30 -0700 Subject: [PATCH] Fix NFS when DHCP settings use a custom IP range Only use the static IP if it is indeed a static IP. Otherwise assume it's DHCP and get the IP that way. --- plugins/providers/virtualbox/action/prepare_nfs_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/providers/virtualbox/action/prepare_nfs_settings.rb b/plugins/providers/virtualbox/action/prepare_nfs_settings.rb index 857da8f4e..18c7025ab 100644 --- a/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +++ b/plugins/providers/virtualbox/action/prepare_nfs_settings.rb @@ -67,7 +67,7 @@ module VagrantPlugins def read_static_machine_ips ips = [] @machine.config.vm.networks.each do |type, options| - if type == :private_network && options[:ip].is_a?(String) + if type == :private_network && options[:type] == :static && options[:ip].is_a?(String) ips << options[:ip] end end