qemu-devel
[Top][All Lists]
Advanced

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

Re: question: QEMU guest with Virtiofs but without virtiofsd


From: Ferenc Fejes
Subject: Re: question: QEMU guest with Virtiofs but without virtiofsd
Date: Fri, 24 Feb 2023 20:04:21 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]