I have the following vagrant script:

Vagrant.configure(2) do |config|
    config.vm.box = "puppetlabs/debian-8.2-64-puppet"

    config.vm.network "private_network", type: "dhcp"

  config.vm.provider "virtualbox" do |v|
    v.memory = 4096
    v.cpus = 1

  config.vm.provision "shell", inline: <<-SHELL
    apt-get update && install nfs-common portmap
    apt-get install -y puppet 

    puppet module install puppetlabs/stdlib

  config.vm.provision "puppet" do |puppet|
    puppet.manifest_file = "default.pp"    
    puppet.manifests_path = ".vagrant/puppet"
    puppet.module_path = ".vagrant/puppet/modules"

  config.vm.synced_folder "./", "/var/www", :nfs => true

When I enable NFS (which I require as the default shared folder causes issues with another program) I get the following errors:

==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-kernel-server.service - LSB: Kernel NFS server support
   Loaded: loaded (/etc/init.d/nfs-kernel-server)
   Active: active (exited) since Mon 2016-07-25 14:13:11 CDT; 17h ago
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

set -e
mkdir -p /var/www
mount -o vers=3,udp /var/www
if command -v /sbin/init && /sbin/init --version | grep upstart; then
  /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/var/www

Stdout from the command:

Stderr from the command:

stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported

I have ran this script through my IDE and CLI as both myself and a "sudo" user with elevated privileges - still same result.

Any ideas?


I had the exact same problem on Arch Linux using VirtualBox as provider and nfs-utils installed and enabled.

I spend some time to make it work and can't really tell what exactly made it working in the end. Below I link to the two main resources that I read and tried.

  1. Make sure vagrant is allowed to run commands as sudo. See this link. (But actually I have no user vagrant on my system, so this might be superfluos.)
  2. Check if net-tools are installed. (But this maybe an Arch thing, see this link.)
| improve this answer | |

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.