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

Installing Docker Desktop for Mac in a UTM created MacOS VM Fails to Start with "Hypervisor check failed" #7287

Closed
dnoliver opened this issue May 20, 2024 · 6 comments

Comments

@dnoliver
Copy link

dnoliver commented May 20, 2024

Description

Hi!

I am trying to use Docker Desktop for Mac on a MacOS VM created with UTM, on a Mac mini 2023 - M2 - MacOS Ventura 13.5
After downloading the dmg from the official url and installing it, trying to start Docker Desktop results in:

Screenshot 2024-05-19 at 8 09 16 PM

The intention is to run Docker on the virtualized MacOS, is this something supported by Docker?

Reproduce

  1. Download UTM https://mac.getutm.app
  2. Create a MacOS VM
  3. On the VM, download Docker Desktop
  4. Start Docker Desktop

Expected behavior

I was expecting it to start, or I would expect that if it can't be run in a virtual machine with Mac, a more user friendly error will be shown that says "this app can't be run on a vm"

docker version

Latest Docker Desktop for Mac as in May 19 2023

docker info

Latest Docker Desktop for Mac as in May 19 2023

Diagnostics ID

9F03BF1C-FAB5-49D5-9E89-18CE73FCFD6C/20240520025738

Additional Info

If using this on a VM is not supported, are there any alternatives? like using it from the CLI only?

@dnoliver dnoliver changed the title Installing Docker Desktop for Mac in a UTM provided MacOS VM Fails to Start with "Hypervisor check failed" Installing Docker Desktop for Mac in a UTM created MacOS VM Fails to Start with "Hypervisor check failed" May 20, 2024
@jedvardsson
Copy link

I can confirm this. Clean install of v4.30.0 on my Macbook Pro M1 Max , macOS Sonoma 14.5, fails with "Hypervisor check failed".

Clean install of v4.29.0 works, but upgrading from there to v4.30.0 fails. UI exits for restart but never comes up. After manual restart of Docker Desktop v4.30.0 still shows as available for install.

The logs says that the virtualisation PID 77479 dies and brings down Docker Desktop PID 77497.

