NFS Sharing from host to Vagrant VM !!

27 views
Skip to first unread message

Ibrahim Vanak

unread,
May 5, 2020, 10:24:07 AM5/5/20
to Vagrant

The issue is, while running “vagrant up” I am trying to do NFS mount from host to Vagrant VM. It’s failing to do so with the following error:

==> default: Mounting NFS shared folders...

The following SSH command responded with a non-zero exit status.

Vagrant assumes that this means the command failed!

 

mount -o vers=4 192.168.121.1:/root/hlinux-tools/netinst-iso /vagrant

 

Stdout from the command:

 

 

 

Stderr from the command:

 

mount.nfs: access denied by server while mounting 192.168.121.1:/root/hlinux-tools/netinst-iso


My host VM is unbuntu 18.04 and vagrant VM would be debian Jessie. 


Snippet of NFS sharing code from Vagrant file:


  config.vm.synced_folder "./vagrantfolder", "/home/vagrant/output",

    nfs: true,

    linux__nfs_options: ['rw','no_subtree_check','all_squash','async']

 

  config.vm.synced_folder "./vagrantfolder/repo", "/var/www/hLinuxArchive",

    nfs: true,

    linux__nfs_options: ['rw','no_subtree_check','all_squash','async']

dragon788

unread,
May 6, 2020, 11:32:36 AM5/6/20
to Vagrant
The issue is likely that NFS isn't installed inside the VM. You should read the documentation at vagrantup.com regarding the options for NFS or Rsync or "native" shared folders for Virtualbox or VMware (which require having some additional packages installed in the VM as well).

Alvaro Miranda Aguilera

unread,
May 6, 2020, 2:11:48 PM5/6/20
to vagra...@googlegroups.com
there is a nfs server on  192.168.121.1 ?

can you mount on the guest manually  192.168.121.1:/root/hlinux-tools/netinst-iso
?


alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1de9e302-83d1-4324-b1a8-373123fb3efe%40googlegroups.com.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages