vnc_bind_address not getting passed through to qemu

This was mostly addressed in commit
hashicorp/packer@fa273f3

Just missing vncIP from step_type_boot_command.go
This commit is contained in:
Michael Gibson 2018-07-09 14:05:39 -06:00 committed by GitHub
parent d655676194
commit 7e4fb9adb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ func (s *stepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag)
httpPort := state.Get("http_port").(uint)
ui := state.Get("ui").(packer.Ui)
vncPort := state.Get("vnc_port").(uint)
vncIP := state.Get("vnc_ip").(string)
if config.VNCConfig.DisableVNC {
log.Println("Skipping boot command step...")
@ -65,7 +66,7 @@ func (s *stepTypeBootCommand) Run(ctx context.Context, state multistep.StateBag)
// Connect to VNC
ui.Say("Connecting to VM via VNC")
nc, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%d", vncPort))
nc, err := net.Dial("tcp", fmt.Sprintf("%s:%d", vncIP, vncPort))
if err != nil {
err := fmt.Errorf("Error connecting to VNC: %s", err)
state.Put("error", err)