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

Add network connection type option #34

Merged

Conversation

zarenner
Copy link
Contributor

@zarenner zarenner commented Apr 16, 2021

#31 (#30) made it possible to start on Big Sur, but for some users the default 'nat' connection type may no longer work on Big Sur's internet sharing for those running DNS proxies due to https://communities.vmware.com/t5/VMware-Fusion-Discussions/DNS-Forwarder-Does-Not-Seem-to-Exist-in-VMware-Fusion-12-on-Big/td-p/2808576

Well here's the problem! Before Big Sur, VMware Fusion did its own DNS stuff, so it was unaffected by a service already bound to port 53 on the host. But starting with Big Sur, VMware leverages os-level DNS dispatching. The problem here is that the OS-level mDNSResponder handling of DNS requests appears to want to bind to every address. And if something has already bound port 53, even just for the loopback address, this greedy attempt to bind port 53 everywhere results in port 53 being bound nowhere. So as described above, any NAT-enabled VM in such a situation will have nothing to answer its DNS requests.

If it's possible, a VMware-level fix would be to cause mDNSResponder to bind port 53 only on the network interfaces that VMware has configured / is using. That way, VMware Fusion should be guaranteed to not conflict with any network configuration that the machine operator has configured.

Since the NAT-based networking is therefore currently unusable in some cases, this PR makes it possible to use bridged networking instead until VMWare fixes the issue.

@zarenner zarenner force-pushed the zarenner/add-connection-type branch from 676dbd8 to 53da0c9 Compare April 16, 2021 04:24
@zarenner
Copy link
Contributor Author

FYI I intend to open a PR consuming this in minikube as soon as this is checked in and released.

@zarenner
Copy link
Contributor Author

/cc @mikeroySoft

@mikeroySoft
Copy link
Contributor

I've got it building (had to update to go mods since the original repo hasn't done so yet)...
I'm not sure how to test tho...
Would I do something like docker-machine create --driver=vmware --engine-env VMWARE_NETWORK_TYPE=bridged ?

@zarenner
Copy link
Contributor Author

zarenner commented Apr 16, 2021

docker-machine create --driver=vmware --vmware-network-type=bridged test should work! (after placing the updated docker-machine-driver-vmware binary in e.g. /usr/local/bin next to docker-machine)

@mikeroySoft
Copy link
Contributor

Ah, thanks!
I see what I did... I ran that command the first time, but had the order of flags out of whack...

> docker-machine create --driver=vmware default --vmware-network-type=bridged
Invalid command line. Found extra arguments [--vmware-network-type=bridged]

derp...

Ran it again with the name of the machine at the tail of the command, and it's booting up with an IP that I would expect =)

So great, we're good... I want to merge this, but I feel like we should get go mod support in there first... so let me work on that (there's a PR collecting dust on it) and then pull this one in at the same time.

@mikeroySoft mikeroySoft merged commit 50ddcf0 into machine-drivers:master Apr 16, 2021
@zarenner zarenner deleted the zarenner/add-connection-type branch April 16, 2021 20:23
@zarenner
Copy link
Contributor Author

Thanks! I'll keep an eye out for whenever you decide to and figure out how to create a release 🙂

@mikeroySoft
Copy link
Contributor

Release v0.1.3, which includes this change, has been published!
It also the homebrew-tap formula, so you can just do a brew upgrade docker-machine-driver-vmware =)

zarenner added a commit to zarenner/docker-machine-driver-vmware that referenced this pull request May 17, 2021
zarenner added a commit to zarenner/docker-machine-driver-vmware that referenced this pull request May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants