sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
48.63k stars 2.71k forks source link

fix for "error gathering device information while adding custom device "/dev/kvm": no such file or directory." #786

Closed fluffy-git closed 4 months ago

fluffy-git commented 4 months ago

not really an issue, but wanted to share this so others don't have to go through hours of troubleshooting like i had

tl;dr: don't use docker-desktop on linux.

Docker desktop changes docker config so that all docker commands execute through docker-desktop, and for some reason docker desktop is unable to see /dev/kvm/. so the solution to this problem when having docker-desktop installed, is to completely remove docker desktop

to completely remove docker-desktop first follow this guide in the docker-desktop docs. (you might also want to delete ~/.docker, but be careful, this deletes all docker configs and containers as far as i know, so make a backup of it)

now execute these two commands to return the docker context to normal:

now restart and it should be fixed if everything else is configured correctly