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

Docker doesn't start on Apple silicon Macs with "Use the new Virtualization framework" option #6487

Open
3 tasks done
jmaitrehenry opened this issue Sep 20, 2022 · 31 comments

Comments

@jmaitrehenry
Copy link

jmaitrehenry commented Sep 20, 2022

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID for MacOS 12.4: 2AC72C0C-F9FC-44D3-A6DA-E1D42B3DC250/20220920162849
  • Diagnostics ID for MacOS 12.6: 2AC72C0C-F9FC-44D3-A6DA-E1D42B3DC250/20220922200701

Expected behavior

Docker start

Actual behavior

Docker doesn't start

Information

  • macOS Version: 12.4 (21F79) and 12.6 (21G115)
  • Intel chip or Apple chip: M1 Pro
  • Docker Desktop Version: 4.12.0 (85629)

Steps to reproduce the behavior

  1. Enable "Use the new Virtualization framework" option
  2. Wait
@kartoone
Copy link

kartoone commented Sep 21, 2022

Ughh, observing the same exact problem on my 2021 M1 iMac running Monterey 12.5.
Edit: reboot fixed problem. Upon reboot, docker desktop started, the experimental "use virtualization" feature was still enabled. Still very slow compared to running exact same container on Docker for Windows.

@nstolpe
Copy link

nstolpe commented Sep 21, 2022

I was having the same issue, no amount of restarting my machine or docker, or reinstalling docker fixed it. I downgraded to 4.11.1 though and now I'm able to run w/ the experimental features on.

@wscourge
Copy link

wscourge commented Sep 22, 2022

@jmaitrehenry, check note below the checkbox:

Note - you must have macOS 12.5 or later.

Did you try updating?

@madrussa
Copy link

Same issue for me and I'm running Macos 12.6 (21G115)

@jmaitrehenry
Copy link
Author

@wscourge nice to know, it was working before and I didn't see it.
In this case, is it possible to have a check instead of an infinite wait of Docker starting?

Also, actually, my mac doesn't see any Mac update after 12.4, I will check how I can installed them.

@kartoone
Copy link

kartoone commented Sep 22, 2022 via email

@jmaitrehenry
Copy link
Author

After rebooting in safe mode, my Mac M1 is now able to update MacOS.

After the update, I still have the issue with MacOS 12.6. I have updated the main issue with the new diagnostics.

@paulmadejong
Copy link

Same problem for me running macOS 12.6 and latest Docker Desktop 4.12

@marzdrel
Copy link

Big Sur (12.4), not Monterey (12.5). But this discussion thread is mainly about M1 macs, which should all be able to update to Monterey (12.5) or Ventura (12.6).

Just to make this clear, this is not how macOS versioning actually works. Big Sur is 11.x, Montenery is 12.x and Ventura is 13.x (not released yet). Point releases do not get distinguished names and usually they support the same hardware as previous point releases.

@djs55
Copy link
Contributor

djs55 commented Sep 29, 2022

@jmaitrehenry thanks for the diagnostics. I see this in the logs:

