Re: NFS-mounting from a QEMU/KVM guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/17/19 2:48 AM, Patrick O'Callaghan wrote:
> This is quite embarrassing, but I'm banging my head against a wall and
> hoping other eyes will spot some obvious mistake.
>
> I have an F31 guest (fedora30) running in QEMU/KVM on an F31 host
> (Bree). I want to mount a host directory via NFS in the guest. I set
> this up a long time ago and it has worked through several Fedora
> releases without issue, but in a fit of spring cleaning I did a fresh
> install of F31 rather than my usual update, so of course now it doesn't
> work. Clearly I did something right back in the day and have now
> forgotten what it was.
>
> The guest can ping the host and ping the wider Internet, so basic
> connectivity works (this is via a NAT-style connection). The host can
> ssh into the guest.
>
> Firewall setup on the host:
>    [poc@Bree ~]$ firewall-cmd --list-all
>    home (active)
>      target: default
>      icmp-block-inversion: no
>      interfaces: enp3s0
>      sources: 
>      services: dhcp dhcpv6-client dns libvirt mdns mountd nfs nfs3 plex rpc-bind rsyncd samba samba-client ssh
>      ports: 
>      protocols: 
>      masquerade: no
>      forward-ports: 
>      source-ports: 
>      icmp-blocks: 
>      rich rules: 
>
> And on the guest:
>    [poc@fedora30 ~]$ sudo firewall-cmd --list-all
>    home (active)
>      target: default
>      icmp-block-inversion: no
>      interfaces: enp1s0
>      sources: 
>      services: dhcpv6-client mdns samba-client ssh
>      ports: 
>      protocols: 
>      masquerade: no
>      forward-ports: 
>      source-ports: 
>      icmp-blocks: 
>      rich rules:
>
> Guest ip:
>    [poc@fedora30 ~]$ ip addr
>    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
>        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>        inet 127.0.0.1/8 scope host lo
>           valid_lft forever preferred_lft forever
>        inet6 ::1/128 scope host 
>           valid_lft forever preferred_lft forever
>    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
>        link/ether 52:54:00:ca:07:30 brd ff:ff:ff:ff:ff:ff
>        inet 192.168.122.156/24 brd 192.168.122.255 scope global dynamic noprefixroute enp1s0
>           valid_lft 2893sec preferred_lft 2893sec
>        inet6 fe80::2e77:5bc1:d19a:6045/64 scope link noprefixroute 
>           valid_lft forever preferred_lft forever
>
> and routing:
>    [poc@fedora30 ~]$ ip route
>    default via 192.168.122.1 dev enp1s0 proto dhcp metric 100 
>    192.168.122.0/24 dev enp1s0 proto kernel scope link src 192.168.122.156 metric 100 
>
>    [poc@Bree ~]$ ping fedora30
>    PING fedora30 (192.168.122.156) 56(84) bytes of data.
>    64 bytes from fedora30 (192.168.122.156): icmp_seq=1 ttl=64 time=20.1 ms
>    ...
>
> Exports on the host:
>    [poc@Bree ~]$ sudo exportfs
>    /home/Media     192.168.0.0/16
>    /home/poc/Shared
>                    vm-*
>    /home/poc/Shared
>                    fedora*
>
> But from the guest:
>    [poc@fedora30 ~]$ showmount -e bree
>    clnt_create: RPC: Unable to receive
>
> What am I missing?
>

Well, I don't currently have a host---guest nfs setup.  But I do have a guest---guest setup the server is on
an F30 VM while the client is an F31VM.

On the server
[root@f30k etc]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp1s0
  sources:
  services: dhcpv6-client mdns mountd nfs rpc-bind ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

On the client
[root@f31gq ~]# firewall-cmd --list-all
FedoraWorkstation (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp1s0
  sources:
  services: dhcpv6-client mdns samba-client ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

On the server
[root@f30k etc]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:22:fa:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.64/24 brd 192.168.122.255 scope global dynamic noprefixroute enp1s0
       valid_lft 2707sec preferred_lft 2707sec
    inet6 fe80::7745:e38f:3a8f:5343/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

On the client
[root@f31gq ~]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:26:a7:35 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.75/24 brd 192.168.122.255 scope global dynamic noprefixroute enp1s0
       valid_lft 2649sec preferred_lft 2649sec
    inet6 fe80::781e:ec29:2d21:7e7d/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

On the server
[root@f30k etc]# exportfs
/mnt            192.168.0.0/16

On the client
[root@f31gq ~]# showmount -e 192.168.122.64
Export list for 192.168.122.64:
/mnt 192.168.0.0/16

And, of course
[root@f31gq ~]# mount -t nfs4 192.168.122.64:/mnt /mnt
[root@f31gq ~]# ls /mnt
[root@f31gq ~]# touch /mnt/x
[root@f31gq ~]# ls /mnt
x
[root@f31gq ~]# umount /mnt
[root@f31gq ~]# ls /mnt
[root@f31gq ~]#

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux