Permissions issues with qemu-system-x86_64 #2

Closed
opened 2025-12-28 23:20:18 +01:00 by adam · 36 comments
Owner

Originally created by @xlash123 on GitHub (Jun 4, 2020).

When running the provided run command: sudo docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx, I get the following errors:

qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-r7nn5J3cVN: Connection refused
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize kvm: Permission denied

I'm not sure what I did wrong. Even running the docker command with sudo doesn't do anything (not that I really expected it to).

The image I pulled is the one from Docker Hub of digest starting with 0eea6e25babb.

I'm running this with Docker CE version 19.03.11, build 42e35e61f3 on Ubuntu 18.04.

Originally created by @xlash123 on GitHub (Jun 4, 2020). When running the provided run command: `sudo docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx`, I get the following errors: ``` qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-r7nn5J3cVN: Connection refused Could not access KVM kernel module: Permission denied qemu-system-x86_64: failed to initialize kvm: Permission denied ``` I'm not sure what I did wrong. Even running the docker command with sudo doesn't do anything (not that I really expected it to). The image I pulled is the one from Docker Hub of digest starting with 0eea6e25babb. I'm running this with Docker CE version 19.03.11, build 42e35e61f3 on Ubuntu 18.04.
adam closed this issue 2025-12-28 23:20:18 +01:00
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

I've just checked the Docker Hub version and it works for me.

I added some KVM instructions to the readme.

Try the KVM section of the readme and you should be good to go.

@sickcodes commented on GitHub (Jun 4, 2020): I've just checked the Docker Hub version and it works for me. I added some KVM instructions to the readme. Try the KVM section of the readme and you should be good to go.
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

Ah, ok. I didn't know I needed to have that stuff installed as well on the host. I will test it out.

@xlash123 commented on GitHub (Jun 4, 2020): Ah, ok. I didn't know I needed to have that stuff installed as well on the host. I will test it out.
Author
Owner

@ghost commented on GitHub (Jun 4, 2020):

I'm also having the issue. It seems that arch isn't added to the kvm and libvirtd groups and doesn't have permission to use kvm.
EDIT: also /dev/kvm needs to be owned by the kvm group

@ghost commented on GitHub (Jun 4, 2020): I'm also having the issue. It seems that `arch` isn't added to the `kvm` and `libvirtd` groups and doesn't have permission to use kvm. EDIT: also `/dev/kvm` needs to be owned by the `kvm` group
Author
Owner

@roryrjb commented on GitHub (Jun 4, 2020):

You may have more luck with something like this:

$ 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
@roryrjb commented on GitHub (Jun 4, 2020): You may have more luck with something like this: ``` $ 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 ```
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

I have installed those dependencies and ran the systemctl commands and rebooted, but there's a new error now:

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

I noticed that one of the services that you said to start, virtlogd, doesn't seem to want to start. When running service --status-all, I get (for related services):

 [ + ]  docker
 [ + ]  libvirt-guests
 [ + ]  libvirtd
 [ - ]  virtlogd

The log for that service is:

Jun 04 13:51:04 [redacted] systemd[1]: Started Virtual machine log manager.
Jun 04 13:51:59 [redacted] systemd[1]: Stopping Virtual machine log manager...
Jun 04 13:51:59 [redacted] systemd[1]: Stopped Virtual machine log manager.

Any ideas on where to go from here?

@xlash123 commented on GitHub (Jun 4, 2020): I have installed those dependencies and ran the systemctl commands and rebooted, but there's a new error now: ``` 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 ``` I noticed that one of the services that you said to start, virtlogd, doesn't seem to want to start. When running `service --status-all`, I get (for related services): ``` [ + ] docker [ + ] libvirt-guests [ + ] libvirtd [ - ] virtlogd ``` The log for that service is: ``` Jun 04 13:51:04 [redacted] systemd[1]: Started Virtual machine log manager. Jun 04 13:51:59 [redacted] systemd[1]: Stopping Virtual machine log manager... Jun 04 13:51:59 [redacted] systemd[1]: Stopped Virtual machine log manager. ``` Any ideas on where to go from here?
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Check if your hardware virt is on
egrep -c '(svm|vmx)' /proc/cpuinfo

Try this
sudo usermod -aG docker $USER

Turn on docker daemon
sudo nohup dockerd &

@sickcodes commented on GitHub (Jun 4, 2020): Check if your hardware virt is on `egrep -c '(svm|vmx)' /proc/cpuinfo` Try this `sudo usermod -aG docker $USER` Turn on docker daemon `sudo nohup dockerd &`
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

@sickcodes, I already have virt turned on, docker daemon running, and am part of the docker user group.

The connection refused error went away (not sure how), but the permissions error is still there. Could it be that the user running in the Docker container is trying to use kvm on my machine, but it's not in the user group for KVM, so it fails? I noticed I get the same permissions error when I run kvm on my machine, but since I added myself to the usergroup, the error went away.

@xlash123 commented on GitHub (Jun 4, 2020): @sickcodes, I already have virt turned on, docker daemon running, and am part of the docker user group. The connection refused error went away (not sure how), but the permissions error is still there. Could it be that the user running in the Docker container is trying to use `kvm` on my machine, but it's not in the user group for KVM, so it fails? I noticed I get the same permissions error when I run `kvm` on my machine, but since I added myself to the usergroup, the error went away.
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Try adding all these:
sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager uml-utilities libguestfs-tools

EDIT: not required, see below for anyone reading.

@sickcodes commented on GitHub (Jun 4, 2020): Try adding all these: ~~`sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager uml-utilities libguestfs-tools`~~ EDIT: not required, see below for anyone reading.
Author
Owner

@luposlip commented on GitHub (Jun 4, 2020):

I've tried anything in the README and here, and (also) still have the same issue:

docker run --privileged -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

Ubuntu (Pop! OS) 20.04 BTW

@luposlip commented on GitHub (Jun 4, 2020): I've tried anything in the README and here, and (also) still have the same issue: ``` docker run --privileged -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 ``` Ubuntu (Pop! OS) 20.04 BTW
Author
Owner

@ghost commented on GitHub (Jun 4, 2020):

@sickcodes

  • arch isn't a member of the kvm and libvirtd groups

  • /dev/kvm needs to be owned by the kvm group

those two issues cause the permission denied error

@ghost commented on GitHub (Jun 4, 2020): @sickcodes - `arch` isn't a member of the `kvm` and `libvirtd` groups - `/dev/kvm` needs to be owned by the `kvm` group those two issues cause the permission denied error
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

Why are we running qemu on the host? Can't that go inside the Docker container?

@xlash123 commented on GitHub (Jun 4, 2020): Why are we running qemu on the host? Can't that go inside the Docker container?
Author
Owner

@luposlip commented on GitHub (Jun 4, 2020):

Just tried ghgrp kvm /dev/kvm. Now ls -la /dev/kvm reveals:

crw-rw----+ 1 root kvm 10, 232 Jun  4 20:56 /dev/kvm

Still same error.

@luposlip commented on GitHub (Jun 4, 2020): Just tried `ghgrp kvm /dev/kvm`. Now `ls -la /dev/kvm` reveals: ``` crw-rw----+ 1 root kvm 10, 232 Jun 4 20:56 /dev/kvm ``` Still same error.
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Mines like this
crw-rw-rw- 1 root kvm 10, 232 Jun 5 03:20 kvm

Try this:

sudo ghgrp kvm /dev/kvm
sudo chmod 666 /dev/kvm
@sickcodes commented on GitHub (Jun 4, 2020): Mines like this crw-rw-rw- 1 root kvm 10, 232 Jun 5 03:20 kvm Try this: ``` sudo ghgrp kvm /dev/kvm sudo chmod 666 /dev/kvm ```
Author
Owner

@Write commented on GitHub (Jun 4, 2020):

You may have more luck with something like this:

$ 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

Thanks, it worked for me. Ubuntu 20.04
I still had to sudo and get a few 'errors' but at least QEMU launched and macOS is loading

