Vagrant: 'Preparing to edit /etc/exports' fails: No such file or directory @ rb_file_s_stat - /etc/exports

Created on 1 Jul 2018  ยท  6Comments  ยท  Source: hashicorp/vagrant

Vagrant version

Vagrant 2.1.2

Host operating system

Linux Mint 17 Qiana 64-bit

Guest operating system

Debian 8 (Jessie)

Vagrantfile

link

Debug output

https://gist.github.com/matthewhegarty/5ab5200e860891f4260a4468f85dad5d

Expected behavior

Vagrant should have started successfully (have reproduced this with other instances)

Actual behavior

Consistently fails at this step:

Preparing to edit /etc/exports. Administrator privileges will be required...

with

/opt/vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/plugins/hosts/linux/cap/nfs.rb:187:in `stat': No such file or directory @ rb_file_s_stat - /etc/exports (Errno::ENOENT)

Note that the VM is started ok, but the provisioning doesn't complete.

Steps to reproduce

  1. git clone [email protected]:Asana/vagrant-php7.git
  2. cd vagrant-php7
  3. vagrant up

Workaround

For me, using this image worked ok

bug hoslinux

Most helpful comment

Looks like this is an issue with a missing dependency on the host rather than the guest. I was able to fix with:

sudo apt-get install nfs-kernel-server

Looks like nfs is a required dependency

All 6 comments

same problem here with debian/contrib-stretch64

Looks like this is an issue with a missing dependency on the host rather than the guest. I was able to fix with:

sudo apt-get install nfs-kernel-server

Looks like nfs is a required dependency

Yes, that's right @matthewhegarty - the fix here on our end will be catching this instead of showing an error. Then we can give a proper error message to let users know that they're missing nfs.

@matthewhegarty thank you!!!!!!!!!

Hey there @matthewhegarty - It looks like this has been fixed since the issue was first reported. With version 2.2.4 I just tried bringing up a guest on a linux host without nfs installed. Got a proper vagrant error rather than a stack trace complaining about /etc/exports not existing. Going to go ahead and close this then. Thanks!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cbeck527 picture Cbeck527  ยท  3Comments

barkingfoodog picture barkingfoodog  ยท  3Comments

luispabon picture luispabon  ยท  3Comments

rrzaripov picture rrzaripov  ยท  3Comments

tomhking picture tomhking  ยท  3Comments