mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-12 13:30:26 +01:00
"/dev/kvm": no such file or directory #100
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xiaoqi7s on GitHub (Jan 18, 2021).
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest
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
@sickcodes commented on GitHub (Jan 18, 2021):
You need to install kvm https://github.com/sickcodes/Docker-OSX#requirements-kvm-on-the-host
@xiaoqi7s commented on GitHub (Jan 18, 2021):
My system is centos and I installed it with command :
sudo yum install libvirt qemu-kvm
sudo systemctl enable libvirtd.service
sudo systemctl enable virtlogd.service
sudo modprobe kvm
reboot
when I run docker,it's error:
@sickcodes commented on GitHub (Jan 25, 2021):
Is this a server or desktop? This happens when your CPU does not support hardware virtualization.
Try a different server, like Digital Ocean, which works perfectly.
@ghasemikasra39 commented on GitHub (Apr 3, 2021):
I am getting the same error on
Ubuntu 20.04.2.0 LTS. The command I run:The output I get:
What I tried:
@sickcodes commented on GitHub (Apr 4, 2021):
The server does not support KVM, which cloud is it?
@mgkha commented on GitHub (May 5, 2021):
I got the same error on digital ocean.
@sickcodes commented on GitHub (May 9, 2021):
This sets you up on Digital Ocean,
https://github.com/sickcodes/Docker-OSX/blob/master/tests/test.sh
Just ignore the
docker pushcommands at the end.@howthegodschill commented on GitHub (Oct 18, 2021):
Currently running Centos 7 with an Intel CPU and full virtualization support and am running into this same issue
@sickcodes commented on GitHub (Oct 18, 2021):
I am using compute optimized instances, I don't believe the lower image tiers support nested virtualization.
@ZGuQing commented on GitHub (Apr 3, 2022):
@ZGuQing commented on GitHub (Apr 3, 2022):
@dm-for-git commented on GitHub (Aug 7, 2022):
It seems a silly question but can I use this image on a Monterey macOS host machine running on a M1 pro macbook?
Because I got the same error when trying to install your Monterey image
error gathering device information while adding custom device "/dev/kvm": no such file or directory@ghost commented on GitHub (Sep 19, 2022):
Hi everyone!
I'm trying to install BLISSOS on Linux Mint 20.3, Kernel 5.4.0-125, Intel i3-7100. Nvidia GP107, 8Gb RAM
I do every step as indicated in https://docs.blissos.org/install-bliss-os/run-from-docker
But I'm stucked on
docker run -it
--device /dev/kvm
-v /tmp/.X11-unix:/tmp/.X11-unix
-e RAM=4
-e "DISPLAY=${DISPLAY:-:0.0}"
-p 5555:5555
sickcodes/dock-droid:latest
ERRO[0000] error waiting for container: context canceled
Any help?
@Areopagitics commented on GitHub (Dec 8, 2022):
I get the same error on PopOS (Ubuntu 22.04)
@Tyree commented on GitHub (Dec 12, 2022):
Same. I'm no linux pro, but I've done everything I can find to do and I still get the "no such file or directory" for /dev/kvm. But it's there. I have taken ownership of it. kvm-ok says I'm good to go. Check CPU capabilities is good. I'm at a loss.
@Areopagitics commented on GitHub (Dec 16, 2022):
exactly the same
@youssef-sobhy commented on GitHub (Dec 19, 2022):
has anyone been able to fix this issue? facing the same issue on PopOS 22.04
@Areopagitics commented on GitHub (Dec 20, 2022):
I just tried it using the docker CLI and now it boots up to
In Memory Stackshot SuceededSTAY AWAY FROM DOCKER DESKTOP and make sure to use sudo before the docker command
https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository

@sickcodes commented on GitHub (Dec 20, 2022):
Can you show me which Docker version? I may need to update Docs about secomp and privileged use
@Areopagitics commented on GitHub (Dec 20, 2022):
docker -v outputs
Docker version 20.10.22, build 3a2c30bI am also using PopOs 22.04 (Ubuntu based) on a Ryzen 9 4900h laptop (Asus TUF506IV)
@ChristopherSargent commented on GitHub (Jan 14, 2023):
If you are using a virtual machine the above error is likely due to nested virtualization being disabled (as the automatic selection by the hypervisor is usually to disable it). This can be enabled on KVM and VMware. Below are screenshots of examples.
vCenter with esxi host:

KVM ubuntu host:

Once enabled you will get the following when running the command:
echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs && modprobe kvm
1
instead of
echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs && modprobe kvm
INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used
or
kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
instead of
kvm-ok
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
@AZetZ commented on GitHub (Jan 26, 2024):
To solve problem you can go to BIOS and change settings. For my AMD processor I needed to enabled the AMD V Technology.
@CrypticGuru commented on GitHub (Mar 3, 2024):
I also had to enable virtualization in my BIOS for this to work (
sudo kvm-okhinted to me that it wasn't enabled). You'll have to google how to do this for your specific BIOS version, but this solved it for me!@heruit777 commented on GitHub (Mar 14, 2024):
I used sudo before docker command and it worked for me. Thank you!
@ChronSyn commented on GitHub (Jul 22, 2024):
In case anyone is searching for an Unraid-specific solution, make sure VM support is enabled (Settings -> VM Management).
If enabled is set to 'false', the
/dev/kvmpath isn't present, and this container and other 'InDocker'-like containers will fail to start due to the missing path.To resolve, set 'enabled' to 'true'.
@chriscarrollsmith commented on GitHub (Dec 2, 2024):
This fixed it for me; thank you!