linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] nfs-utils mount: add AF_VSOCK support
@ 2016-10-07 10:01 Stefan Hajnoczi
  2016-10-07 10:01 ` [PATCH 1/4] mount: don't use IPPROTO_UDP for address resolution Stefan Hajnoczi
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2016-10-07 10:01 UTC (permalink / raw)
  To: linux-nfs; +Cc: Stefan Hajnoczi

The AF_VSOCK address family allows virtual machines to communicate with the
hypervisor using a zero-configuration transport.  Both KVM and VMware
hypervisors support AF_VSOCK and it was introduced in Linux 3.9.

This patch series adds AF_VSOCK support to mount.nfs(8) and works together with
the kernel NFS client patches that I am also posting to
linux-nfs@vger.kernel.org.

NFS over AF_VSOCK is useful for file system sharing between a virtual machine
and the host.  Due to the zero-configuration nature of AF_VSOCK this is more
transparent to the user and more robust than asking the user to set up NFS over
TCP/IP.

A file system from the host (hypervisor) can be mounted inside a virtual
machine over AF_VSOCK like this:

  (guest)# mount.nfs 2:/export /mnt -v -o clientaddr=3,proto=vsock

The VM's cid (address) is 3 and the hypervisor is 2.

For testing it's easiest to tunnel AF_VSOCK to the AF_INET nfsd on the host.
The following utility can do this:
https://github.com/stefanha/linux/blob/vsock-extras/nc-vsock.c

  (host)# nc-vsock -l 2049 -t 127.0.0.1 2049

I will post nfsd patches for both the kernel and nfs-utils once they are
complete.

Alternatively you can use nfs-ganesha's AF_VSOCK support to run a native
AF_VSOCK server.

Note that this patch series relies on the AF_VSOCK getaddrinfo(3) support I
recently posted to glibc:
https://patchwork.ozlabs.org/patch/676589/

Stefan Hajnoczi (4):
  mount: don't use IPPROTO_UDP for address resolution
  mount: present AF_VSOCK addresses
  mount: accept AF_VSOCK in nfs_verify_family()
  getport: recognize "vsock" netid

 support/nfs/getport.c | 16 ++++++++++++----
 utils/mount/network.c | 10 +++++++++-
 utils/mount/stropts.c |  4 +---
 3 files changed, 22 insertions(+), 8 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-05-22 12:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07 10:01 [PATCH 0/4] nfs-utils mount: add AF_VSOCK support Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 1/4] mount: don't use IPPROTO_UDP for address resolution Stefan Hajnoczi
2017-05-17 19:39   ` Jeff Layton
2016-10-07 10:01 ` [PATCH 2/4] mount: present AF_VSOCK addresses Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 3/4] mount: accept AF_VSOCK in nfs_verify_family() Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 4/4] getport: recognize "vsock" netid Stefan Hajnoczi
2017-01-03 16:37 ` [PATCH 0/4] nfs-utils mount: add AF_VSOCK support Steve Dickson
2017-01-04 13:31   ` Stefan Hajnoczi
2017-05-17 16:51 ` Jeff Layton
2017-05-18 12:48   ` Stefan Hajnoczi
2017-05-18 14:07     ` Jeff Layton
2017-05-22 12:12       ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).