sudo 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
QEMU 5.0.0 monitor - type 'help' for more information
(qemu) ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
@Write commented on GitHub (Jun 4, 2020): > > > You may have more luck with something like this: > > ``` > $ 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 > ``` Thanks, it worked for me. Ubuntu 20.04 I still had to sudo and get a few 'errors' but at least QEMU launched and macOS is loading ``` sudo 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 QEMU 5.0.0 monitor - type 'help' for more information (qemu) ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `dac' ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' ```
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

These steps should set your host up for the QEMU on https://help.ubuntu.com/community/KVM/Installation

@sickcodes commented on GitHub (Jun 4, 2020): These steps should set your host up for the QEMU on https://help.ubuntu.com/community/KVM/Installation
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

I got it working after running sudo chmod 666 /dev/kvm and using 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 to start it. I'll try to isolate exactly what combination of tricks here got it to work.

@xlash123 commented on GitHub (Jun 4, 2020): I got it working after running `sudo chmod 666 /dev/kvm` and using `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` to start it. I'll try to isolate exactly what combination of tricks here got it to work.
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

Using the original run command docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx did not work. I had to use @roryrjb 's command. I did not need sudo for it to work.

For as much as I can tell, I only needed to run the following commands to get it working:

sudo chmod 666 /dev/kvm
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

It's hard for me to exactly narrow down what needs to be run because I'd have to undo some of the other suggestion to see where it breaks. Hopefully this is all that's needed.

@xlash123 commented on GitHub (Jun 4, 2020): Using the original run command `docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx` did not work. I had to use @roryrjb 's command. I did not need sudo for it to work. For as much as I can tell, I only needed to run the following commands to get it working: ```shell sudo chmod 666 /dev/kvm 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 ``` It's hard for me to exactly narrow down what needs to be run because I'd have to undo some of the other suggestion to see where it breaks. Hopefully this is all that's needed.
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Good to hear mate, I've added those tips to the troubleshooting page.

It's probably both of those commands that you need might need, someone else might have a better answer to why.

@sickcodes commented on GitHub (Jun 4, 2020): Good to hear mate, I've added those tips to the troubleshooting page. It's probably both of those commands that you need might need, someone else might have a better answer to why.
Author
Owner

@xlash123 commented on GitHub (Jun 4, 2020):

Also, after a relog/restart, I had to rerun sudo chmod 666 /dev/kvm to get it to work again.

@xlash123 commented on GitHub (Jun 4, 2020): Also, after a relog/restart, I had to rerun `sudo chmod 666 /dev/kvm` to get it to work again.
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Sticky tape fix but:
printf '\n%s\n' "sudo chmod 666 /dev/kvm" >> ~/.bashrc

It will turn on every relog.

or just edit it and add that at the bottom.

Something else might be fiddling with the permissions on reboot.

@sickcodes commented on GitHub (Jun 4, 2020): Sticky tape fix but: `printf '\n%s\n' "sudo chmod 666 /dev/kvm" >> ~/.bashrc` It will turn on every relog. or just edit it and add that at the bottom. Something else might be fiddling with the permissions on reboot.
Author
Owner

@luposlip commented on GitHub (Jun 4, 2020):

After trying everything above - including following the qemu guide, this is the best I can get:

docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx
[sudo] password for luposlip: 
No protocol specified
Unable to init server: Could not connect: Connection refused
QEMU 5.0.0 monitor - type 'help' for more information
(qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed

Seems like a lot of audio issues, I have alsa installed, and can restart it without errors with sudo alsa reload.

Plus the last gtk.

@luposlip commented on GitHub (Jun 4, 2020): After trying everything above - including following the qemu guide, this is the best I can get: ``` docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx [sudo] password for luposlip: No protocol specified Unable to init server: Could not connect: Connection refused QEMU 5.0.0 monitor - type 'help' for more information (qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `dac' ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' gtk initialization failed ``` Seems like a lot of audio issues, I have alsa installed, and can restart it without errors with `sudo alsa reload`. Plus the last gtk.
Author
Owner

@sickcodes commented on GitHub (Jun 4, 2020):

Ignore the alsa utils error, it will always be there unless I change the OpenBoot-Core.sh script from upstream repo.

Regarding the gtk error
Show the output of these:

pgrep -a X
echo $DISPLAY
echo $TERM

My output is:

1858 /usr/lib/Xorg -nolisten tcp :0 vt1
:0.0

Are you running Wayland window manager?

@sickcodes commented on GitHub (Jun 4, 2020): Ignore the alsa utils error, it will always be there unless I change the OpenBoot-Core.sh script from upstream repo. Regarding the gtk error Show the output of these: ``` pgrep -a X echo $DISPLAY echo $TERM ``` My output is: ``` 1858 /usr/lib/Xorg -nolisten tcp :0 vt1 :0.0 ``` Are you running Wayland window manager?
Author
Owner

@luposlip commented on GitHub (Jun 4, 2020):

Mine is:

1228 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/110/gdm/Xauthority -background none -noreset -keeptty -verbose 3
25016 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
35947 /usr/lib/virtualbox/VBoxXPCOMIPCD
:1
xterm-256color

I'm using the default Pop! OS windows manager (not sure which one that is).

@luposlip commented on GitHub (Jun 4, 2020): Mine is: ``` 1228 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/110/gdm/Xauthority -background none -noreset -keeptty -verbose 3 25016 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3 35947 /usr/lib/virtualbox/VBoxXPCOMIPCD :1 xterm-256color ``` I'm using the default Pop! OS windows manager (not sure which one that is).
Author
Owner

@muedie commented on GitHub (Jun 4, 2020):

Same issue here, outputs of above:

805 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{435e64b6-b308-4c8b-bafc-719e3f9be6c8} -background none -noreset -displayfd 17 -seat seat0 vt1
:0
xterm-256color

running manjaro-kde

@muedie commented on GitHub (Jun 4, 2020): Same issue here, outputs of above: ` 805 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{435e64b6-b308-4c8b-bafc-719e3f9be6c8} -background none -noreset -displayfd 17 -seat seat0 vt1` `:0` `xterm-256color` running manjaro-kde
Author
Owner

@mtdlewald commented on GitHub (Jun 4, 2020):

Same issue here running i3 on Arch
658 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{b0ec8f2a-fcc9-4dc4-9ef6-61b57a970849} -background none -noreset -displayfd 17 -seat seat0 vt1
:0
alacritty

@mtdlewald commented on GitHub (Jun 4, 2020): Same issue here running i3 on Arch 658 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{b0ec8f2a-fcc9-4dc4-9ef6-61b57a970849} -background none -noreset -displayfd 17 -seat seat0 vt1 :0 alacritty
Author
Owner

@sickcodes commented on GitHub (Jun 5, 2020):

Does this alternative application run without the error?

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix tukiyo3/teamviewer15

If you get the same error then it might have something to do with the x11 folder or the display number

In the dockerfile, you can change the :0.0 to :0

That might work but it will take half an hour to build so I apologize in advance if it’s not the solution.

Might have to dig deeper into the GTK error, could be missing some host libs since I am using Xfce and it’s window mananger compositor.

Try pulling the image again as well just in case.

Try installing virt-manager on the host. What does virt-manager look like on you guys’ displays?

If all else fails, try installing the AUR qt5 virt mananger it takes like 20 mins but it fills all the lib gaps, if there are any.

I’ll b back in a few hours though

@sickcodes commented on GitHub (Jun 5, 2020): Does this alternative application run without the error? `docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix tukiyo3/teamviewer15` If you get the same error then it might have something to do with the x11 folder or the display number In the dockerfile, you can change the :0.0 to :0 That might work but it will take half an hour to build so I apologize in advance if it’s not the solution. Might have to dig deeper into the GTK error, could be missing some host libs since I am using Xfce and it’s window mananger compositor. Try pulling the image again as well just in case. Try installing virt-manager on the host. What does virt-manager look like on you guys’ displays? If all else fails, try installing the AUR qt5 virt mananger it takes like 20 mins but it fills all the lib gaps, if there are any. I’ll b back in a few hours though
Author
Owner

@sickcodes commented on GitHub (Jun 5, 2020):

Mine is:

1228 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/110/gdm/Xauthority -background none -noreset -keeptty -verbose 3
25016 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
35947 /usr/lib/virtualbox/VBoxXPCOMIPCD
:1
xterm-256color

I'm using the default Pop! OS windows manager (not sure which one that is).

The dockerfile is trying to display on :0.0 but your desktop is running in :1. I will add the optional display argument.

If you want to build it now, just edit the Dockerfile and change the display env variable near the bottom to whichever number display you have. I again apologize if that’s not the error though but some other debugging messages might pop up during the build too and that could help.

@sickcodes commented on GitHub (Jun 5, 2020): > Mine is: > > ``` > 1228 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/110/gdm/Xauthority -background none -noreset -keeptty -verbose 3 > 25016 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3 > 35947 /usr/lib/virtualbox/VBoxXPCOMIPCD > :1 > xterm-256color > ``` > > I'm using the default Pop! OS windows manager (not sure which one that is). The dockerfile is trying to display on :0.0 but your desktop is running in :1. I will add the optional display argument. If you want to build it now, just edit the Dockerfile and change the display env variable near the bottom to whichever number display you have. I again apologize if that’s not the error though but some other debugging messages might pop up during the build too and that could help.
Author
Owner

@luposlip commented on GitHub (Jun 5, 2020):

I'll try tomorrow, it's getting really late now in Europe ;)

