On a Monday in 2020, Vivek Goyal wrote:
On Fri, Jun 05, 2020 at 11:50:06AM +0100, Boris Ebwanga wrote:
Hello everyone.

It's been a while now, I am trying to use virtio-fs. Everything I do end up
with an error.

First I was on fedora 31 and I tried to run manually qemu with virtio-fs
https://virtio-fs.gitlab.io/howto-qemu.html. But I was not able to "make
virtiofsd".

Then, I upgraded to fedora 32 which has virtiofsd at /usr/libexec. I
followed the steps describe at
https://libvirt.org/kbase/virtiofs.html
I could not modify the XML domain of my VM. The error message is "*unsupported
configuration: unknown fs virtiofs » driver type".*

That is correct.

libvirt learned about the 'virtiofs' driver type in v6.2.0, Fedora 32
has 6.1.0:
https://apps.fedoraproject.org/packages/libvirt/

You can try enabling the experimental virt-preview repo to get more
recent builds of libvirt, QEMU and other virt packages:
https://fedoraproject.org/wiki/Virtualization_Preview_Repository


Hi Boris,

Ccing Jan Tomko. He might have toughts on this.



I wrote to Stefan Hajnoczi <[email protected]> describing this problem.
He answers with the following:

Hi Boris,
> You can pass command-line options to the guest like this:
>
>   <domain type='kvm' xmlns:qemu='
> http://libvirt.org/schemas/domain/qemu/1.0'>
>     ...
>     <qemu:commandline>
>       <qemu:arg value='-chardev'/>
>       <qemu:arg value='socket,id=char0,path=/tmp/vhost-fs.sock'/>
>       <qemu:arg value='-device'/>
>       <qemu:arg
> value='vhost-user-fs-pci,chardev=virtio-fs-chardev,tag=myfs'/>
>     </qemu:commandline>
>   </domain>
>
> Note that the xmlns in the <domain> tag is required.
>
> If you pass these options manually then you need to launch virtiofsd
> yourself before launching the guest:
>
>   # /usr/libexec/virtiofsd --socket-path=/tmp/vhost-fs.sock -o
> source=/path/to/share/dir -o no_posix_lock -o xattr
>
> Hope this helps! Please email [email protected] if you have any more
> questions, it's the virtio-fs mailing list and others will be able to
> participate in the discussion.
>

I am still getting the same error after applying the change above.

Can anyone help me with this ? Thank you in advance for your help.

Can you attach your domain xml file here.

I think you also will need to add following in <qemu:commandline> section.


   <qemu:arg value='-object'/>
   <qemu:arg 
value='memory-backend-file,id=mem,size=8G,mem-path=/dev/shm,share=on'/>
   <qemu:arg value='-numa'/>
   <qemu:arg value='node,memdev=mem'/>


Even with libvirt 6.1.0 that does not know virtiofs yet, the shared
memory can be specified as described on https://libvirt.org/kbase/virtiofs.html

Jano

Thanks
Vivek

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Virtio-fs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virtio-fs

Reply via email to