SECURITY WARNING: Never run commands you don't understand. Always review code before execution. Use at your own risk.
Virtualization New Added 15 October 2026

libvirt: Cannot access storage file (as uid:107, gid:107): Permission denied

The system libvirt daemon starts QEMU as an unprivileged user (qemu or libvirt-qemu, uid 107 on many distributions), not as you. That user needs search permission on every directory leading to the disk image, so an image in your home directory fails even when the file itself is world readable. On Fedora and RHEL, SELinux labels cause the same message with perfectly normal file permissions.

Quick fix

Read the commands before running them. Anything that restarts a service, deletes data or changes permissions should be tried on a non-production system first.

Quick fix
# Which user does QEMU run as, and can it reach the file?
grep -E '^#?user|^#?group' /etc/libvirt/qemu.conf
namei -l /home/alex/vms/disk.qcow2
sudo -u qemu head -c1 /home/alex/vms/disk.qcow2   # libvirt-qemu on Debian/Ubuntu

# Simplest fix: keep images in the default pool
sudo mv /home/alex/vms/disk.qcow2 /var/lib/libvirt/images/

# Or grant search permission on the path only
setfacl -m u:qemu:x /home/alex /home/alex/vms

# SELinux: check for a denial and relabel
sudo ausearch -m avc -ts recent | grep qemu
sudo semanage fcontext -a -t virt_image_t '/home/alex/vms(/.*)?'
sudo restorecon -Rv /home/alex/vms

How to diagnose Virtualization errors

Virtualisation errors are usually about hardware virtualisation access: either it is disabled in firmware, or another hypervisor already holds it. On Windows, Hyper-V, WSL 2, Docker Desktop, Credential Guard and memory integrity all claim the virtualisation extensions, and VirtualBox or VMware then fails with a message that mentions VT-x but not the actual conflict.

If the quick fix above does not resolve it, work through these steps. They apply to this whole class of error, not just to this one message, which is usually what saves the time.

  1. Confirm virtualisation is enabled at the CPU level: grep -E 'vmx|svm' /proc/cpuinfo on Linux, or the Performance tab of Task Manager on Windows.
  2. On Windows, check what else is using the hypervisor: bcdedit /enum | findstr hypervisorlaunchtype and whether Hyper-V, WSL 2 or Core Isolation are enabled.
  3. On Linux, check /dev/kvm exists and that your user is in the kvm group; nested virtualisation must be enabled explicitly on cloud VMs.
  4. Match guest additions and tools versions to the hypervisor version: mismatches cause shared folders, clipboard and display problems that look like guest OS bugs.
  5. For WSL, run wsl --status and wsl --update; most WSL 2 errors are a stale kernel or a disabled Virtual Machine Platform feature.

Tools worth reaching for

  • grep -E 'vmx|svm' /proc/cpuinfo
  • wsl --status
  • bcdedit /enum
  • ls -l /dev/kvm
  • systemctl status libvirtd

Authoritative references

Primary documentation for this error, worth reading before applying any fix in production.

libvirt.org

Related Virtualization errors

See all 20 Virtualization errors →

Browse other categories

Something missing or wrong?

This entry is maintained by hand. If the fix is out of date, incomplete, or you have a better one, email a correction and it will be reviewed.