@luposlip commented on GitHub (Jun 5, 2020): I'll try tomorrow, it's getting really late now in Europe ;)
Author
Owner

@muedie commented on GitHub (Jun 5, 2020):

Output of running teamviewer:

Starting teamviewerd.............


Init...
CheckCPU: SSE2 support: yes
Checking setup...
Launching TeamViewer ...
Launching TeamViewer GUI ...
Aborted (core dumped)

Tried passing DISPLAY=:0 from docker flags as well --env DISPLAY=:0
& installed qt-virt-manager still no luck

@muedie commented on GitHub (Jun 5, 2020): Output of running teamviewer: ``` Starting teamviewerd............. Init... CheckCPU: SSE2 support: yes Checking setup... Launching TeamViewer ... Launching TeamViewer GUI ... Aborted (core dumped) ``` Tried passing DISPLAY=:0 from docker flags as well --env DISPLAY=:0 & installed qt-virt-manager still no luck
Author
Owner

@sickcodes commented on GitHub (Jun 5, 2020):

Ok it's an env issue, changing it now to always choose whichever display you're looking at

@sickcodes commented on GitHub (Jun 5, 2020): Ok it's an env issue, changing it now to always choose whichever display you're looking at
Author
Owner

@sickcodes commented on GitHub (Jun 5, 2020):

