Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit 7f95e98

Browse files
weikinhuangtonivdv
authored andcommitted
Support docker-machine-driver-vmware and use machine ip for route (#95)
* Support docker-machine-driver-vmware and use machine ip for route * docker machine ip should not be set to host ip
1 parent 0382ab4 commit 7f95e98

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docker-machine-nfs.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,9 @@ lookupMandatoryProperties ()
268268

269269
prop_machine_driver=$(getMachineDriver $1 "$2")
270270

271-
if [ "$prop_machine_driver" = "vmwarefusion" ]; then
271+
if [ "$prop_machine_driver" = "vmwarefusion" ] || [ "$prop_machine_driver" = "vmware" ]; then
272272
prop_network_id="Shared"
273-
prop_nfshost_ip=${prop_use_ip:-"$(ifconfig -m `route get 8.8.8.8 | awk '{if ($1 ~ /interface:/){print $2}}'` | awk 'sub(/inet /,""){print $1}')"}
274-
prop_machine_ip=$prop_nfshost_ip
273+
prop_nfshost_ip=${prop_use_ip:-"$(ifconfig -m `route get $prop_machine_ip | awk '{if ($1 ~ /interface:/){print $2}}'` | awk 'sub(/inet /,""){print $1}')"}
275274
if [ "" = "${prop_nfshost_ip}" ]; then
276275
echoError "Could not find the vmware fusion net IP!"; exit 1
277276
fi

0 commit comments

Comments
 (0)