packer-cn/website/content/partials
Darwin Liu 4f2e9117c3 QEMU: Minor fix to VNC mapping parameters and output
* 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 7335695c), but I am also confused as to how he was
able to get QEMU to get a VNC listening port below 5900, as examining
QEMU's git history has shown that this behavior has been in since at
least 2017, probably older.

Hopefully the more explicit error messaging and documentation can make
it clear why this is being undone.
2021-01-07 22:23:43 -07:00
..
builder QEMU: Minor fix to VNC mapping parameters and output 2021-01-07 22:23:43 -07:00
builders refactor to mdx remote 2020-12-14 18:20:01 -05:00
commands refactor to mdx remote 2020-12-14 18:20:01 -05:00
from-1.5 refactor to mdx remote 2020-12-14 18:20:01 -05:00
guides refactor to mdx remote 2020-12-14 18:20:01 -05:00
helper/communicator refactor to mdx remote 2020-12-14 18:20:01 -05:00
packer-plugin-sdk Add regenerated docs from packer-plugin-sdk 2021-01-06 16:27:12 -05:00
post-processor Document exception to encryption (#10395) 2020-12-16 10:35:34 +01:00
post-processors refactor to mdx remote 2020-12-14 18:20:01 -05:00
provisioner Document exception to encryption (#10395) 2020-12-16 10:35:34 +01:00
provisioners refactor to mdx remote 2020-12-14 18:20:01 -05:00