winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
570 stars 61 forks source link

Problems on Ubuntu 22 #143

Open DannyBen opened 1 year ago

DannyBen commented 1 year ago

I seem to be stuck in an endless error loop.

My setup used to work without a problem on Ubuntu 20, but now it fails on Ubuntu 22 (Ubuntu vagrant guest on Windows 11 host).

My Vagrantfile config:

    nfs_options = %w[rw async fsc nolock vers=3 udp rsize=32768 wsize=32768 hard noatime actimeo=2]
    config.vm.synced_folder './', "/vagrant", type: 'nfs', mount_options: nfs_options
    config.vm.network "private_network", type: "dhcp"

With this, it seems like the plugin adds vers=3,udp again, so when running vagrant up, this error occurs:

==> default: Exporting NFS shared folders...
==> default: Preparing to edit nfs mounting file.
[NFS] Status: running
==> 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=3,udp,rw,async,fsc,nolock,vers=3,udp,rsize=32768,wsize=32768,hard,noatime,actimeo=2 192.168.56.1:/C/D/Vagrant/Main /vagrant

Stderr from the command:
mount.nfs: multiple version options not permitted

Note the command was prepended with ver=3 and udp again.

I think that there is some broken logic that adds these options when it shouldn't.

bpystep commented 1 year ago

Same problem

bpystep commented 1 year ago

@DannyBen Have you solved this problem?

DannyBen commented 1 year ago

@DannyBen Have you solved this problem?

Yes. I have reverted to Ubuntu 20.... :) The quality of the "Vagrant on Windows for running Linux" solution is degrading consistently. Sooner or later, we will have to face the music.

sawwd commented 1 year ago

I have the same issue. Pretty sure the issue is not too hard to fix...

chan15 commented 9 months ago

It's happened on almalinix/9 too, hope author can solve the problem please

chan15 commented 9 months ago

config.vm.synced_folder "./data", "/data", type: "nfs", mount_options: ['nolock'], nfs_udp: false

@DannyBen This is my solution on Ubuntu22, still work on Almalinux/9

DannyBen commented 9 months ago

config.vm.synced_folder "./data", "/data", type: "nfs", mount_options: ['nolock'], nfs_udp: false

@DannyBen This is my solution on Ubuntu22, still work on Almalinux/9

If I recall correctly, when not using UDP the performance is unacceptable. I since moved to Arch linux without NFS.