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

M1 Preview won't start when NetworkSharing Network != 192.168.64.1

Open SteffenDE opened this issue 5 years ago • 13 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Running the M1 preview boots on a Mac that was restored from a Time Machine backup.

Actual behavior

M1 preview hangs indefinitely and does not start.

Information

  • macOS Version: 11.1

I think this is related to VMWare Fusion as I've had Virtual Machines on my Intel MacBook in the bridge100 interface network 192.168.226.0/24. After restoring the M1 MacBook from TimeMachine, the bridge100 interface (now seemingly in use by docker) still had the same 192.168.226.0/24 network configured.

Running

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask 255.255.255.0
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd 192.168.64.255
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.64.1

fixed this problem for me and docker now starts fine.

Diagnostic logs

Docker for Mac: version...

Steps to reproduce the behavior

  1. Restore M1 Mac from a Backup that had VMWare Fusion installed or change SharingNetworkNumber
  2. Docker tries to start with 192.168.64.0/24 network and won't finish starting

I think this is a bug as Docker on Intel was running fine next to VMWare Fusion's 192.168.226.0/24 network.

SteffenDE avatar Dec 17 '20 10:12 SteffenDE

Thanks for the report. I think we've still got some IP addresses hard-coded in this preview build.

stephen-turner avatar Dec 17 '20 13:12 stephen-turner

duplicate of https://github.com/docker/for-mac/issues/5130 ?

sfuerte avatar Dec 17 '20 15:12 sfuerte

I think the symptoms may be the same, but I'm not sure if the underlying reason is the same too. I'm not seeing any error due to timeouts in the log, just some still waiting for docker to respond after xy here and then. I'm also pretty sure that this issue here is specifically related to having VMWare Fusion or another software running besides docker that uses the bridge100 interface.

But if it's the same feel free to close this issue.

SteffenDE avatar Dec 17 '20 15:12 SteffenDE

Does someone have a solution?

guglen avatar Dec 29 '20 23:12 guglen

Does someone have a solution?

As stated in my initial comment:

Running

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask > 255.255.255.0
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd > 192.168.64.255
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart > 192.168.64.1

fixed this problem for me and docker now starts fine.

SteffenDE avatar Dec 29 '20 23:12 SteffenDE

Does someone have a solution?

As stated in my initial comment:

Running

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkMask > 255.255.255.0
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberEnd > 192.168.64.255
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart > 192.168.64.1

fixed this problem for me and docker now starts fine.

can you please tell me the steps you have performed?

guglen avatar Dec 29 '20 23:12 guglen

You've already quoted the commands that you must run execute using the macOS terminal. If you aren't sure how to do this, maybe you should wait for a release where this is not necessary any more.

SteffenDE avatar Dec 30 '20 10:12 SteffenDE

thnks Steffen,

the problem of IP 192.168.65.1 of the bridge card "seems" to have been solved by modifying the file

/Library/preferences/SystemConfiguration/com.apple.vmnet.plist

by editing the final part of the file:

     <key> Shared_Net_Address </key>
     <string> 192.168.64.1 </string>
     <key> Shared_Net_Mask </key>
     <string> 255.255.255.0 </string>

guglen avatar Jan 01 '21 17:01 guglen

I am also experiencing this issue on an M1 Mac, although I believe in my case it may have be caused by an existing Parallels Desktop Preview installation. This computer was not restored by Time Machine, but a lot of the ~/Library directory was copied over from an existing Intel Mac.

Unfortunately neither @SteffenDE's defaults edits, nor the SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address edit, seem to work. Uninstalling Parallels also did not fix the issue.

Docker will show the error INFO[0220] cannot set up multiplexer, will retry in 2s: dial tcp 192.168.64.1:1999: connect: network is unreachable until I run sudo ifconfig bridge100 inet 192.168.64.1 netmask 255.255.255.0.

At that point Docker will finish starting, but calls to the Docker registry to pull down images will fail since it seems to be calling 192.168.173.1 instead of 64.1:

% docker run -d -p 80:80 docker/getting-started
Unable to find image 'docker/getting-started:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.173.1:53: read udp 192.168.173.5:33708->192.168.173.1:53: i/o timeout.

If I restart Docker, the SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address is reset to 192.168.173.1 and bridge100 shows

inet 192.168.173.1 netmask 0xffffff00 broadcast 192.168.173.255
inet6 fe80::c8a:1c87:b429:c106%bridge100 prefixlen 64 secured scopeid 0x14

rededge-ian avatar Feb 10 '21 09:02 rededge-ian

The latest version of the M1 preview has resolved this issue.

rededge-ian avatar Feb 18 '21 03:02 rededge-ian

Still broken in latest preview release I just tried, from https://desktop.docker.com/mac/stable/arm64/60984/Docker.dmg

Same error in console.log that never stops, and Docker never successfully starts up (unless the Mac firewall is disabled):

INFO[0026] connecting to tcp+bootstrap+client://gateway.docker.internal:62734/3a430e9d1d3953fcb729cd42cf32d7bdf6fde436e23ff44e1ed3f13fac358511...
INFO[0026] cannot set up multiplexer, will retry in 2s: querying route for 8.8.8.8: network is unreachable
INFO[0028] connecting to tcp+bootstrap+client://gateway.docker.internal:62734/3a430e9d1d3953fcb729cd42cf32d7bdf6fde436e23ff44e1ed3f13fac358511...
INFO[0028] cannot set up multiplexer, will retry in 2s: querying route for 8.8.8.8: network is unreachable

clairegraham avatar Feb 18 '21 15:02 clairegraham

I'm pretty sure this was fixed a long time ago, closing.

stephen-turner avatar May 07 '21 18:05 stephen-turner

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

docker-robott avatar Jun 06 '21 03:06 docker-robott