Fix /dev/kvm missing ("Could not access KVM kernel module")
Confirmed on this machine (omarchy 4.0.2-1, kernel 7.1.9, systemd 261.2-1, libvirt 1:12.6.0-1, qemu-desktop 11.1.0-1, virt-manager 5.1.0-4) that the record's central access claim is false. ls -l /dev/kvm returns crw-rw-rw- 1 root kvm 10, 232, mode 0666, and /usr/lib/udev/rules.d/50-udev-default.rules:116 from systemd sets KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm". Upstream systemd has MODE="{{DEV_KVM_MODE}}" on the same line, so 0666 is Arch's build value and I verified it locally rather than assuming it. The record's Membership in kvm is what grants access to /dev/kvm and its previous audit note's /dev/kvm is root:kvm 0660 on Arch are both wrong, and they send a reader to edit groups for a problem groups do not cause. The group that matters is libvirt for the libvirt read-write socket, per the Arch Libvirt wiki's Using libvirt group section, and that page also records that Arch's /usr/share/polkit-1/rules.d/50-default.rules already treats wheel members as administrators, so a stock Omarchy user gets a password prompt and needs no group change. Second defect, from the kernel sources: the quoted AMD message kvm: no hardware support does not exist. I searched arch/x86/kvm/svm/svm.c, arch/x86/kvm/vmx/vmx.c, arch/x86/kvm/x86.c and virt/kvm/kvm_main.c at master and found no such string. The real AMD firmware message is SVM disabled (by BIOS) in MSR_VM_CR at arch/x86/kernel/cpu/amd.c:1116, and svm.c:500 prints SVM not supported by CPU %d. Third, the Intel string the record leads with is real (vmx.c:2949) but it sits behind if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL)), and feat_ctl.c sets that capability for every CPU that has the MSR, so a modern laptop with VT-x off falls through to vmx.c:2955, VMX not fully enabled on CPU %d. Check kernel logs and/or BIOS. Fourth and worst for a reader's time, the diagnostic order is misleading: feat_ctl.c:189 calls clear_cpu_cap(c, X86_FEATURE_VMX) and amd.c:1117 calls clear_cpu_cap(c, X86_FEATURE_SVM) when firmware disabled the feature, so an empty grep -Eo 'vmx|svm' /proc/cpuinfo is exactly what a firmware-disabled machine looks like, and the record's framing of that step as establish whether the CPU claims support at all plus its closing nested-virtualization paragraph tell the reader the opposite. On Omarchy specifically I confirmed that none of this stack is shipped: omarchy-base.packages and omarchy-other.packages carry only qemu-user-static-binfmt, and grep -rn 'usermod|gpasswd|-aG' /usr/share/omarchy/ returns only an unrelated input group removal in migrations/1787865477.sh, so Omarchy adds the user to no kvm or libvirt group. What held: the symptom text, the module names, the firmware setting names, the log-out-not-newgrp point, and libvirtd.service still working (its unit describes itself as libvirt legacy monolithic daemon and carries Also=virtlogd.socket and Also=virtlockd.socket, confirmed with systemctl cat). I rewrote danger because the original firmware caution is unsourced and I could not exercise it, while the real hazard in the record's own commands is -aG versus -G, which man usermod on this machine states directly. I kept the firmware caution as a caution. Not exercised: I have no sudo, so I did not run modprobe, read dmesg, change any group, or touch libvirt, which hosts other work on this machine. I did not test an AMD host or a machine with virtualization disabled in firmware, so the message-to-cause mapping above is read from the kernel sources rather than observed. Severity and frequency left alone: firmware-disabled virtualization is genuinely very common on prebuilt hardware and nothing here is lost data.
Keep the -a in sudo usermod -aG libvirt $USER. usermod -G libvirt $USER REPLACES your supplementary groups instead of adding to them, which drops wheel and with it sudo, and recovering needs a root shell or a single-user boot. man usermod states it plainly: -a, --append Add the user to the supplementary group(s). Use only with the -G option. On the firmware side, changing a virtualization setting can flip related security options and reorder boot devices on some vendors' setup screens, so note your current boot entry before you save so you can find Limine again.
Symptom
virt-manager greys out KVM or warns the host does not support it, and starting a VM fails with:
Could not access KVM kernel module: No such file or directory
failed to initialize kvm: No such file or directory
ls -l /dev/kvm says No such file or directory and lsmod | grep kvm prints nothing (or only kvm, never kvm_intel/kvm_amd).
Cause
Either the CPU virtualization extensions are switched off in firmware (very common on prebuilt desktops and on laptops), or the kvm_intel / kvm_amd module never loaded. Arch kernels build both as modules and udev loads the matching one on boot. The trap is that when firmware has the switch off the kernel CLEARS the CPU feature flag, so the flag is missing in both cases. On Intel, arch/x86/kernel/cpu/feat_ctl.c prints VMX (outside TXT) disabled by BIOS and then calls clear_cpu_cap(c, X86_FEATURE_VMX). On AMD, arch/x86/kernel/cpu/amd.c prints SVM disabled (by BIOS) in MSR_VM_CR and then calls clear_cpu_cap(c, X86_FEATURE_SVM). An empty grep -Eo 'vmx|svm' /proc/cpuinfo therefore does not tell a CPU with no support apart from one whose firmware switch is off, and only the kernel log separates them. Permission on /dev/kvm is NOT the cause on Arch or Omarchy: systemd's udev rules create the node mode 0666, so every user can already open it. The group that gates anything is libvirt, and only for the libvirt daemon socket, not for /dev/kvm.
Fix
Read the kernel's verdict, do not guess from the CPU flags. Both vendors clear the flag when firmware has virtualization switched off, so an empty result below is ambiguous rather than a diagnosis:
LC_ALL=C.UTF-8 lscpu | grep -i Virtualization # the line is ABSENT, not "none", once the flag is cleared
grep -Eo 'vmx|svm' /proc/cpuinfo | sort -u # empty means no support OR firmware off
Load the module and read why it refused. dmesg needs root on Arch because kernel.dmesg_restrict = 1:
sudo modprobe kvm_intel # or kvm_amd on AMD
sudo dmesg | grep -i -E 'kvm|vmx|svm|VM_CR|FEAT_CTL'
Match the message against the kernel sources:
Intel
VMX (outside TXT) disabled by BIOSat boot, plusVMX not fully enabled on CPU 0. Check kernel logs and/or BIOSfrom the modprobe. The firmware switch is off. This is the usual case on a laptop, and it is the message to expect on any CPU new enough to haveMSR_IA32_FEAT_CTL.VMX not enabled (by BIOS) in MSR_IA32_FEAT_CTL on CPU 0. Same conclusion, but this branch is only reached on CPUs old enough to lack that MSR.VMX not supported by CPU 0with nodisabled by BIOSline anywhere in the log. The CPU genuinely has no VT-x.
AMD
SVM disabled (by BIOS) in MSR_VM_CRat boot. The firmware switch is off.SVM not supported by CPU 0from the modprobe together with thatMSR_VM_CRboot line. Same cause, reported twice, because the boot path already cleared the flag.SVM not supported by CPU 0with noMSR_VM_CRline. The CPU genuinely has no AMD-V.
If the log says firmware, reboot into UEFI setup and enable it. It is called *Intel VT-x* / *Intel Virtualization Technology* / *SVM Mode* / *AMD-V*, usually under CPU or Advanced settings. On many boards it sits next to the overclocking options, and on some Lenovo and HP laptops there is a separate *VT-d* entry for IOMMU.
Access to the device needs nothing on Arch or Omarchy. /dev/kvm is world read-write:
ls -l /dev/kvm
# crw-rw-rw- 1 root kvm 10, 232 /dev/kvm
That mode comes from systemd's own rule, not from anything Omarchy sets:
# /usr/lib/udev/rules.d/50-udev-default.rules
KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"
So plain qemu-system-x86_64 -enable-kvm works with no group change. What group membership buys you is libvirt: members of libvirt get password-less access to the libvirt read-write socket, and on Arch anyone in wheel already gets a polkit password prompt for the same socket instead. On a stock Omarchy 4 install the user is in wheel, so virt-manager works with a prompt and no group edit at all. Add yourself to libvirt only if you want the prompt gone:
sudo usermod -aG libvirt "$USER" # keep the -a, see the danger note
id -nG | tr ' ' '\n' | grep -E 'kvm|libvirt|wheel'
Log out of Hyprland and back in. Group membership is fixed when the session is created, so newgrp alone is not enough for the already-running session.
Start the daemon. Socket activation is the lighter path and needs no always-running daemon:
sudo systemctl enable --now libvirtd.socket virtlogd.socket
The monolithic daemon still works and its own unit calls itself libvirt legacy monolithic daemon. Enabling it pulls in virtlogd.socket and virtlockd.socket through Also=, so there is no need to enable those separately:
sudo systemctl enable --now libvirtd.service
Omarchy 4 installs none of this stack. /usr/share/omarchy/install/omarchy-base.packages carries only qemu-user-static-binfmt, and qemu-desktop, libvirt and virt-manager are yours to install. No Omarchy install script adds you to kvm or libvirt either, so all of the group work above is the user's.
If the boot log carries no disabled by BIOS and no MSR_VM_CR line, and the only message is VMX not supported or SVM not supported, then the CPU or the hypervisor above you is the limit. Check whether this machine is itself a guest, and if it is, enable nested virtualization on the outer host.
Verify
ls -l /dev/kvm shows crw-rw-rw- 1 root kvm, lsmod | grep kvm lists kvm_intel or kvm_amd alongside kvm, sudo dmesg | grep -i -E 'vmx|svm' shows no disabled by BIOS and no MSR_VM_CR line, and virt-manager opens a qemu:///system connection without warning that the host does not support KVM.
Sources
- https://wiki.archlinux.org/title/KVM
- https://wiki.archlinux.org/title/Libvirt
- https://wiki.archlinux.org/title/QEMU
- https://raw.githubusercontent.com/torvalds/linux/master/arch/x86/kvm/vmx/vmx.c
- https://raw.githubusercontent.com/torvalds/linux/master/arch/x86/kvm/svm/svm.c
- https://raw.githubusercontent.com/torvalds/linux/master/arch/x86/kernel/cpu/feat_ctl.c
- https://raw.githubusercontent.com/torvalds/linux/master/arch/x86/kernel/cpu/amd.c
- https://raw.githubusercontent.com/systemd/systemd/main/rules.d/50-udev-default.rules.in