I have a nfs server in a Raspberry Pi4 streaming media to my laptops - that’s ok.
I needed to get that same nfs access to a qemu/kvm VM running tumbleweed on a host that can access it. However, I can’t get it to work in the VM. My host and nfs server are in the 10.1.1.0/24 network while the VM on the host is in the 192.168.1.0/24 network.
My nfs server settings are -
rpi4:~ # cat /etc/exports
# See the exports(5) manpage for a description of the syntax of this file.
# This file contains a list of all directories that are to be exported to
# other computers via NFS (Network File System).
# This file used by rpc.nfsd and rpc.mountd. See their manpages for details
# on how make changes in this file effective.
/export/Media/4TB *(ro,root_squash,sync,no_subtree_check)
It was NAT but I changed to bridge network and it works now, VM is now in the 10.1.1.0/24 network.
Odd, I would have thought specifying * in the /etc/exports file on the nfs server would have allowed the 192.168.1.0/24 network. No matter, I have what I need.
And I do not know much about VM, but when you have two different networks there must be a route from one to the other (and v.v.). I only pointed you to this because you seemed to concentrate on one possible cause of the problem only, thus ignoring the possibility that it is somewhere else. Very human, but one of the benefits of a forum like this is that it can offer you fresh insights from people not focused to one path to a solution.
If you read the original post, you will see that connectivity was present:
The problem here was NAT on VM host server. By default NFS server will reject connections from “insecure” ports (less than 1024). But NAT by default is using these insecure ports when mapping client address/port. So to NFS server these requests appear to come from insecure ports and are rejected. You will see exactly the same failure when trying from client in the same LAN
mount -o noresvport ...
To allow mount in this case just add “insecure” option to /etc/exports.
Of course NFSv4 has additional issues. The “clientaddr” mentioned in verbose output is used by NFS server to contact NFS client to break lease. This will not work unless there is reverse port mapping on NAT gateway and client is set to use known fixed port. This does not matter for single client, but may cause data corruption in case of multiple clients.