0

I'm running Vagrant 1.7.3 with an Ubuntu 14.04 basebox, and I want to try out the new Puppet 4.2.0.

However, when I run vagrant up on an empty VM, I get the following error:

cp: missing destination file operand after ‘/etc/exports’
Try 'cp --help' for more information.
cp: cannot stat ‘/exports’: No such file or directory

My /etc/exports file:

# VAGRANT-BEGIN: 1000 b814b4c0-189a-4d39-9283-dd6678993f9e
"/home/xx/puppetmaster/src/manifests" 172.28.128.99(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=2596711920)
# VAGRANT-END: 1000 b814b4c0-189a-4d39-9283-dd6678993f9e

My Vagrant file:

machine.vm.synced_folder "~/puppetmaster/src/manifests", "/etc/puppetlabs/code/environments/development/manifests", { :nfs => true }

Where is the problem? The strange thing is it worked just fine last week. The folders are apparently being imported correctly, anyway.

Additionally whenever I destroy my VM and start it again, Vagrant makes a new entry in /etc/exports. Now I have the Vagrant-Begin and Vagrant-End statement around 5 times in my exports file.

1

See a ticket: cp: cannot stat ‘/exports’: No such file or directory:

This is happening because $TMPDIR is not set on your local machine. Sorry about that. I've opened #5954 to fix the issue. In the meantime, a workaround is to export TMPDIR=/tmp and things should begin working again.

Fixed. Fix available since 1.7.4

  • How do I apply your fix? After adding /tmp to my path I get the error that /etc/exports can't be created because it lacks the necessary rights. I'm not sure if I'm supposed to sudo a Vagrant Up. – Pulz Aug 7 '15 at 12:18
  • @Pulz, 1) Update Vagrant 2) Remove /tmp from your path – Evgeny Vereshchagin Aug 7 '15 at 12:27
  • your last problem: github.com/mitchellh/vagrant/issues/5957 . Fixed. Fix available since 1.7.4 – Evgeny Vereshchagin Aug 7 '15 at 12:54
-1

This is what works for me:

config.vm.synced_folder "/source/path", "/dest/path", :nfs => true, mount_options: ['rw', 'vers=3', 'tcp', 'fsc']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.