Skip to content

amd64 New Virtualization Framework host.docker.internal networking broken #5410

Closed

Description

@rfay
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 4D073710-26E7-4DA2-9AA5-BFC1A7A6397E/20210302144302

Expected behavior

Docker Desktop for Mac 3.2.0 - It was suggested that I try out the new Virtualization Framework over in #5407 (comment)

Unfortunately, I immediately found that it doesn't work with NFS (timeout errors)

A bit more exploration showed that host.docker.internal (or networking) doesn't work

I should be able to communicate from inside a container to host.docker.internal, but:

$ docker run -it busybox ping -c1 host.docker.internal
PING host.docker.internal (192.168.65.2): 56 data bytes

It never succeeds. As a result, xdebug debugging and NFS mounting, among other things, are unusuable.

Actual behavior

No networking to host.docker.internal

Information

  • macOS Version: macOS Big Sur 11.2.2
  • Docker Desktop Version: 3.2.0 amd64, new virtualization enabled.

Activity

  1. added
    area/m1
    on Mar 2, 2021
  2. stephen-turner commented on Mar 2, 2021

    @stephen-turner
    Contributor

    @djs55 Do we have a fix for this already?

  3. aswinmohanme commented on Mar 7, 2021

    @aswinmohanme

    I can confirm this, the networking is broken

  4. djs55 commented on Mar 8, 2021

    @djs55
    Contributor

    Thanks for the report. I think I might know what's going on -- when the experimental feature flag is toggled, we don't restart the DNS server so it still contains old mappings. I suspect if you were to completely exit the application and then relaunch then the DNS would be correct.

    I'll add a ticket to our backlog to cover this.

  5. jessedobbelaere commented on Mar 12, 2021

    @jessedobbelaere

    Thanks! I had the same issue, like djs55 mentions: just completely exiting the application and relaunching docker for mac fixed it 👍

  6. KatSick commented on Mar 31, 2021

    @KatSick

    I have the same issue with "new virtualization enabled" on Docker Desktop Version 3.2.2 and macOS Big Sur 11.2.3
    (restart Mac or Docker does not help)

  7. lwj5 commented on Apr 5, 2021

    @lwj5

    I have the same issue with "new virtualization enabled" on Docker Desktop Version 3.2.2 and macOS Big Sur 11.2.3
    (restart Mac or Docker does not help)

    I can confirm this as well. Have reverted back for the time being.

    Not sure whether it's mislabelled area/m1, but this issue is for Intel macs with AMD64

  8. gjmveloso commented on Apr 5, 2021

    @gjmveloso

    Restoring Docker Desktop to its default settings via Clear / purge data then enabling New virtualization enabled prevent Docker engine to start:

    default	13:24:23.661628-0400	com.docker.driver.amd64-linux	still waiting for docker to respond after 2m0.371074986s
    default	13:26:54.080302-0400	com.docker.driver.amd64-linux	still waiting for docker to respond after 4m30.785226495s
    default	13:27:24.143848-0400	com.docker.driver.amd64-linux	still waiting for docker to respond after 5m0.847885035s
    default	13:27:54.226824-0400	com.docker.driver.amd64-linux	still waiting for docker to respond after 5m30.929908561s
    ...
    default	13:33:25.055696-0400	com.docker.driver.amd64-linux	still waiting for docker to respond after 11m1.774096638s
    

    Diagnostic reports:

    Date/Time:        2021-04-05 13:22:23.336 -0400
    End time:         2021-04-05 13:23:45.358 -0400
    OS Version:       macOS 11.2.3 (Build 20D91)
    Architecture:     x86_64h
    Report Version:   32
    Incident Identifier: 97E3AEB9-C93E-4D4F-82F9-79502614932D
    
    Data Source:      Microstackshots
    Shared Cache:     52762DF1-0E55-3F8B-9588-8169E6D0EB95 slid base address 0x7fff20104000, slide 0x104000
    
    Command:          com.apple.Virtualization.VirtualMachine
    Path:             /System/Library/Frameworks/Virtualization.framework/Versions/A/XPCServices/com.apple.Virtualization.VirtualMachine.xpc/Contents/MacOS/com.apple.Virtualization.VirtualMachine
    Identifier:       com.apple.Virtualization.VirtualMachine
    Version:          1.0 (18.5)
    Build Version:    52
    Project Name:     Virtualization
    Source Version:   18005000000000
    Parent:           UNKNOWN [1]
    PID:              45955
    
    Event:            wakeups
    Action taken:     none
    Wakeups:          45001 wakeups over the last 82 seconds (549 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
    Wakeups limit:    45000
    Limit duration:   300s
    Wakeups caused:   45001
    Wakeups duration: 82s
    Duration:         82.02s
    Duration Sampled: 81.69s
    Steps:            84
    
    Hardware model:   MacBookPro15,2
    Active cpus:      8
    Boot args:        chunklist-security-epoch=0 -chunklist-no-rev2-dev
    
    Fan speed:        5428 rpm
    

    Diagnostics ID: 7E4C2CA2-3893-4F77-ACA5-2621A31EB4A5/20210405172525

  9. Zenexer commented on Apr 14, 2021

    @Zenexer

    Should this be tagged area/m1 even though the report is for amd64? I'm not able to reproduce this on M1, v3.3.0 (62632), RC3.

  10. Zenexer commented on Apr 14, 2021

    @Zenexer

    @gjmveloso, that sounds like an unrelated issue; is there a reason you posted it in this issue (e.g., was it while troubleshooting the networking issue)?

  11. stephen-turner commented on Apr 14, 2021

    @stephen-turner
    Contributor

    I tagged it "area/m1" because it is due to the new virtualization framework, which at the time was the default on M1 but not on Intel. But I'll untag it again now.

  12. removed
    area/m1
    on Apr 14, 2021
  13. gjmveloso commented on Apr 15, 2021

    @gjmveloso

    @gjmveloso, that sounds like an unrelated issue; is there a reason you posted it in this issue (e.g., was it while troubleshooting the networking issue)?

    the reason was this issue was the closest one to what happen when New Virtualization Framework is enabled on Big Sur 11.2.3. From the logs seems like the daemon wait indefinitely for an open socket.

    The same behavior happens on 3.3.0

  14. 14 remaining items

  15. rfay commented on May 20, 2021

    @rfay
    Author

    @krukid I imagine your problem is #5680

  16. pauldraper commented on May 20, 2021

    @pauldraper

    The are the steps directly from Docker's documentation (and they don't work):

    https://docs.docker.com/docker-for-mac/networking/

     docker run --rm -it alpine sh
     apk add curl
     curl http://host.docker.internal:8000
     exit
    
  17. MrBenGriffin commented on May 25, 2021

    @MrBenGriffin

    host.docker.internal doesn't work for me. with the new virtualization framework (Docker 3.3.3) on Big Sur Intel - Mac OS 11.4 (20F71) / 3.2 GHz 6-Core Intel Core i7

  18. codecakes commented on May 26, 2021

    @codecakes

    +1 Diagnostics ID: 66528A0C-F315-4AC8-9C86-246FD4BFF365/20210526090239

  19. alexcombessie commented on May 28, 2021

    @alexcombessie

    I have the same issue on a MacBook Air with an M1 chip. Only solution I found was to deactivate the new virtualization framework.

  20. ErickAgrazal commented on May 31, 2021

    @ErickAgrazal

    Getting the same issue on an M1 Mac Mini. Had to deactivate the new virtualization framework to get docker working again.

    Mac OS Version: 11.3 (20E232)
    Docker Desktop Version: 3.3.3 (64133)
    Docker Version: 20.10.6, build 370c289

  21. wunderkind2k1 commented on Jun 3, 2021

    @wunderkind2k1

    Getting the same issue on an mavbook pro i9. Had to deactivate the new virtualization framework to get docker working again.

    Mac OS Version: 11.4
    Docker Desktop Version: 3.3.3 (64133)
    Docker Version: 20.10.6, build 370c289

  22. djs55 commented on Jun 10, 2021

    @djs55
    Contributor

    In Docker Desktop 3.4.0 there is a fix for the internal DNS server to ensure the *.docker.internal entries are changed when the virtualization.framework mode is switched on and off. I think this issue should now be fixed. I'll mark this issue as closed, but if it is still broken please upload a fresh set of diagnostics, quote the ID here and ping me. I'll take a look and re-open if necessary.

    Thanks everyone for your patience!

  23. KatSick commented on Jun 10, 2021

    @KatSick

    Yep it works for me! Thanks!

  24. gjmveloso commented on Jun 11, 2021

    @gjmveloso

    Worked for me too. Just updated to 3.4.0.5223 and tried to enable the New Virtualization Framework option. Up and running within 30 seconds or so. And computer is a lot cooler as well.

    Diagnostics ID: 7E4C2CA2-3893-4F77-ACA5-2621A31EB4A5/20210611125808

  25. docker-robott commented on Jul 11, 2021

    @docker-robott
    Collaborator

    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.

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

  26. locked and limited conversation to collaborators on Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions