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
45.36k stars 2.4k forks source link

qemu error #170

Closed PerennialWheatSA closed 3 years ago

PerennialWheatSA commented 3 years ago

system specs: cpu: amd ryzen 9 5900x gpu: rtx 3080 motherboard chipset: X570 OS: arch linux

When i run the image with docker run -it \--device /dev/kvm \-p 50922:10022 \-v /tmp/.X11-unix:/tmp/.X11-unix \-e "DISPLAY=${DISPLAY:-:0.0}" \sickcodes/docker-osx:latest

I get the error

https://gist.github.com/PerennialWheat/dd0dfdfcbb0fbf41338e0ab1a35e75af

sickcodes commented 3 years ago

Add yourself to kvm group or chmod 666 /dev/kvm but post the output of this and you’ll be able to see

uname -a \
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \
; grep NAME /etc/os-release \
; df -h . \
; qemu-system-x86_64 --version \
; libvirtd --version \
; free -mh \
; nproc \
; egrep -c '(svm|vmx)' /proc/cpuinfo \
; ls -lha /dev/kvm \
; ls -lha /tmp/.X11-unix/ \
; ps aux | grep dockerd \
; docker ps | grep osx \
; grep "docker\|kvm\|virt" /etc/group
sickcodes commented 3 years ago

Most conceivable errors are covered here:

https://github.com/sickcodes/Docker-OSX#troubleshooting

In your case, add yourself to the relevant groups and start libvirtd etc should be fine!

If you don’t have a screen, use one one of the headless examples below the original example :)

PerennialWheatSA commented 3 years ago

Add yourself to kvm group or chmod 666 /dev/kvm but post the output of this and you’ll be able to see

uname -a \
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \
; grep NAME /etc/os-release \
; df -h . \
; qemu-system-x86_64 --version \
; libvirtd --version \
; free -mh \
; nproc \
; egrep -c '(svm|vmx)' /proc/cpuinfo \
; ls -lha /dev/kvm \
; ls -lha /tmp/.X11-unix/ \
; ps aux | grep dockerd \
; docker ps | grep osx \
; grep "docker\|kvm\|virt" /etc/group

Thank you it worked