I am trying to create a nfs to share between my host and guest VM (run with qemu-kvm
).
I followed this guide ad this is the situation:
host:
cat /etc/exports
/mnt/nfsshare 192.168.122.76/24(rw,sync,all_squash,nohide,anonuid=0,anongid=0)
firewall-cmd --list-all
FedoraWorkstation (active)
target: default
icmp-block-inversion: no
interfaces: tun0 wlp0s20f3
sources:
services: dhcpv6-client mdns mountd nfs rpc-bind samba-client ssh
ports: 1025-65535/udp 1025-65535/tcp 892/tcp 111/tcp 111/udp 2049/tcp 2049/udp 875/udp 875/tcp 32803/tcp 32769/udp 892/udp 662/tcp 662/udp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rpcinfo -p 192.168.122.76
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100005 1 udp 20048 mountd
100005 1 tcp 20048 mountd
100005 2 udp 20048 mountd
100024 1 udp 35373 status
100005 2 tcp 20048 mountd
100024 1 tcp 40085 status
100005 3 udp 20048 mountd
100005 3 tcp 20048 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100021 1 udp 44060 nlockmgr
100021 3 udp 44060 nlockmgr
100021 4 udp 44060 nlockmgr
100021 1 tcp 37147 nlockmgr
100021 3 tcp 37147 nlockmgr
100021 4 tcp 37147 nlockmgr
However, when I boot the guest and mount with
mount -t nfs 192.168.122.1:/mnt/nfsshare /mnt/nfsshare_client
, it just hangs.
If I disable the host firewall with systemctl stop firewalld
it works, but strangely the VM has no internet connection anymore, I can't even ping google.
The relevant command to run the VM is: -nic bridge,br=virbr0,helper=/usr/libexec/qemu-bridge-helper
, which is used for internet connection.
I know that there are a lot of very similar questions, but I cannot find one that applies my case. I added all possible firewalld exceptions and it still does not work.
Any help is appreciated.