diff --git a/plugins/synced_folders/nfs/synced_folder.rb b/plugins/synced_folders/nfs/synced_folder.rb index be969d50c..d74fce9e1 100644 --- a/plugins/synced_folders/nfs/synced_folder.rb +++ b/plugins/synced_folders/nfs/synced_folder.rb @@ -52,9 +52,12 @@ module VagrantPlugins end def cleanup(machine, opts) - # Get the ID of all active machines. - ids = machine.env.active_machines.map do |name, provider| - machine.env.machine(name, provider).id + ids = opts[:nfs_valid_ids] + if !ids + # Get the ID of all active machines. + ids = machine.env.active_machines.map do |name, provider| + machine.env.machine(name, provider).id + end end # Prune any of the unused machines