builder/vmware/{iso,vmx}:
Added the specific configuration options that get parsed.
Normalize paths when pulling them from the json template so that they'll work on Windows too.
Added some improved error checking when parsing these options.
Stash the vm's network connection type so that other steps can figure out addressing information
Modified the esx5 driver to support the new addressing logic.
Modified the template in step_create_vmx to include the new options.
builder/vmware/common:
Implemented a parser for vmware's configuration files to the vmware builder.
Modified the driver's interface to include support for resolving both guest/host hw and ip addresses
Implemented a base structure with some methods that implement these features.
Rewrote all ip and mac address dependent code to utilize these new methods.
Removed host_ip and guest_ip due to their logic being moved directly into a
base-structure used by each driver. The code was explicitly checking runtime.GOOS
instead of portably using net.Interfaces() anyways.
Updated driver_mock to support the new addressing methods
[A recent breaking change upstream in Golang's crypto
library](e4e2799dd7)
has broken SSH connectivity for a few builders:
```
==> qemu: Waiting for SSH to become available...
2017/05/20 16:23:58 ui: ==> qemu: Waiting for SSH to become available...
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 [INFO] Attempting SSH connection...
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 reconnecting to TCP connection for SSH
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 handshaking with SSH
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 handshake error: ssh: must specify HostKeyCallback
2017/05/20 16:23:58 packer: 2017/05/20 16:23:58 [DEBUG] SSH handshake err: ssh: must specify HostKeyCallback
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 [INFO] Attempting SSH connection...
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 reconnecting to TCP connection for SSH
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 handshaking with SSH
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 handshake error: ssh: must specify HostKeyCallback
2017/05/20 16:24:05 packer: 2017/05/20 16:24:05 [DEBUG] SSH handshake err: ssh: must specify HostKeyCallback
```
Specifying HostKeyCallback as insecure should make things work again
and would make sense for packer's use case.
PR #2309 introduced case-sensitive options in VMX files. This is to support a case-sensitive option called `virtualSSD`. The change made all options case-sensitive, which causes problems with external VMX options provided in user templates. To prevent breakage, this change is being reverted.
- Fixes#2574
- Reverts #2542
- Reverts #2309