[Pkg-libvirt-maintainers] Bug#1149603: libvirtd fails node-device/udev init: "Unable to find default local file monitor type" under systemd
Steve Newcomb
srn at coolheads.com
Thu Oct 1 14:02:22 BST 2026
Package: libvirt-daemon-system
Version: 11.3.0-3+deb13u3
Severity: normal
X-Debbugs-Cc: srn at coolheads.com
On a stock trixie install, immediately after installing
qemu-system-x86/libvirt-daemon-system/virtinst and nothing else unusual
(no custom AppArmor policy, no systemd overrides at the time), starting
libvirtd fails its udev/node-device driver initialization with:
Unable to find default local file monitor type
This is immediately followed by a cascade of inotify-instance-exhaustion
errors ("Failed to allocate directory watch: Too many open files") as
libvirtd repeatedly retries file-monitor setup and burns through
fs.inotify.max_user_instances.
Root cause: libvirtd's node-device driver uses GLib/GIO's GFileMonitor
abstraction, which autodetects a backend (inotify, kqueue, etc.) based on
environment/build configuration. That autodetection fails specifically
under libvirtd.service's minimal systemd-supplied environment -- confirmed
by running the identical libvirtd binary interactively from a login shell,
where GIO's autodetection succeeds without issue. This is a known class of
GIO/GLib issue; the documented workaround is forcing the backend
explicitly via the GIO_USE_FILE_MONITOR environment variable.
Steps to reproduce:
1. Fresh trixie install, `apt install qemu-system-x86 qemu-utils \
libvirt-daemon-system libvirt-clients virtinst bridge-utils \
dnsmasq-base`.
2. `systemctl start libvirtd` (or let it start via socket activation).
3. Observe `journalctl -u libvirtd` / the libvirtd log: "Unable to find
default local file monitor type", then repeated
"Failed to allocate directory watch: Too many open files".
Workaround that resolves it completely:
mkdir -p /etc/systemd/system/libvirtd.service.d
cat > /etc/systemd/system/libvirtd.service.d/override.conf <<'CONF'
[Service]
Environment=GIO_USE_FILE_MONITOR=inotify
CONF
systemctl daemon-reload
systemctl restart libvirtd.service
Requesting this (or an equivalent fix) be incorporated into the shipped
libvirtd.service unit, since the failure reproduces on a stock install
with no unusual configuration, and the symptom (a GIO internals message
followed by an unrelated-looking inotify exhaustion cascade) gives no
direct hint toward this specific, narrow fix.
-- System Information:
Debian Release: 13.7
APT prefers stable
Architecture: amd64
Kernel: Linux moe 6.12.107+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.107-1 (2026-08-29) x86_64 (SMP)
Versions of relevant packages:
ii libvirt-daemon-system 11.3.0-3+deb13u3
ii libvirt-daemon 11.3.0-3+deb13u3
ii libvirt-daemon-driver-nodedev 11.3.0-3+deb13u3
ii qemu-system-x86 1:10.0.13+ds-0+deb13u1
ii systemd 257.13-1~deb13u1
More information about the Pkg-libvirt-maintainers
mailing list