Error running Docker-OSX on Fedora #510

Open
opened 2025-12-29 06:20:43 +01:00 by adam · 7 comments
Owner

Originally created by @micartey on GitHub (Jun 28, 2023).

When running any OS, I get the following error

docker: Error response from daemon: Mounts denied: 
The path /tmp/.X11-unix is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
See https://docs.docker.com/ for more info.

So I renamed /tmp to sth like ~/.tmp which works, but then I run into the next error

docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory.

I have kvm installed and the folder does in fact exist.
Any ideas how I can fix that?

Originally created by @micartey on GitHub (Jun 28, 2023). When running any OS, I get the following error ``` docker: Error response from daemon: Mounts denied: The path /tmp/.X11-unix is not shared from the host and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing. See https://docs.docker.com/ for more info. ``` So I renamed `/tmp` to sth like `~/.tmp` which works, but then I run into the next error ``` docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory. ``` I have kvm installed and the folder does in fact exist. Any ideas how I can fix that?
Author
Owner

@dmelo commented on GitHub (Jul 4, 2023):

@micartey , if you don't have /dev/kvm its likely that you still need to enable virtualization on you bios. Besides that, I followed this guide and it worked for me https://dev.to/ianito/how-to-emulate-ios-on-linux-with-docker-4gj3#installation I'm also using Fedora.

@dmelo commented on GitHub (Jul 4, 2023): @micartey , if you don't have `/dev/kvm` its likely that you still need to enable virtualization on you bios. Besides that, I followed this guide and it worked for me https://dev.to/ianito/how-to-emulate-ios-on-linux-with-docker-4gj3#installation I'm also using Fedora.
Author
Owner

@micartey commented on GitHub (Jul 4, 2023):

Hello @dmelo,
thanks for the response.

I do have the /dev/kvm folder as I said:

[...] the folder does in fact exist

However, I didn't enable anything specific on my bios.
Could you tell me which option should be enabled?

@micartey commented on GitHub (Jul 4, 2023): Hello @dmelo, thanks for the response. I do have the `/dev/kvm` folder as I said: > [...] the folder does in fact exist However, I didn't enable anything specific on my bios. Could you tell me which option should be enabled?
Author
Owner

@dmelo commented on GitHub (Jul 4, 2023):

Is it a folder? Its suppose to be a device:

❯ ls -lhat /dev/kvm
crw-rw-rw- 1 root kvm 10, 232 Jul  4 09:21 /dev/kvm

See the char "c" at the beginning of the permissions. https://unix.stackexchange.com/questions/698528/meaning-of-file-type-c-in-ls-l-command

Where to enable virtualization, depends on your bios. But I think you'll find the instructions easily, if you search for your manufacturer/model and how to enable virtualization / enable "/dev/kvm". For me, its something like this https://www.asus.com/us/support/FAQ/1045141/

@dmelo commented on GitHub (Jul 4, 2023): Is it a folder? Its suppose to be a device: ``` ❯ ls -lhat /dev/kvm crw-rw-rw- 1 root kvm 10, 232 Jul 4 09:21 /dev/kvm ``` See the char "c" at the beginning of the permissions. https://unix.stackexchange.com/questions/698528/meaning-of-file-type-c-in-ls-l-command Where to enable virtualization, depends on your bios. But I think you'll find the instructions easily, if you search for your manufacturer/model and how to enable virtualization / enable "/dev/kvm". For me, its something like this https://www.asus.com/us/support/FAQ/1045141/
Author
Owner

@micartey commented on GitHub (Jul 5, 2023):

It does have a leading "c".
I just assumed it is a directory since it is not a file.

I'll test changing some bios settings later

@micartey commented on GitHub (Jul 5, 2023): It does have a leading "c". I just assumed it is a directory since it is not a file. I'll test changing some bios settings later
Author
Owner

@coderforlife commented on GitHub (Aug 24, 2023):

Fedora has selinux which means you likely need to put :z behind the -v argument (like -v /tmp/.X11-unix:/tmp/.X11-unix:z) otherwise files cannot be shared. I am however having other problems with Fedora (ALSA problems...).

@coderforlife commented on GitHub (Aug 24, 2023): Fedora has selinux which means you likely need to put `:z` behind the -v argument (like `-v /tmp/.X11-unix:/tmp/.X11-unix:z`) otherwise files cannot be shared. I am however having other problems with Fedora (ALSA problems...).
Author
Owner

@chriscarrollsmith commented on GitHub (Dec 2, 2024):

You can resolve this problem by going to Docker -> Preferences... -> Resources -> File Sharing in the Docker dashboard and adding tmp/.X11-unix as a shared directory.

@chriscarrollsmith commented on GitHub (Dec 2, 2024): You can resolve this problem by going to Docker -> Preferences... -> Resources -> File Sharing in the Docker dashboard and adding tmp/.X11-unix as a shared directory.
Author
Owner

@micartey commented on GitHub (Dec 4, 2024):

I cannot test this anymore as I switch to a different OS and also ditched X11 for wayland.
I'll leave this issue open for others with the same problem.

@micartey commented on GitHub (Dec 4, 2024): I cannot test this anymore as I switch to a different OS and also ditched X11 for wayland. I'll leave this issue open for others with the same problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX-sickcodes#510