virtio-fs.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Ferenc Fejes <fejes@inf.elte.hu>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: virtio-fs-list <virtio-fs@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com,
	"Péter Antal" <peti.antal99@gmail.com>,
	"Christian Schoenebeck" <qemu_oss@crudebyte.com>
Subject: Re: [Virtio-fs] question: QEMU guest with Virtiofs but without virtiofsd
Date: Fri, 24 Feb 2023 20:04:21 +0100	[thread overview]
Message-ID: <CAAej5NZBzbx6paJRH-UDxreiFCMdX60RohHb1VU6mcsnWbyJJQ@mail.gmail.com> (raw)
In-Reply-To: <CAJSP0QX3VTU+_wngw+8jHttKykJ-WzMgns+PASDaD91or+zp5A@mail.gmail.com>

Hi Stefan!

On Fri, Feb 24, 2023 at 6:23 PM Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
> On Fri, 24 Feb 2023 at 11:47, Ferenc Fejes <fejes@inf.elte.hu> wrote:
> > I'm using a QEMU VM with a debootstrap rootfs, shared over virtiofs for
> > the guest. My best understanding is that virtiofsd must required even
> > if just using one guest.
>
> Yes, virtiofsd is required even if just one guest is accessing a
> shared directory using a virtiofs device. The virtiofsd daemon is
> responsible for emulating the virtiofs device (QEMU does not do the
> emulation), so that's why it's essential even with just a single
> guest.
>
> > Looking around in the QEMU manpages I got a little bit confused by
> > virtfs parameter. Is it something entirely connected with 9P or it is
> > possible to pass folders to the guest through virtiofs without
> > virtiofsd? Unfortunately none of my trial with the parameters
> > succeeded.
>
> There are two separate VIRTIO devices for sharing files/directories:
> virtiofs and virtio-9p (sometimes called virtfs). It's easy to confuse
> them because "virtiofs" and "virtfs" look similar. They have different
> features and are completely independent of each other. In terms of the
> file system protocol, virtiofs is based on Linux FUSE while virtio-9p
> is based on the 9P protocol.

Thank you for the clarification! No wonder that my commands failed to work.
As a very occasional user of QEMU I those two (and their parameters)
looked very similar to me.

>
> virtiofs uses the --device vhost-user-fs-pci syntax together with a
> virtiofsd process.
>
> virtio-9p uses either the full --device virtio-9p-pci and --fsdev
> syntax or the shortcut --virtfs syntax that combines both these
> options.
>
> > Could someone can give me a confirmation if virtiofsd is must or its
> > optional. Thanks in advance!
>
> If you want to use virtiofs then virtiofsd is required.
>
> If you use virtio-9p then virtiofsd is not needed.
>
> In terms of which one you should use, both are widely used today.
> Unless you have specific requirements, I think you can choose
> whichever one seems most convenient to you.

I think I stick with the virtiofs+virtiofsd. Most QEMU features I need
shipped with 1-2 years old distros and can be installed from repos, so
I dont need to bother with building it.

Thanks again for the detailed explanation!

>
> Stefan

Best,
Ferenc


      reply	other threads:[~2023-02-24 19:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 15:17 [Virtio-fs] question: QEMU guest with Virtiofs but without virtiofsd Ferenc Fejes
2023-02-24 17:23 ` Stefan Hajnoczi
2023-02-24 19:04   ` Ferenc Fejes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAej5NZBzbx6paJRH-UDxreiFCMdX60RohHb1VU6mcsnWbyJJQ@mail.gmail.com \
    --to=fejes@inf.elte.hu \
    --cc=peti.antal99@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).