3 KiB
3 KiB
virtio-fs Prerequisites Verification
Date: 2026-01-26
This document verifies that all prerequisites for virtio-fs support are available in nixpkgs.
Requirements Summary
virtio-fs requires:
- QEMU 4.2.0+ - vhost-user-fs device support introduced
- virtiofsd daemon - User-space filesystem daemon for virtio-fs
- Guest kernel CONFIG_VIRTIO_FS - Linux 5.4+ with virtio-fs driver enabled
Verification Results
1. QEMU Version
Command:
nix eval nixpkgs#qemu.version --raw
Result:
10.1.2
Status: ✅ PASS - Version 10.1.2 is significantly newer than the required 4.2.0
Notes:
- QEMU 10.x includes full virtio-fs support with vhost-user-fs backend
- Package provides
qemu-kvmas main program - Multiple outputs available: out, doc, ga, debug
2. virtiofsd Package
Command:
nix search nixpkgs virtiofsd --json
Result:
legacyPackages.x86_64-linux.virtiofsd
Version Check:
nix eval nixpkgs#virtiofsd.version --raw
Version:
1.13.2
Status: ✅ PASS - virtiofsd is available as a standalone package
Notes:
- virtiofsd is available in nixpkgs as a separate package
- Version 1.13.2 is a modern Rust-based implementation
- This is the newer rust-virtiofsd, not the original C implementation from QEMU
3. Kernel CONFIG_VIRTIO_FS Support
Command:
nix-shell -p linux --run "zcat /proc/config.gz | grep CONFIG_VIRTIO_FS"
Kernel Version:
nix eval nixpkgs#linux.version --raw
Version: 6.12.63
Result:
CONFIG_VIRTIO_FS=m
Status: ✅ PASS - virtio-fs is enabled as a loadable kernel module
Notes:
- Linux kernel 6.12.63 is much newer than the required 5.4+
- CONFIG_VIRTIO_FS is compiled as a module (
=m) - Module will be available in NixOS VM builds by default
- virtio-fs driver can be loaded on-demand
NixOS-Specific Considerations
Module Loading
- Kernel module
virtiofswill need to be loaded in the guest - NixOS typically handles this automatically via
boot.initrd.availableKernelModulesor runtime modprobe
QEMU Integration
- QEMU package in nixpkgs is the full-featured build
- Includes vhost-user-fs device support
- No custom QEMU build needed
virtiofsd Daemon
- Must be started on the host before launching VM
- Requires socket path for communication with QEMU
- NixOS can manage this via systemd if desired
Conclusion
✅ ALL PREREQUISITES AVAILABLE
All required components for virtio-fs are present in nixpkgs:
- ✅ QEMU 10.1.2 (requirement: 4.2.0+)
- ✅ virtiofsd 1.13.2 (standalone package)
- ✅ Linux kernel 6.12.63 with CONFIG_VIRTIO_FS=m (requirement: 5.4+)
No blockers identified. We can proceed with virtio-fs implementation.
Next Steps
- Design virtiofsd socket/daemon management strategy
- Update QEMU launch arguments to use vhost-user-fs-pci device
- Configure guest kernel to mount virtio-fs filesystems
- Update NixOS VM flake to include virtiofsd in systemPackages or as a service