[2022-09-20T15:12:49.250177000Z][com.docker.virtualization][E] dialing filesystem-fd.sock: dial unix filesystem-fd.sock: connect: no such file or directory
[main.sendConnections({0x1012f2958, 0x1400022e4c0}, {0x1012f1970, 0x1400022cd40}, {0x14000028138, 0x12})
[       mac/backend/cmd/com.docker.virtualization/run.go:267 +0x138
[main.runVM.func3()
[       mac/backend/cmd/com.docker.virtualization/run.go:214 +0x98
[golang.org/x/sync/errgroup.(*Group).Go.func1()
[       vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x5c
[created by golang.org/x/sync/errgroup.(*Group).Go
[       vendor/golang.org/x/sync/errgroup/errgroup.go:72 +0xa4

This particular issue should be fixed in the latest dev build: https://desktop-stage.docker.com/mac/main/arm64/88079/Docker.dmg Could you give that a try and let me know? If it still doesn't work, could you upload another set of diagnostics? Thanks!

@jmaitrehenry
Copy link
Author

@djs55 it works with the new build! Thank you!

@ackerthehacker2
Copy link

ackerthehacker2 commented Sep 30, 2022

It starts, but it stops faster with the new build. I am running Mac OS 13 build 22A5358e

Diag ID: 45F8C6F4-01E1-45BA-AC26-DAA1AC886495/20220930053621

@eggsyntax
Copy link

@djs55 I had the same problem, and installing the latest dev build seems to have worked for me as well. Thanks!

@jmaitrehenry
Copy link
Author

@djs55 with the new build, I have a problem when I try to build to an another arch than mine when hypervisor.framework is enabled. It stop Docker Desktop and rest in a stopped state.

Do you want a new issue for that?

@kerryj89
Copy link

kerryj89 commented Oct 5, 2022

@jmaitrehenry thanks for the diagnostics. I see this in the logs:

[2022-09-20T15:12:49.250177000Z][com.docker.virtualization][E] dialing filesystem-fd.sock: dial unix filesystem-fd.sock: connect: no such file or directory
[main.sendConnections({0x1012f2958, 0x1400022e4c0}, {0x1012f1970, 0x1400022cd40}, {0x14000028138, 0x12})
[       mac/backend/cmd/com.docker.virtualization/run.go:267 +0x138
[main.runVM.func3()
[       mac/backend/cmd/com.docker.virtualization/run.go:214 +0x98
[golang.org/x/sync/errgroup.(*Group).Go.func1()
[       vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x5c
[created by golang.org/x/sync/errgroup.(*Group).Go
[       vendor/golang.org/x/sync/errgroup/errgroup.go:72 +0xa4

This particular issue should be fixed in the latest dev build: https://desktop-stage.docker.com/mac/main/arm64/88079/Docker.dmg Could you give that a try and let me know? If it still doesn't work, could you upload another set of diagnostics? Thanks!

This issue is not limited to ARM, but the AMD64 build fixes it for Intel based Macs also https://desktop-stage.docker.com/mac/main/amd64/88079/Docker.dmg

@tobalsan
Copy link

tobalsan commented Oct 6, 2022

I just encountered the same issue.

I clicked 'Cancel', then quit and relaunched Docker.
Back in the settings, both checkboxes were checked. So I unchecked them, let Docker restart, and rechecked the two options. This time when I clicked 'Apply & restart', Docker managed to restart properly.

@SteliosNtua
Copy link

I am encountering the same issue and tried to install from the dmg that is provided above, but now I am facing another problem

“Docker” is damaged and can’t be opened. You should move it to the Bin.

Screenshot 2022-10-07 at 16 45 18

@ryparker
Copy link

ryparker commented Oct 9, 2022

Re-running softwareupdate --install-rosetta then reinstalling Docker for Apple Silicon 4.12.0 (85629) via website fixed this for me.

Using M1 Max 2021 MacbookPro, macOS 12.6

@shamoons
Copy link

Re-running softwareupdate --install-rosetta then reinstalling Docker for Apple Silicon 4.12.0 (85629) via website fixed this for me.

Using M1 Max 2021 MacbookPro, macOS 12.6

No dice for me. Using M1 Pro 2021, MacBook Pro macOS 12.6

@alphavector
Copy link

alphavector commented Oct 13, 2022

Re-running softwareupdate --install-rosetta without reinstalling docker worked for me
Version: 4.12.0 (85629)
Apple M1 Pro
macOS 12.6 (21G115)

@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

@robertcnix
Copy link

/remove-lifecycle stale

@richpauloo
Copy link

/remove-lifecycle stale

@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

@hermanschaaf
Copy link

/remove-lifecycle stale

@robertoandrade
Copy link

same here on latest docker desktop (4.20?)

@djs55
Copy link
Contributor

djs55 commented Jun 3, 2023

@robertoandrade could you reproduce the problem then upload diagnostics and quote the ID here? Thanks!

@robertoandrade
Copy link

ok, after removing docker, all of the settings/containers via:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

reinstalling docker (4.20) and enabling the options, one by one and restarting to check if it'd lock up again:

  • Use Virtualization framework (first)
  • Use Rosetta for x86/amd64 emulation on Apple Silicon (next)
  • VirtioFS (last)

I was able to get it to start back up ok. Before that instead of getting the infinite spinning during start I was actually getting:

Something went wrong 

Running VM: running VM and dependencies: running VM: running virtualization.framework: com.docker.virtualization: %!w(<nil>)

Everything seems ok now 🎉

@R0uter
Copy link

R0uter commented Jun 8, 2023

ok, after removing docker, all of the settings/containers via:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

reinstalling docker (4.20) and enabling the options, one by one and restarting to check if it'd lock up again:

  • Use Virtualization framework (first)
  • Use Rosetta for x86/amd64 emulation on Apple Silicon (next)
  • VirtioFS (last)

I was able to get it to start back up ok. Before that instead of getting the infinite spinning during start I was actually getting:

Something went wrong 

Running VM: running VM and dependencies: running VM: running virtualization.framework: com.docker.virtualization: %!w(<nil>)

Everything seems ok now 🎉

Same error brought me here, and thanks man, it works. For me, I didn't delete the docker app. Only these two do the magic:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker

It looks like somehow after macOS upgrade, it broke the docker config or something? Annnd yes, I m on Docker Desktop 4.20.1 (110738)

@arvindjai
Copy link

arvindjai commented Dec 3, 2023

Issue fixed for me by removing quarantine attribute for docker app by below command
sudo xattr -rd com.apple.quarantine /Applications/Docker.app

@neonima
Copy link

neonima commented Feb 3, 2024

Updates from any version to 4.27.1 fixed some problems during the update process including cases where corruptions could happen. We would love your feedback and see if you encounter this issue going forward (to and from 4.27.1)

Feel free to @ me in this thread if you experience this again!

https://docs.docker.com/desktop/release-notes/#4271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests