mitchellh/vagrant — Issue #667: vagrant up fails when shared folder doesn't exist and using create and nfs options
Author: dkingofpa
Created: 2012-01-20 19:25:36+00:00
State: open

If the specified share folder doesn't exist, vagrant fails with a stacktrace. I'm using the create option on the share folder. If I create the folder before running `vagrant up`, it works.

In my Vagrantfile:
config.vm.share_folder("srv", "/srv", srv_path, :create => true, :nfs => true)

The stacktrace:

dking@desktop78 ~/Projects/test (master) $ vagrant up
[default] Importing base box 'ubuntu-11.10-server-amd64'...
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Destroying VM and associated drives...
/Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:90:in `stat': No such file or directory - /Users/dking/Projects/test/srv (Errno::ENOENT)
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:90:in `prepare_permission'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:70:in `block in prepare_folders'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:67:in `each'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:67:in `inject'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:67:in `prepare_folders'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/nfs.rb:30:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/prune_nfs_exports.rb:15:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/provision.rb:29:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/forward_ports.rb:24:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/check_port_collisions.rb:38:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/env/set.rb:16:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/clear_forwarded_ports.rb:13:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/clean_machine_folder.rb:17:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/general/validate.rb:14:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/match_mac_address.rb:16:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/check_guest_additions.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/import.rb:32:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/check_box.rb:28:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/general/validate.rb:14:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/warden.rb:33:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/builder.rb:92:in `call'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/runner.rb:49:in `block in run'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/action/runner.rb:49:in `run'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/vm.rb:192:in `run_action'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/vm.rb:143:in `up'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/command/up.rb:46:in `block in execute'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/command/base.rb:100:in `block in with_target_vms'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/command/base.rb:95:in `each'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/command/base.rb:95:in `with_target_vms'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/command/up.rb:39:in `execute'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/cli.rb:38:in `execute'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/lib/vagrant/environment.rb:156:in `cli'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/gems/vagrant-0.9.1/bin/vagrant:43:in `'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/bin/vagrant:19:in `load'
from /Users/dking/.rvm/gems/ruby-1.9.2-p290/bin/vagrant:19:in `

'