Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Cleanup 9pfs chapter

...

5.1 Host-to-vm filesystem sharing

Rationale

The function of providing disk access in the form of a "shared folder" or full disk passthrough is a function that seems mostly more used by desktop virtualization.  For for desktop virtualization than in the embedded systems that this document is for.  In desktop virtualisation, for example the user wants to run  run Microsoft Windows in combination with a MacOS host, or to run Linux in a virtual machine on a Windows-based corporate workstation, or bespoke Linux systems run in KVM/QEMU on Linux host for development of embedded systems.  Host-to-VM filsystem sharing might also serve some purpose also in server virtualization if it is based on a Type-2 hypervisor which is in itself an operating system kernel, but also hosts multiple virtualized environment.

Requirements:

...

certain server virtualization setups. With this background, we consider Host-to-VM filesharing an optional feature and cover it only briefly here.

VIRTIO covers (very briefly) the 9P / 9PFS protocol for host-to-vm

...

filesystem sharing.

Discussion:

The For the automotive use case, the working group found little need for this host-to-vm disk sharing in the final product in an automotive system, but we summarize the opportunities here if the need arises for some particular product.

...

Most systems will be able to accomodate any network disk protocol needs by implementing the network protocol in one or several of the VMs. The typical systems we deal with can implement a more standard and capable protocol such as NFS within the normal operating system environment that is running in the VM and share storage between them over the (virtual) network they have. In other words, for many use cases this sharing of disk/filesystem resources need not be implemented in the hypervisor itself.

In [VIRTIO], the protocol 9pfs is mentioned in two ways: A PCI type device can indicate that it is going to use the 9P protocol. The specification also has 9P as a specific separate device type. There seems to be no strict definition (or even specific reference) to the protocol itself and it is .  It appears to be assumed to be well known by its name, and possible to find online. The specification is thus complemented only by scattered information found on the web regarding the specific implementations (Xen, KVM, QEMU, ...) 

9pfs is a minimalistic network file-system protocol that the our working group figures is appropriate for the task. Other network protocols like NFS, SMB/SAMBA etc. would be too heavy. 9pfs however feels a bit esoteric, and while "reinventing" is usually unnecessary there might be an appropriate opportunity to do that here, with a new modern protocol plus, a reference open-source implementation. It ought to take a closer look particularly at a flexible and reliable security model, which seem somewhat glossed over in the 9pfs description.  It briefly  :  It briefly references only "fixed user" or "pass-through" for mapping ownership on files in guest/host.

Requirements:

  • Implementation of host-to-vm disk sharing using to the 9pfs protocol is optional.

Links: Virtio 1.0 spec : {PCI-9P, 9P device type}.
Kernel support: Xen/Linux 4.12+ FE driver Xen implementation details

Some found references includeincluded: (these Links are not linked here provided since we cannot at the moment evaluate the completeness, or if they these should be considered official or completespecification).

  • A set of man pages that seem to be the definition of P9

...

  • .  
  • QEMU instruction how to set up a VirtFS (P9).  
  • Example/info how to natively mount a 9P network filesystem

...

  • .
  • Source code for 9pfs FUSE driver

3. References

    [RFC 2119] https://www.ietf.org/rfc/rfc2119.txt

...