[libvirt PATCHv2 0/3] docs: qemu: add socket for virtiofs filesystems

Ján Tomko (3): docs: document new socket attribute for virtiofs docs: virtiofs: add section about externally-launched virtiofsd NEWS: qemu: add socket for virtiofs filesystems NEWS.rst | 6 ++++++ docs/formatdomain.rst | 10 +++++++++- docs/kbase/virtiofs.rst | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) -- 2.29.2

Describe the attribute and add an example. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- docs/formatdomain.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 1b9b221611..282176c4f4 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3242,6 +3242,10 @@ A directory on the host that can be accessed directly from the guest. <source dir='/path'/> <target dir='mount_tag'/> </filesystem> + <filesystem type='mount'> + <driver type='virtiofs' queue='1024'/> + <source socket='/tmp/sock'/> + </filesystem> ... </devices> ... @@ -3369,7 +3373,11 @@ A directory on the host that can be accessed directly from the guest. ``source`` The resource on the host that is being accessed in the guest. The ``name`` attribute must be used with ``type='template'``, and the ``dir`` attribute - must be used with ``type='mount'``. The ``usage`` attribute is used with + must be used with ``type='mount'``. For ``virtiofs``, the ``socket`` attribute + can be used to connect to a virtiofsd daemon launched outside of libvirt. + In that case, the ``target`` element does not apply and neither do most + virtiofs-related options, since they are controlled by virtiofsd, not libvirtd. + The ``usage`` attribute is used with ``type='ram'`` to set the memory limit in KiB, unless units are specified by the ``units`` attribute. ``target`` -- 2.29.2

Provide an exmple in a place more visible than formatdomain.html. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- docs/kbase/virtiofs.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst index c0bc07a68d..740b08d50d 100644 --- a/docs/kbase/virtiofs.rst +++ b/docs/kbase/virtiofs.rst @@ -149,3 +149,18 @@ More optional elements can be specified <cache mode='always'/> <lock posix='on' flock='on'/> </binary> + +Externally-launched virtiofsd +============================= + +Libvirtd can also connect the ``vhost-user-fs`` device to a ``virtiofsd`` +daemon launched outside of libvirtd. In that case socket permissions, +the mount tag and all the virtiofsd options are out of libvirtd's +control and need to be set by the application running virtiofsd. + +:: + + <filesystem type='mount'/> + <driver type='virtiofs' queue='1024'/> + <source socket='/var/virtiofsd.sock'/> + </filesystem> -- 2.29.2

Signed-off-by: Ján Tomko <jtomko@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5f8b0ae02d..7b55dd056f 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,6 +18,12 @@ v7.3.0 (unreleased) The xen driver now supports domains with more than 4TB of memory with xen >= 4.13. + * qemu: add socket for virtiofs filesystems + + Libvirt now supports ``filesystem`` devices that connect to + a ``virtiofsd`` daemon launched outside of libvirtd, via the + ``socket`` attribute of the ``source`` element. + * **Improvements** * **Bug fixes** -- 2.29.2

On Fri, 2021-04-23 at 12:03 +0200, Ján Tomko wrote:
Ján Tomko (3): docs: document new socket attribute for virtiofs docs: virtiofs: add section about externally-launched virtiofsd NEWS: qemu: add socket for virtiofs filesystems
NEWS.rst | 6 ++++++ docs/formatdomain.rst | 10 +++++++++- docs/kbase/virtiofs.rst | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-)
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
participants (2)
-
jjongsma@redhat.com
-
Ján Tomko