Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79224 - [lxd] cannot locate virtiofsd

Attached to Project: Arch Linux
Opened by Alexandre Sicard (libricoleur) - Thursday, 27 July 2023, 22:19 GMT
Last edited by Toolybird (Toolybird) - Friday, 28 July 2023, 23:09 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To George Rawlinson (rawlinsong)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

LXD will only enable virtiofs for a shared folder if it can locate the virtiofsd binary in either:
* /usr/lib/qemu/ which was used by the previous QEMU implementation of virtiofsd
* /usr/libexec/ which is the default path for the new rust implementation
Since Arch does not use /usr/libexec/, the current virtiofsd package installs the binary in /usr/lib/. As a result, the detection fails and LXD falls back to using a 9p mount, which is much slower.

From my understanding, using /usr/libexec/ or patching LXD in Arch is not desirable, so the only way to fix this would be to request a change from upstream. Should I go and open a bug report?

Additional info:
* offending upstream code: https://github.com/canonical/lxd/blob/e43139513b457e95f40abe55a5b234009d122817/lxd/device/device_utils_disk.go#L443

Steps to reproduce:
* create a LXD virtual machine
eg. # lxc launch images:archlinux/current foobar --vm -s default
# lxc config set foobar security.secureboot=false
* add a shared folder to it
eg. # lxc config device add foobar home disk source=/home path=/home
* start the virtual machine
eg. # lxc start foobar
* check the filesystem used by the shared folder
eg. # lxc exec foobar mount | grep /home

Filesystem will be '9p' instead of 'virtiofs'.
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 28 July 2023, 23:09 GMT
Reason for closing:  Upstream
Additional comments about closing:  Thanks for that. Probably not worth a backport seeing as we'll reap the benefit next pkgver bump. Meanwhile, a symlink could workaround it.
Comment by Toolybird (Toolybird) - Friday, 28 July 2023, 00:01 GMT
libvirt can find the binary no problem. LXD should be able to do the same. Yes, an upstream fix would be best, however...the LXD future is a bit worrying [1]

[1] https://www.phoronix.com/news/LXD-Maintainership-Canonical
Comment by Alexandre Sicard (libricoleur) - Friday, 28 July 2023, 13:32 GMT
Upstream bug report: https://github.com/canonical/lxd/issues/12086

Let's not be too pessimistic. LXD is a great tool and Canonical has put a lot of work and money into it, and seems to be committed to continuing doing so.
Comment by Alexandre Sicard (libricoleur) - Friday, 28 July 2023, 22:35 GMT
A patch has been offered and merged! I guess it will land in next month's release.

Loading...