mitchellh/packer — pull request #1426 by jasonberanek (2014-08-19 03:24:55+00:00)
Title: vmware-iso/esxi: fix multiple issues with VNC address discovery

This pull request address #1372 and #1288, which dealt with resolving a VNC address for the `vmware-iso` builder. Issues come in two main flavors:

- #1288 fixes issue where having a `vnc_port_min` and `vnc_port_max` of the same value with cause a golang error for the workstation `vmware-iso` builders
- #1372 fixes issue where Packer could not detect free VNC ports on Windows for the esxi5 `vmware-iso` builder. Modifications change this process to detect the ports available by scanning the ESXi for all ports currently listened to, and determining if a port is in use accordingly. Note, we still test connecting to the port and address to determine if a firewall may block Packer's connection

In addition to the above, also did a modest refactor to the `VNCAddressFinder` interface to have the `VNCAddress` function return error as an additional parameter. This should allow individual implementations to define their own errors, as appropriate to their implementations.

Note, I'd like to get a few people with eyes on this pull request before merging, and verify that it does support platforms affected by the specific issues as noted above.