4f2e9117c3
* Set the QEMU builder vnc_port_min to have a minimum value of 5900,
with updated documentation to explain why.
* Changed output messages so that the correct port is listed in packer's
messaging to the user.
LONGER DESCRIPTION
If vnc_min_port is set to anything above 5900, then packer will fail to
connect via VNC to the QEMU instance. This is due to how QEMU parses
the port for listening to VNC:
host:d
TCP connections will only be allowed from host on
display d. By convention the TCP port is 5900+d.
Previously the calculation for the port was vncPort - VNCPortMin,
however this will result in an incorrect port being displayed in
packer's messages and potentially packer being unable to connect via VNC
to the host.
For example if vnc_port_min=5990 nad vnc_port_max=5999:
```
Looking for available port between 5990 and 5999 on 0.0.0.0
Found available port: 5996 on IP: 0.0.0.0
Found available VNC port: 5996 on IP: 0.0.0.0
[....]
==> Starting VM, booting disk image
view the screen of the VM, connect via VNC without a password to
vnc://0.0.0.0:6
```
This will cause QEMU to set the listening port to 5906 while packer's
VNC client is attempting to connect to 5996.
I am a touch concerned as this commit undoes pull request #9905
(specfically commit
|
||
---|---|---|
.. | ||
builder | ||
builders | ||
commands | ||
from-1.5 | ||
guides | ||
helper/communicator | ||
packer-plugin-sdk | ||
post-processor | ||
post-processors | ||
provisioner | ||
provisioners |