for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

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

Open jmaitrehenry opened this issue 3 years ago • 47 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [x] I have tried disabling enabled experimental features
  • [x] 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

jmaitrehenry avatar Sep 20 '22 16:09 jmaitrehenry

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.

kartoone avatar Sep 21 '22 11:09 kartoone

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.

nstolpe avatar Sep 21 '22 18:09 nstolpe

@jmaitrehenry, check note below the checkbox:

Note - you must have macOS 12.5 or later.

Did you try updating?

wscourge avatar Sep 22 '22 12:09 wscourge

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

madrussa avatar Sep 22 '22 12:09 madrussa

@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.

jmaitrehenry avatar Sep 22 '22 18:09 jmaitrehenry

Some mac desktops / laptops cannot be updated past 12.4. My old iMac can only be updated to 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). Supposedly it has something to do with how M1 mac computers have to deal with the file system. I’m not sure why the processor would matter, but here’s what I found: https://medium.com/homullus/beating-some-performance-into-docker-for-mac-f5d1e732032c

From: Julien Maitrehenry @.> Date: Thursday, September 22, 2022 at 1:58 PM To: docker/for-mac @.> Cc: Toone, Brian @.>, Comment @.> Subject: [EXTERNAL]Re: [docker/for-mac] Docker doesn't start on Apple silicon Macs with "Use the new Virtualization framework" option (Issue #6487) This email originated from outside of Samford University. Please consider carefully whether you should click on any links, open any attachments, or provide any information.

@wscourgehttps://secure-web.cisco.com/1_76gRdTOMmzRlXBK9jpbXzCIzgVIwkqromY5UMcRFc4tnBkEo9t1sfZwlZXq1i3YwsBKtFb4sQcEuOL8NVIT2h_X4KsK1inIWQKksh6toQGpcHWYaLz4jyVRVXG07qFHALjUtMM3p489LOBhuMuxJ0lXV5YddlxExAnJIiLVoXE0hxLLjOyvQ2B_AiRSQrHVES5G_ffOAylLPtMnSEpBFLf6s-4WAt-bgVmfnHd7NT3cx2C0zKLGMfWCco-RAEVQFX_f37WZsLQKCh6-kVO9QTtnPqM4q-IeePwUqyreIZYY_26sHEIR_VJbARbYNkqq/https%3A%2F%2Fgithub.com%2Fwscourge 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.

— Reply to this email directly, view it on GitHubhttps://secure-web.cisco.com/1HQHc5GOBhP0wfOEQBfGNSom5FYZH4IPFs0vt8-z_9BnU4siK7MPz3yk29M3GC0WoTmvSGSGzZsUVFuk_uqV-7kvbOVcqsq3x4n0kye_EAPJsqPl6f68o4Gw6gm_Rk862eu_OuGh7QXDQYshoiVi6Hb4avZ_9ZbBhq9McGapv91Ek89-rsoO3bn1YUcUQ-daFu6-lF7E49xG0qmJxzyfZG2A4FrEdnfgHVrpHuZlOiX1-i1eNje_iTgfgfjtWJWG8OGaH9WubovsKO0rXAkF4ep59cIKAUOEASs6bWMwJmKmOZ_cw8hdaekBoNWfw-AC_/https%3A%2F%2Fgithub.com%2Fdocker%2Ffor-mac%2Fissues%2F6487%23issuecomment-1255428036, or unsubscribehttps://secure-web.cisco.com/1UucsF5HmA2AhVmytxFW90lRahWdFvxiMJvedq7SQ_1g-ob6Se9iid0GdSo8QPwDeOM_D-fRjiR2DXyfc7vuSXd8nLpU3v1emO8tnrbMX15yUGz9xrP7bDwwLrbmtGN7USNGhzq0z4a1Df3dG5eKW8V95XqIKszHRwoALRH9bBy9m1VrHQDCYGaDffItQQuL97Ed-0z6898Mz0JXJMYMRi432MBg2BKOfqt85xeQoIHM4cE5O93IrB9nschiUwYyQ9aeIFTCFdifCcCEY4HupAPMjnuJUo3CaDlTgJldd_I_CawM7aSdvi3cvGrqk5iPP/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAVKXO625M4I6J6GH3P2R5TV7ST4BANCNFSM6AAAAAAQRIAKKM. You are receiving this because you commented.Message ID: @.***>

kartoone avatar Sep 22 '22 19:09 kartoone

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.

jmaitrehenry avatar Sep 22 '22 20:09 jmaitrehenry

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

paulmadejong avatar Sep 27 '22 05:09 paulmadejong

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.

marzdrel avatar Sep 29 '22 12:09 marzdrel

@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!

djs55 avatar Sep 29 '22 15:09 djs55

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

jmaitrehenry avatar Sep 29 '22 15:09 jmaitrehenry

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

ackerthehacker2 avatar Sep 30 '22 05:09 ackerthehacker2

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

eggsyntax avatar Oct 03 '22 16:10 eggsyntax

@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?

jmaitrehenry avatar Oct 04 '22 13:10 jmaitrehenry

@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

kerryj89 avatar Oct 05 '22 14:10 kerryj89

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.

tobalsan avatar Oct 06 '22 09:10 tobalsan

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

SteliosNtua avatar Oct 07 '22 14:10 SteliosNtua

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

ryparker avatar Oct 09 '22 23:10 ryparker

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

shamoons avatar Oct 10 '22 14:10 shamoons

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

alphavector avatar Oct 13 '22 12:10 alphavector

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

docker-robott avatar Jan 11 '23 01:01 docker-robott

/remove-lifecycle stale

robertcnix avatar Jan 14 '23 01:01 robertcnix

/remove-lifecycle stale

richpauloo avatar Jan 26 '23 23:01 richpauloo

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

docker-robott avatar Apr 26 '23 01:04 docker-robott

/remove-lifecycle stale

hermanschaaf avatar May 03 '23 09:05 hermanschaaf

same here on latest docker desktop (4.20?)

robertoandrade avatar Jun 03 '23 13:06 robertoandrade

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

djs55 avatar Jun 03 '23 13:06 djs55

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 🎉

robertoandrade avatar Jun 03 '23 13:06 robertoandrade

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)

R0uter avatar Jun 08 '23 01:06 R0uter

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

arvindjai avatar Dec 03 '23 06:12 arvindjai