2024-05-17 21:02:01.634860+0200 localhost com.docker.virtualization[77479]: (LaunchServices) [com.apple.launchservices:cas] information in shared memory for 0x0-0x111111 with seed 522 was still valid, so using cac
hed info { "ApplicationType"="UIElement", , "BuildMachineOSBuild"="22A400", , "BundleIdentifierLowerCase"="com.docker.docker", , "CFBundleDevelopmentRegion"="en", , "CFBundleDisplayName"="Docker", , "CFBundleExecut
able"="com.docker.backend", , "CFBundleExecutablePath"="/Applications/Docker.app/Contents/MacOS/com.docker.virtualization", , "CFBundleExecutablePathDeviceID"=16777231, , "CFBundleExecutablePathINode"=64911202, , "
CFBundleIconFile"="AppIcon", , "CFBundleIconName"="AppIcon", , "CFBundleIdentifier"="com.docker.docker", , "CFBundleInfoDictionaryVersion"="6.0", , "CFBundleName"="Docker", , "CFBundleNameLowerCase"="docker", , "CF
BundleNumericVersion"=0, , "CFBundlePackageType"="APPL", , "CFBundleShortVersionString"="4.29.0", , "CFBundleSignature"="????", , "CFBundleSupportedPlatforms"=( "MacOSX"), , "CFBundleURLTypes"=( { "CFBundleTypeRole
"="Editor", , "CFBundleURLName"="docker-desktop", , "CFBundleURLSchemes"=( "docker-desktop") }), , "CFBundleVersion"="145265", , "ChangeCount"=522, , <…>
2024-05-17 21:02:02.226957+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Received pid death for 77479, found application App:"Docker" asn:0x0-111111 pid:77479 refs=5 @ 0x120e1c220 in s
ession "LSSession:id=100018 @ 0x120b04340 Apps:106 ", which was not a LS launched process, so removing it.
2024-05-17 21:02:02.227212+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING: App:"Docker" asn:0x0-111111 pid:77479 refs=5 @ 0x120e1c220 exitStatus=0
2024-05-17 21:02:02.227554+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING { "ApplicationType"="UIElement", , "CFBundleExecutablePath"="/Applications/Docker.app/Contents/MacOS/com.docker
.virtualization", , "CFBundleIdentifier"="com.docker.docker", , "CFBundleShortVersionString"="4.29.0", , "CFBundleVersion"="145265", , "DeathTime"=now-ish 2024/05/17 21:02:02, , "LSBundlePath"="/Applications/Docker
.app", , "LSDisplayName"="Docker", , "LSExitStatus"=0, , "pid"=77479 } to sDeadApplicationInformation for 77479
2024-05-17 21:02:02.228763+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending notifyChildDeath to potential parent app App:"Docker" asn:0x0-109109 pid:77299 refs=7 @ 0x11fea5cc0 because pa
rent was inferred.
2024-05-17 21:02:02.230276+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Removing app App:"Docker" asn:0x0-111111 pid:77479 refs=5 @ 0x120e1c220 from sRunningBoardDeathNotificationsSet
Ref.
2024-05-17 21:02:02.230282+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending exit status and unregister application, app=App:"Docker" asn:0x0-111111 pid:77479 refs=4 @ 0x120e1c220, exitSt
atus=0
2024-05-17 21:02:02.230303+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] virtual LSApplication::~LSApplication(), application [ 0x0-0x111111] pid=77479 "Docker" @ 0x120e1c230 being deleted,
refs=1
2024-05-17 21:02:02.235641+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Received pid death for 77483, found application App:"Service för virtuell maskin i Docker" asn:0x0-110110 pid:7
7483 refs=5 @ 0x120a32d80 in session "LSSession:id=100018 @ 0x120b04340 Apps:105 ", which was not a LS launched process, so removing it.
2024-05-17 21:02:02.235679+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING: App:"Service för virtuell maskin i Docker" asn:0x0-110110 pid:77483 refs=5 @ 0x120a32d80 exitStatus=0
2024-05-17 21:02:02.235731+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING { "ApplicationType"="UIElement", , "CFBundleExecutablePath"="/System/Library/Frameworks/Virtualization.framewor
k/Versions/A/XPCServices/com.apple.Virtualization.VirtualMachine.xpc/Contents/MacOS/com.apple.Virtualization.VirtualMachine", , "CFBundleIdentifier"="com.apple.Virtualization.VirtualMachine", , "CFBundleShortVersio
nString"="1.0", , "CFBundleVersion"="162.10.2", , "DeathTime"=now-ish 2024/05/17 21:02:02, , "LSBundlePath"="/System/Library/Frameworks/Virtualization.framework/Versions/A/XPCServices/com.apple.Virtualization.Virtu
alMachine.xpc", , "LSDisplayName"="Service för virtuell maskin i Docker", , "LSExitStatus"=0, , "pid"=77483 } to sDeadApplicationInformation for 77483
2024-05-17 21:02:02.236856+0200 localhost com.docker.backend[77299]: (LaunchServices) [com.apple.launchservices:cas] information in shared memory for 0x0-0x109109 with seed 528 was still valid, so using cached inf
o { "ApplicationType"="UIElement", , "BuildMachineOSBuild"="22A400", , "BundleIdentifierLowerCase"="com.docker.docker", , "CFBundleDevelopmentRegion"="en", , "CFBundleDisplayName"="Docker", , "CFBundleExecutable"="
com.docker.backend", , "CFBundleExecutablePath"="/Applications/Docker.app/Contents/MacOS/com.docker.backend", , "CFBundleExecutablePathDeviceID"=16777231, , "CFBundleExecutablePathINode"=64911182, , "CFBundleIconFi
le"="AppIcon", , "CFBundleIconName"="AppIcon", , "CFBundleIdentifier"="com.docker.docker", , "CFBundleInfoDictionaryVersion"="6.0", , "CFBundleName"="Docker", , "CFBundleNameLowerCase"="docker", , "CFBundleNumericVersion"=0, , "CFBundlePackageType"="APPL", , "CFBundleShortVersionString"="4.29.0", , "CFBundleSignature"="????", , "CFBundleSupportedPlatforms"=( "MacOSX"), , "CFBundleURLTypes"=( { "CFBundleTypeRole"="Editor", , "CFBundleURLName"="docker-desktop", , "CFBundleURLSchemes"=( "docker-desktop") }), , "CFBundleVersion"="145265", , "CanBecomeFrontmost"=true, ,<…>
2024-05-17 21:02:02.236864+0200 localhost com.docker.backend[77299]: (AE) [com.apple.appleevents:send] AESendMessage(aevt,obit {aevt,obit target='psn '[Docker] returnID=9141}...
2024-05-17 21:02:02.237210+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Removing app App:"Service för virtuell maskin i Docker" asn:0x0-110110 pid:77483 refs=5 @ 0x120a32d80 from sRunningBoardDeathNotificationsSetRef.
2024-05-17 21:02:02.237217+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending exit status and unregister application, app=App:"Service för virtuell maskin i Docker" asn:0x0-110110 pid:77483 refs=4 @ 0x120a32d80, exitStatus=0
2024-05-17 21:02:02.237241+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] virtual LSApplication::~LSApplication(), application [ 0x0-0x110110] pid=77483 "Service för virtuell maskin i Docker" @ 0x120a32d90 being deleted, refs=1
2024-05-17 21:02:02.280672+0200 localhost com.docker.backend[77299]: (Foundation) *** Assertion failure in CGEventRef NSEventToCGEventRef(NSEvent *)(), NSEvent.m:1978
2024-05-17 21:02:02.280845+0200 localhost com.docker.backend[77299]: (AppKit) [com.apple.AppKit:General] Unrecognized event type 0
2024-05-17 21:02:02.282998+0200 localhost com.docker.backend[77299]: (AppKit) [com.apple.AppKit:General] (
    0 CoreFoundation           0x000000019c5732ec __exceptionPreprocess + 176
    1 libobjc.A.dylib          0x000000019c05a788 objc_exception_throw + 60
    2 Foundation             0x000000019dcf4504 -[NSMutableDictionary(NSMutableDictionary) initWithContentsOfFile:] + 0
    3 AppKit               0x000000019feb6064 -[NSEvent CGEvent] + 1284
    4 AppKit               0x000000019fefd664 -[NSEvent _eventRefInternal] + 32
    5 AppKit               0x000000019ff78078 -[NSEvent _postAtStart:] + 1064
    6 AppKit               0x00000001a032e51c ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
    7 CoreFoundation           0x000000019c4fe070 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
    8 CoreFoundation           0x000000019c4fdf84 __CFRunLoopDoBlocks + 356
    9 CoreFoundation           0x000000019c4fd414 __CFRunLoopRun + 2440
    10 CoreFoundation           0x000000019c4fc434 CFRunLoopRunSpecific + 608
    11 HIToolbox             0x00000001a6ca019c RunCurrentEventLoopInMode + 292
    12 HIToolbox             0x00000001a6c9ffd8 ReceiveNextEventCommon + 648
    13 HIToolbox             0x00000001a6c9fd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
    14 AppKit               0x000000019fd5bd68 _DPSNextEvent + 660
    15 AppKit               0x00000001a0551808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
    16 AppKit               0x000000019fd4f09c -[NSApplication run] + 476
    17 com.docker.backend         0x000000010297590c runtime.asmcgocall.abi0 + 124
)
2024-05-17 21:02:02.343207+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Received pid death for 77497, found application App:"Docker Desktop" asn:0x0-112112 pid:77497 refs=6 @ 0x12098c2b0 in session "LSSession:id=100018 @ 0x120b04340 Apps:104 ", which was not a LS launched process, so removing it.
2024-05-17 21:02:02.343255+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING: App:"Docker Desktop" asn:0x0-112112 pid:77497 refs=6 @ 0x12098c2b0 exitStatus=0
2024-05-17 21:02:02.343592+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING { "ApplicationType"="Foreground", , "CFBundleExecutablePath"="/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/MacOS/Docker Desktop", , "CFBundleIdentifier"="com.electron.dockerdesktop", , "CFBundleShortVersionString"="4.29.0", , "CFBundleVersion"="4.29.0.21", , "DeathTime"=now-ish 2024/05/17 21:02:02, , "LSBundlePath"="/Applications/Docker.app/Contents/MacOS/Docker Desktop.app", , "LSDisplayName"="Docker Desktop", , "LSExitStatus"=0, , "pid"=77497 } to sDeadApplicationInformation for 77497
2024-05-17 21:02:02.344500+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending notifyChildDeath to potential parent app App:"Docker" asn:0x0-109109 pid:77299 refs=7 @ 0x11fea5cc0 because parent was inferred.
2024-05-17 21:02:02.346565+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Removing app App:"Docker Desktop" asn:0x0-112112 pid:77497 refs=5 @ 0x12098c2b0 from sRunningBoardDeathNotificationsSetRef.
2024-05-17 21:02:02.346568+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending exit status and unregister application, app=App:"Docker Desktop" asn:0x0-112112 pid:77497 refs=4 @ 0x12098c2b0
, exitStatus=0
2024-05-17 21:02:02.346580+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] virtual LSApplication::~LSApplication(), application [ 0x0-0x112112] pid=77497 "Docker Desktop" @ 0x12098c2c0 being d
eleted, refs=1
2024-05-17 21:02:02.527888+0200 localhost launchservicesd[373]: (RunningBoardServices) [com.apple.runningboard:process] Hit the server for a process handle 304649e00012df3 that resolved to: [app<application.com.do
cker.docker.64911145.64911182(501)>:77299]
2024-05-17 21:02:02.528053+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING: App:"Docker" asn:0x0-109109 pid:77299 refs=5 @ 0x11fea5cc0 exitStatus=0
2024-05-17 21:02:02.528240+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] ADDING { "ApplicationType"="UIElement", , "CFBundleExecutablePath"="/Applications/Docker.app/Contents/MacOS/com.docker
.backend", , "CFBundleIdentifier"="com.docker.docker", , "CFBundleShortVersionString"="4.29.0", , "CFBundleVersion"="145265", , "DeathTime"=now-ish 2024/05/17 21:02:02, , "LSBundlePath"="/Applications/Docker.app",
, "LSDisplayName"="Docker", , "LSExitStatus"=0, , "pid"=77299 } to sDeadApplicationInformation for 77299
2024-05-17 21:02:02.530557+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] DEATH: Removing app App:"Docker" asn:0x0-109109 pid:77299 refs=5 @ 0x11fea5cc0 from sRunningBoardDeathNotificationsSet
Ref.
2024-05-17 21:02:02.530565+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] Sending exit status and unregister application, app=App:"Docker" asn:0x0-109109 pid:77299 refs=4 @ 0x11fea5cc0, exitSt
atus=0
2024-05-17 21:02:02.530585+0200 localhost launchservicesd[373]: [com.apple.launchservices:cas] virtual LSApplication::~LSApplication(), application [ 0x0-0x109109] pid=77299 "Docker" @ 0x11fea5cd0 being deleted,
refs=1

@zifeo
Copy link

zifeo commented May 25, 2024

@jedvardsson would you mind share your installation steps? I get the same "hypervisor check failed" using 4.28 and 4.29.

@conradwt
Copy link

conradwt commented May 28, 2024

@dnoliver The Apple Virtualization and Hypervisor frameworks won't work within a virtual machine (VM). Furthermore, they are designed to work on macOS running on real hardware. BTW, I used the sample code from WWDC 2023 to test running Docker Desktop for Mac in a macOS VM. If you're interested, you can find the talk and code here:

https://developer.apple.com/videos/play/wwdc2023/10007
https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon

@dnoliver
Copy link
Author

Got it @conradwt, thanks.

Then, running Docker (Desktop, Engine) is not supported in virtualized MacOS, until MacOS supports nested virtualization in Apple hardware?

@conradwt
Copy link

conradwt commented May 28, 2024

@dnoliver Yes, here's a good Windows' reference that's applicable to running Docker Desktop for Mac on macOS VMs.

https://docs.docker.com/desktop/vm-vdi

@dnoliver
Copy link
Author

Got it, thanks. Closing!

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

5 participants