Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

Docker fails to start

Open Otus9051 opened this issue 4 years ago • 33 comments

Whenever I am trying the start OSX with this command

docker run \ 
    --device /dev/kvm \
    --device /dev/snd \
    -v /tmp/X11-unix:/tmp/X11-unix \ 
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

This happens

docker: unknown server OS: .

This is my uname -a

Linux garuda 5.10.7-111-tkg-bmq #1 TKG SMP PREEMPT Sun, 17 Jan 2021 02:26:07 +0000 x86_64 GNU/Linux

The distro I am using is Garuda Linux based on Arch Linux with 5.10.7-111-TKG-BMQ Kernel

Otus9051 avatar Jan 20 '21 10:01 Otus9051

add sudo docker run

wulei-github avatar Jan 23 '21 09:01 wulei-github

add sudo docker run

Forgot to include that I did do it, but it didn't work and the error was same.

Otus9051 avatar Jan 23 '21 12:01 Otus9051

sudo dockerd

Your docker daemon is off

sickcodes avatar Jan 25 '21 05:01 sickcodes

@sickcodes well i did do sudo dockerd Dunno what is with up with my OS

Otus9051 avatar Jan 25 '21 11:01 Otus9051

Whenever I am trying the start OSX with this command

docker run \ 
    --device /dev/kvm \
    --device /dev/snd \
    -v /tmp/X11-unix:/tmp/X11-unix \ 
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

This happens

docker: unknown server OS: .

This is my uname -a

Linux garuda 5.10.7-111-tkg-bmq #1 TKG SMP PREEMPT Sun, 17 Jan 2021 02:26:07 +0000 x86_64 GNU/Linux

The distro I am using is Garuda Linux based on Arch Linux with 5.10.7-111-TKG-BMQ Kernel

You have a trailing space after docker run \_

sickcodes avatar Jan 25 '21 12:01 sickcodes

@sickcodes

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: unknown server OS: .
See 'docker run --help'.

Otus9051 avatar Jan 27 '21 05:01 Otus9051

docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest

You have a trailing space on the first line.

sickcodes avatar Jan 27 '21 14:01 sickcodes

image @sickcodes (I couldn't copy paste it as i cant figure out how to)

Otus9051 avatar Jan 29 '21 06:01 Otus9051

Tried xhost + ?

Silfalion avatar Jan 30 '21 00:01 Silfalion

What's that?

Otus9051 avatar Jan 30 '21 03:01 Otus9051

Run it in your terminal then run your docker command

Silfalion avatar Jan 30 '21 04:01 Silfalion

nope. same thing.

Otus9051 avatar Jan 30 '21 09:01 Otus9051

echo $DISPLAY If this is blank you have no screen.

egrep -c '(svm|vmx)' /proc/cpuinfo If this is 0, turn on hardware virt in your bios.

sickcodes avatar Jan 30 '21 11:01 sickcodes

> echo $DISPLAY
:0
> egrep -c '(svm|vmx)' /proc/cpuinfo
4

Otus9051 avatar Jan 30 '21 11:01 Otus9051

docker: unknown server OS: .
See 'docker run --help'.

This happens when dockerd is off

Can you confirm the docker daemon is running? pgrep dockerd

sickcodes avatar Feb 02 '21 19:02 sickcodes

> pgrep dockerd
558

Otus9051 avatar Feb 03 '21 04:02 Otus9051

docker: unknown server OS: .
See 'docker run --help'.

Actually this error doesn't happen now Something is up with ALSA

Otus9051 avatar Feb 03 '21 04:02 Otus9051

I'll try the troubleshooting commands from the README.md See if that works...

Otus9051 avatar Feb 03 '21 04:02 Otus9051

I'll try the troubleshooting commands from the README.md

See if that works...

Sounds good! Can you let us know when you've fixed it?

sickcodes avatar Feb 03 '21 21:02 sickcodes

Welp... I gave up on it and decided to install the prebuilt image and now, the error is kinda like this...

> docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \
    sickcodes/docker-osx:auto

/usr/sbin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/arch/.ssh/id_docker_osx.pub"
ssh: connect to host 127.0.0.1 port 10022: Connection refused
Disk is being copied between layers. Repeating until able to copy SSH key into OSX...
No protocol specified

And this loops on and on and in until terminated...

Otus9051 avatar Feb 04 '21 06:02 Otus9051

Remove the OSX_COMMANDS line because it will close the image

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

sickcodes avatar Feb 04 '21 11:02 sickcodes

docker: Error response from daemon: failed to create endpoint peaceful_visvesvaraya on network bridge: failed to add the host (veth517af6d) <=> sandbox (vethe1632dd) pair interfaces: operation not supported. ERRO[0001] error waiting for container: context canceled

Otus9051 avatar Feb 05 '21 06:02 Otus9051

Welp... I gave up on it and decided to install the prebuilt image and now, the error is kinda like this...

> docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \
    sickcodes/docker-osx:auto

/usr/sbin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/arch/.ssh/id_docker_osx.pub"
ssh: connect to host 127.0.0.1 port 10022: Connection refused
Disk is being copied between layers. Repeating until able to copy SSH key into OSX...
No protocol specified

And this loops on and on and in until terminated...

The same is happening with me when I'm trying to use docker-osx:auto. ~~And it gives gtk initialization has failed when running docker-osx:latest.~~

The docker-osx:latest worked. had to run xhost + prior running the commands.

mostwanted002 avatar Mar 12 '21 08:03 mostwanted002

@mostwanted002 @Otus9051

-e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \

Will run, inside Mac's Terminal:

bin/bash -c "pwd && uname -a"

pwd is print working directory

uname -a will print system info

Then it will exit, the entire container.

Remove that line if you want to stay running, or add && /bin/bash at the end

sickcodes avatar Mar 13 '21 06:03 sickcodes

I'm trying to run but i got this error Unable to init server: Could not connect: Connection refused qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory QEMU 5.2.0 monitor - type 'help' for more information (qemu) Can anyone help me? I am trying the start OSX with this command sudo docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest

gab3-dev avatar Mar 13 '21 23:03 gab3-dev

Connect refused is either /dev/kvm permissions, xhost +, or you're not in libvirt, docker or kvm groups, or you're running with root

sickcodes avatar Mar 14 '21 06:03 sickcodes

I've tried to run now but I got this error gtk initialization failed

gab3-dev avatar Mar 14 '21 23:03 gab3-dev

add sudo docker run

it is not recommand to run docker with sudo. It may be dangerous

BackMountainDevil avatar Jul 02 '21 14:07 BackMountainDevil

who is running on WSL, and are getting stuck on docker: unknown server OS: . must to use Docker on Windows Client and extern it to wsl v2

check https://docs.docker.com/docker-for-windows/wsl/

make sure that your distro is enabled

after that, You can run it perfectly.

docker run -it \
   --device /dev/kvm \
   -p 50922:10022 \
   -v /tmp/.X11-unix:/tmp/.X11-unix \
   -e "DISPLAY=${DISPLAY:-:0.0}" \
   -e GENERATE_UNIQUE=true \
   -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist \
   sickcodes/docker-osx:big-sur

allansrc avatar Jul 23 '21 21:07 allansrc

who is running on WSL, and are getting stuck on docker: unknown server OS: . must to use Docker on Windows Client and extern it to wsl v2

check https://docs.docker.com/docker-for-windows/wsl/

make sure that your distro is enabled

after that, You can run it perfectly.

docker run -it \
   --device /dev/kvm \
   -p 50922:10022 \
   -v /tmp/.X11-unix:/tmp/.X11-unix \
   -e "DISPLAY=${DISPLAY:-:0.0}" \
   -e GENERATE_UNIQUE=true \
   -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist \
   sickcodes/docker-osx:big-sur

Fantastic! It runs perfectly now? Thank you for letting us know :)

sickcodes avatar Jul 23 '21 21:07 sickcodes