jedi4ever / veewee

Easing the building of vagrant boxes
MIT License
4.29k stars 779 forks source link

OS X 10.10.4 + VMware Fusion 7.1.2 IP address detection broken #1073

Closed dbishop closed 9 years ago

dbishop commented 9 years ago

The readVariable ... guestVar ip returns "unknown" which is then used (because it's not empty?).

Detecting "unknown" as equivalent to empty? solves the problem and the fallback MAC => IP resolution succeeds.

2015-07-31 18:14:42 -0700 -  - [veewee] Found fusion version: 7.1.2
...
2015-07-31 18:14:42 -0700 -  - [veewee] Returning to path /Users/darrell/Documents/SwiftStack/veewee
2015-07-31 18:14:42 -0700 -  - [veewee] Command: "/Applications/VMware\ Fusion.app/Contents/Library/vmrun readVariable "/Users/darrell/Documents/Virtual Machines.localized/rhel71-ssman.vmwarevm/rhel71-ssman.vmx" guestVar ip"
2015-07-31 18:14:42 -0700 -  - [veewee] Output:
2015-07-31 18:14:42 -0700 -  - [veewee] -------
2015-07-31 18:14:42 -0700 -  - [veewee] unknown
2015-07-31 18:14:42 -0700 -  - [veewee] Executing internal ssh command
2015-07-31 18:14:42 -0700 -  - [veewee] ssh -p 22 -o UserKnownHostsFile=/dev/null -t -o StrictHostKeyChecking=no -o VerifyHostKeyDNS=no -o IdentitiesOnly=yes -l vagrant unknown 
ssh: Could not resolve hostname unknown: nodename nor servname provided, or not known

A one-line patch to fix it will follow.