Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

VMware Fusion: static ip addresses (dhcp) are evaluated #3289

Merged
merged 1 commit into from
Apr 11, 2016
Merged

VMware Fusion: static ip addresses (dhcp) are evaluated #3289

merged 1 commit into from
Apr 11, 2016

Conversation

mrbuk
Copy link
Contributor

@mrbuk mrbuk commented Apr 10, 2016

docker-machine seem only to use dynamic dhcp leases from a file like

// DHCP lease table for NAT vmnet interface
var dhcpfile = "/var/db/vmware/vmnet-dhcpd-vmnet8.leases"

Fusion allows to configure static leases, so that the IP always remains the same in a file like

/Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf

The functionality to check both static leases and dynamic leases is implmented in attached code.

getMacAddressFromVmx() -> extracts MAC from vmx file
getIPfromVmnetConfiguration() -> searches vmnet config for ip/mac addresses
GetIP() -> tries first to find the static config through getIPfromVmnetConfiguration() and if that doesn't work falls back to getIPfromDHCPLease()

Signed-off-by: Markus Bukowski <me@mrbuk.de>
@mrbuk
Copy link
Contributor Author

mrbuk commented Apr 10, 2016

Added description of functionality to #2137

@nathanleclaire
Copy link
Contributor

cc @frapposelli

@frapposelli
Copy link
Contributor

:shipit:

@nathanleclaire
Copy link
Contributor

I guess ship it squirrel is the new LGTM for @frapposelli ??? 😛

@frapposelli
Copy link
Contributor

@nathanleclaire haha yes, sorry, we've been using https://lgtm.co with default on :shipit: to approve PRs and now I have it wired to my brain 😄

@nathanleclaire
Copy link
Contributor

😛 LGTM

@nathanleclaire nathanleclaire merged commit d1c9342 into docker:master Apr 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants