Hi folk, I’m trying to use virtio-fs to share files between my Ubuntu host, and a VM that I have just created using Alma Linux 9.7. But I am getting the impression that virtio-fs isn’t available/supported in Alma Linux 9.7. At least, so far I have not found a way to install any package such that virtio-fs it is listed as a kernel module when I do ‘lsmod | grep virtio’. Is this the case ?
Hello
virtiofs is built as a module in the kernel as usual. However, it is not loaded by default in the default environment.
[root@alma9 boot]# cat config-5.14.0-611.5.1.el9_7.x86_64 |grep CONFIG_VIRTIO_FS
CONFIG_VIRTIO_FS=m
[root@alma9 boot]# modinfo virtiofs
filename: /lib/modules/5.14.0-611.11.1.el9_7.x86_64/kernel/fs/fuse/virtiofs.ko.xz
alias: fs-virtiofs
license: GPL
description: Virtio Filesystem
author: Stefan Hajnoczi <stefanha@redhat.com>
rhelversion: 9.7
srcversion: 117D0B5D748C839B3D1573C
alias: virtio:d0000001Av*
depends: fuse
retpoline: Y
intree: Y
name: virtiofs
vermagic: 5.14.0-611.11.1.el9_7.x86_64 SMP preempt mod_unload modversions
sig_id: PKCS#7
signer: AlmaLinux kernel signing key
sig_key: 6E:A8:FE:B4:37:37:8C:7D:13:50:A4:7C:30:2C:1F:EA:BE:5C:22:7F
sig_hashalgo: sha256
signature: 15:8C:54:2E:3A:0C:AD:83:0A:BF:18:75:4A:B8:0D:6D:7F:5E:8C:BD:
B8:EB:C4:53:62:03:ED:9D:7A:B8:8D:3A:D7:1D:C9:2B:74:12:F7:C0:
F4:1C:AC:48:B7:57:40:A9:FA:93:BC:D3:3D:11:9E:2C:98:AA:2F:F5:
D5:C2:8C:81:9E:65:78:7B:81:3B:D0:86:60:28:DA:AD:03:5A:07:29:
8C:05:52:92:32:36:6C:E4:E1:54:BC:DB:5A:DB:89:90:E4:A8:0F:43:
0C:36:D1:64:0C:9E:C8:72:94:56:62:0A:83:2F:3F:87:C2:F6:F9:A3:
FE:69:66:66:33:FE:7B:29:35:15:55:AD:0E:05:44:4B:74:DB:AF:BF:
A8:8C:89:B6:7A:47:72:DD:49:C1:76:96:D8:7A:11:B0:D7:46:F5:E7:
3D:6C:46:96:2F:17:D2:9A:5F:1D:5D:F3:11:58:E7:DA:8A:06:26:30:
F0:9A:4F:B6:BF:16:38:18:8A:1F:EF:9F:42:D2:02:8C:99:18:23:FC:
CD:53:E4:6C:30:E7:43:54:40:5A:ED:23:A2:52:05:E8:76:89:FB:11:
3D:1D:C8:AA:AF:68:D2:AC:62:2A:0B:D8:02:E5:FC:BD:61:58:90:A9:
97:EE:26:0F:55:9D:57:D1:41:2C:33:57:07:4A:E1:86:45:CD:81:CB:
7D:CF:A5:38:5D:88:D3:1C:35:BB:01:D2:F8:23:CD:14:3D:1B:98:55:
0B:D8:8F:94:6C:D8:BD:4A:6E:F4:7D:CD:C7:71:92:AE:AB:A4:0D:B2:
1C:2D:CB:FB:44:71:F1:00:73:4F:03:6E:6E:A0:ED:83:C7:D5:0D:B0:
B2:A9:75:DA:06:B6:32:84:31:80:18:DB:A5:C6:1A:BE:B1:32:33:EA:
0A:B9:19:56:FB:AE:DB:A5:B0:10:5A:86:53:C5:AF:6C:A3:88:BA:54:
F9:26:CA:9D:55:4A:D9:A4:CF:23:92:2F:24:06:52:C5:43:FF:34:0E:
62:86:B4:FF
[root@alma9 boot]# modprobe -v virtiofs
insmod /lib/modules/5.14.0-611.11.1.el9_7.x86_64/kernel/fs/fuse/virtiofs.ko.xz
[root@alma9 boot]# lsmod |grep virtiofs
virtiofs 40960 0
fuse 212992 2 virtiofs
Thank you.
The ‘lsmod’ lists currently loaded modules, not all installed modules.
One can ask which packages offer something like virtio modules:
dnf provides /lib/modules/\*/virtio\*.ko\*
or what such files are on the system (in case one has unpackaged modules):
find /lib/modules -name "virtio*.ko*" -ls
The virtiofs.ko.xz happens to be in package kernel-modules-core that should be installed. (There are also some exotic modules in kernel-modules-extra that is not installed by default.)
Should the kernel autoload the virtiofs when the host shares a host directory, as in libvirt: Sharing files with Virtiofs ?