echo $DISPLAY

# ARCH
sudo pacman -S xorg-xhost

# UBUNTU DEBIAN
sudo apt install x11-xserver-utils

# CENTOS RHEL FEDORA
sudo yum install xorg-x11-server-utils

# then run
xhost +

docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
@sickcodes commented on GitHub (Jun 5, 2020): ``` echo $DISPLAY # ARCH sudo pacman -S xorg-xhost # UBUNTU DEBIAN sudo apt install x11-xserver-utils # CENTOS RHEL FEDORA sudo yum install xorg-x11-server-utils # then run xhost + docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh ```
Author
Owner

@luposlip commented on GitHub (Jun 6, 2020):

the x11-server-utils was already installed on my machine. host + doesn't work.

But this boots OSX for me!

docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
@luposlip commented on GitHub (Jun 6, 2020): the x11-server-utils was already installed on my machine. `host +` doesn't work. But this boots OSX for me! ``` docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh ```
Author
Owner

@Anon-Exploiter commented on GitHub (Jun 7, 2020):

sudo chmod 666 /dev/kvm

Thanks, changing the permissions of /dev/kvm and @roryrjb command did it for me.

@Anon-Exploiter commented on GitHub (Jun 7, 2020): > ```shell > sudo chmod 666 /dev/kvm > ``` Thanks, changing the permissions of /dev/kvm and @roryrjb [command](https://github.com/sickcodes/Docker-OSX/issues/1#issuecomment-639030573) did it for me.
Author
Owner

@sickcodes commented on GitHub (Jun 8, 2020):

the x11-server-utils was already installed on my machine. host + doesn't work.

But this boots OSX for me!

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

@luposlip I apologize for the host plus command, it was acutally a typo and it should be:

xhost +

Both chmod 666 and the DISPLAY commands are in the README for a few days now as well, so I will close this issue again.

I fixed all the comments where I had written the typo.

@sickcodes commented on GitHub (Jun 8, 2020): > the x11-server-utils was already installed on my machine. `host +` doesn't work. > > But this boots OSX for me! > > ``` > docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh > ``` @luposlip I apologize for the host plus command, it was acutally a typo and it should be: `xhost +` Both chmod 666 and the DISPLAY commands are in the README for a few days now as well, so I will close this issue again. I fixed all the comments where I had written the typo.
Author
Owner

@EmmanuelZapata commented on GitHub (Jun 14, 2020):

Any help getting this to work on Unraid??

@EmmanuelZapata commented on GitHub (Jun 14, 2020): Any help getting this to work on Unraid??
Author
Owner

@stormfleet commented on GitHub (Apr 1, 2021):

In case anyone is a major bogus numpty like me - everyone here is getting qemu-system-x86_64: Permission denied, that is not the same as #qemu-system-x86_64: failed to initialize kvm: Device or resource busy # qemu-system-x86_64: falling back to tcg. You can't have VirtualBox or any other virtualisation software running at the same time, so closing VBox in my case solved this, and then @roryrjb's comment worked fine along with the chmod 666 /dev/kvm.

@stormfleet commented on GitHub (Apr 1, 2021): In case anyone is a major bogus numpty like me - everyone here is getting `qemu-system-x86_64: Permission denied`, that is not the same as `#qemu-system-x86_64: failed to initialize kvm: Device or resource busy # qemu-system-x86_64: falling back to tcg`. You can't have VirtualBox or any other virtualisation software running at the same time, so closing VBox in my case solved this, and then @roryrjb's comment worked fine along with the `chmod 666 /dev/kvm`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#2