From 29ca6bc6d18767d3bc63b3cf5acb3bb5ce639225 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 23 Jan 2013 09:27:47 -0800 Subject: [PATCH] Upgrade V1 shared folders to V2 --- config/default.rb | 2 +- plugins/kernel_v1/config/vm.rb | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/default.rb b/config/default.rb index e4002fb03..cddc0fe65 100644 --- a/config/default.rb +++ b/config/default.rb @@ -24,7 +24,7 @@ Vagrant.configure("2") do |config| # Share the root folder. This can then be overridden by # other Vagrantfiles, if they wish. - config.vm.share_folder("v-root", "/vagrant", ".") + config.vm.synced_folder(".", "/vagrant", :id => "vagrant-root") config.nfs.map_uid = :auto config.nfs.map_gid = :auto diff --git a/plugins/kernel_v1/config/vm.rb b/plugins/kernel_v1/config/vm.rb index 6a0a7b3bd..e1cb36d0d 100644 --- a/plugins/kernel_v1/config/vm.rb +++ b/plugins/kernel_v1/config/vm.rb @@ -121,11 +121,12 @@ module VagrantPlugins # Shared folders self.shared_folders.each do |name, sf| - options = sf.dup - guestpath = options.delete(:guestpath) - hostpath = options.delete(:hostpath) + options = sf.dup + options[:id] = name + guestpath = options.delete(:guestpath) + hostpath = options.delete(:hostpath) - new.vm.share_folder(name, guestpath, hostpath, options) + new.vm.synced_folder(hostpath, guestpath, options) end # Defined sub-VMs