Arch Linux, failed to add custom device "/dev/kvm" #298

Closed
opened 2025-12-29 00:23:37 +01:00 by adam · 1 comment
Owner

Originally created by @SlinkousArt on GitHub (Jan 9, 2022).

Linux ThiccArch 5.15.13-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 05 Jan 2022 16:21:01 +0000 x86_64 GNU/Linux
:0
1
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme1n1p3  439G   17G  400G   5% /home
QEMU emulator version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 7.10.0
               total        used        free      shared  buff/cache   available
Mem:            14Gi       2.4Gi        10Gi       302Mi       1.9Gi        12Gi
Swap:          4.0Gi          0B       4.0Gi
16
16
ls: cannot access '/dev/kvm': No such file or directory
total 0
drwxrwxrwt  2 root root  60 Jan  9 11:28 .
drwxrwxrwt 14 root root 360 Jan  9 12:05 ..
srwxrwxrwx  1 root root   0 Jan  9 11:28 X0
root       37374  0.0  0.0  17596  8024 pts/1    S+   11:49   0:00 sudo -p ?[1;31mPassword: ?[0;0m dockerd
root       37375  0.0  0.5 2420296 91144 pts/1   Sl+  11:49   0:00 dockerd
slinkous   39354  0.0  0.0   6492  2428 pts/0    S+   12:05   0:00 grep dockerd
kvm:x:992:
libvirt:x:970:
docker:x:965:
~/ docker run -idocker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

# docker build -t docker-osx .
docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory.
ERRO[0000] error waiting for container: context canceled 
~/ 
Originally created by @SlinkousArt on GitHub (Jan 9, 2022). ``` Linux ThiccArch 5.15.13-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 05 Jan 2022 16:21:01 +0000 x86_64 GNU/Linux :0 1 NAME="Arch Linux" PRETTY_NAME="Arch Linux" Filesystem Size Used Avail Use% Mounted on /dev/nvme1n1p3 439G 17G 400G 5% /home QEMU emulator version 6.2.0 Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 7.10.0 total used free shared buff/cache available Mem: 14Gi 2.4Gi 10Gi 302Mi 1.9Gi 12Gi Swap: 4.0Gi 0B 4.0Gi 16 16 ls: cannot access '/dev/kvm': No such file or directory total 0 drwxrwxrwt 2 root root 60 Jan 9 11:28 . drwxrwxrwt 14 root root 360 Jan 9 12:05 .. srwxrwxrwx 1 root root 0 Jan 9 11:28 X0 root 37374 0.0 0.0 17596 8024 pts/1 S+ 11:49 0:00 sudo -p ?[1;31mPassword: ?[0;0m dockerd root 37375 0.0 0.5 2420296 91144 pts/1 Sl+ 11:49 0:00 dockerd slinkous 39354 0.0 0.0 6492 2428 pts/0 S+ 12:05 0:00 grep dockerd kvm:x:992: libvirt:x:970: docker:x:965: ``` ``` ~/ docker run -idocker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ sickcodes/docker-osx:latest # docker build -t docker-osx . docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory. ERRO[0000] error waiting for container: context canceled ~/ ```
adam closed this issue 2025-12-29 00:23:37 +01:00
Author
Owner

@SlinkousArt commented on GitHub (Jan 9, 2022):

Update: solved by looking at dmesg when trying to enable kvm_amd, turns out virtualization was disabled in bios again, no idea how that happened.

@SlinkousArt commented on GitHub (Jan 9, 2022): Update: solved by looking at dmesg when trying to enable `kvm_amd`, turns out virtualization was disabled in bios again, no idea how that happened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#298