hashicorp / hashicorp/packer-plugin-qemu
Qemu builder vnc port missmatch
- Dominant language
- Go
- Stars
- 85
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @kmagics-nhn as hashicorp/packer#10482. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
Hello,
I used packer v1.4.5 before, but this time updated to v.1.6.6.
I'm using vnc port 5920-5930 to avoid port duplication.
When vnc wasn't able to connect well, I checked that it was listening to different port.
* template.json
```
"vnc_bind_address": "0.0.0.0",
"vnc_port_max": 5930,
"vnc_port_min": 5921
```
* qemu vnc port listening
```
2021/01/14 23:22:35 packer-builder-qemu plugin: Found available VNC port: 5928 on IP: 0.0.0.0
2021/01/14 23:22:35 ui: ask: ==> qemu: Pausing after run of step 'stepConfigureVNC'. Press enter to continue.
2021/01/14 23:22:46 packer-builder-qemu plugin: Qemu version: 1.5.3
2021/01/14 23:22:46 ui: ==> qemu: Starting VM, booting disk image
2021/01/14 23:22:46 ui: qemu: The VM will be run headless, without a GUI. If you want to
qemu: view the screen of the VM, connect via VNC without a password to
qemu: vnc://0.0.0.0:7 (? maybe vnc://0.0.0.0:28)
```
When I checked, the code was changed in v1.6.3.
* 1.6.2
https://github.com/hashicorp/packer/blob/e3ac7de9655b3de4b0b0e0f7563fcfc17d6f5150/builder/qemu/step_run.go#L79
* 1.6.3+
https://github.com/hashicorp/packer/blob/9b997f28d5e3a187f2141d7c06082bbf0732954b/builder/qemu/step_run.go#L123
What does this mean? Has there been any change to the QEMU settings?
Finally, is there a way to specify and use the port range?
Thank you.
Contributor guide
Research direction
Start in builder/qemu/step_run.go at the v1.6.2 and v1.6.3 locations cited in the issue, then reproduce the behavior with the provided template.json VNC settings. Compare the selected listening port with the VNC endpoint printed during startup. Done means the reported endpoint accurately reflects the configured port range, or the supported behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100