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
36.2k stars 1.79k forks source link

No protocol specified Unable to init server #15

Closed Cristuker closed 4 years ago

Cristuker commented 4 years ago

I run

sudo apt install x11-xserver-utils

and

sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx     

No protocol specified
Unable to init server: Could not connect: Connection refused
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize kvm: Permission denied
sickcodes commented 4 years ago

Please post output:

egrep -c '(svm|vmx)' /proc/cpuinfo
ls -l /dev/kvm
pgrep -a X
echo $SHELL
echo $DISPLAY

Try this command: docker run --privileged --net host --cap-add=ALL -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -v /lib/modules:/lib/modules sickcodes/docker-osx

Cristuker commented 4 years ago

Sorry, i try other commands and read the readme whit attention this issue is unecessary, my mistake, sorry.

sickcodes commented 4 years ago

Thanks mate :) which command worked for you?

proequilibrium commented 3 years ago

I had same issue, after another which was solved by https://github.com/sickcodes/Docker-OSX troubleshoots. Finaly I used the first docker command and it works. docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx

sickcodes commented 3 years ago

I had same issue, after another which was solved by https://github.com/sickcodes/Docker-OSX troubleshoots.

Finaly I used the first docker command and it works.

docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx

Thanks for letting us know :)