Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtioFS wants to create a /host_mnt folder into the root of the disc, but MacOS say is read only FS #6375

Closed
cristianpatrichi opened this issue Apr 14, 2022 · 15 comments

Comments

@cristianpatrichi
Copy link

I try to use VirtioFS, but it crashes on volume creation with error:

Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.wxmkUy2zBy/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.wxmkUy2zBy/Listeners: operation not supported

Docker tries to create the /host_mnt/... folders into the root of the disc, which is now allowed by MacOS.

MacBook Pro M1 Pro, MacOS v12.3.1, Docker v4.7.0 (77141) .

@loicrey
Copy link

loicrey commented Jun 21, 2022

@cristianpatrichi got the same problem here, juste remove the /private/tmp/com.apple.launchd.wxmkUy2zBy/ and up your containers again

@stephen-turner
Copy link
Contributor

This looks like a bug not a feature request, so moving to for-mac repo

@stephen-turner stephen-turner transferred this issue from docker/roadmap Jun 24, 2022
@wizardist
Copy link

wizardist commented Jul 26, 2022

Do you by any chance use $SSH_AUTH_SOCK or similar for volume mapping in Docker or Docker Compose?

I don't think it has ever worked on Mac (mapping Unix sockets from Mac -- see #483 (comment)), but with VirtioFS enabled it seems to now show an error and abort.

@loicrey
Copy link

loicrey commented Jul 26, 2022

Yes I use that.

It works, launching ssh-agent and ssh-add is successfully forwarding my SSH agent inside my containers but I need to do that everytime I recreate my volumes (and remove the directory I mentionned above to recreate them)

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@tsrivishnu
Copy link

/remove-lifecycle stale

@tsrivishnu
Copy link

tsrivishnu commented Nov 2, 2022

I'm facing the same issue. I have the following in docker-compose

  app_with_ssh_forwarding:
    user: root
    environment:
      SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
    volumes:
      - /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock

When using VirtioFS, this fails with the error:

Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.t87HDymVHN/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.t87HDymVHN/Listeners: operation not supported

That is the same path as the SSH agent socket. echo $SSH_AUTH_SOCK gives /private/tmp/com.apple.launchd.t87HDymVHN/Listeners.

The same configuration works perfectly fine when I disable VirtioFS.

@Firstgoer
Copy link

Also, found solution for enable sharing until docker restart

  1. Remove /private from Resources > File Sharing in docker configuration and save configuration
  2. Restart docker
  3. Add /private again. Save configuration
    4. Do not restart

@erikwilson
Copy link

I was running into this problem also where /host_mnt is being prepended and found another issue that looks related (perhaps this is a regression): #4859

After switching to 'gRPC FUSE' and back to 'VirtioFS' the issue has gone away and I am unable to reproduce.

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@antonmos
Copy link

This is still happening on v4.19.0 on Mac. On VirtioFS and gRPC Fuse, bind mount is failing due to the pass geting prepended with /host_mnt:

Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /host_mnt/Users/my-user/path-to-file

Switching to osxfs(Legacy) is the only work around that I can find.

@dougbergh
Copy link

dougbergh commented May 12, 2023

@antonmos Can you say how to switch to osxfs(Legacy)?

/Users/dougbergh/Library/Group Containers/group.com.docker/settings.json

"useVirtualizationFrameworkVirtioFS": false,

@antonmos
Copy link

i did it though the UI under Settings -> General.

Btw, i ran into some other issues and, on a hunch, changed the volume definition from long syntax to short syntax and everything is working now with VirtioFS or gRPCFuse, or osxfs. see https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-3

@JFMarshal
Copy link

I changed my path from a fully qualified absolute path to a relative path (changed /Users/myusername to ~) in the path to the volumes, and that resolved the error for me.

@docker-robot
Copy link

docker-robot bot commented Jun 23, 2023

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker-robot docker-robot bot locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests