From cd8e37013d07d85d831aef22e53b25b6858f29a9 Mon Sep 17 00:00:00 2001 From: flx5 <1330854+flx5@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:14:55 +0200 Subject: [PATCH] Correct communication port --- builder/xenserver/common/step_wait_for_ip.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builder/xenserver/common/step_wait_for_ip.go b/builder/xenserver/common/step_wait_for_ip.go index 68b71d7..6bb6220 100644 --- a/builder/xenserver/common/step_wait_for_ip.go +++ b/builder/xenserver/common/step_wait_for_ip.go @@ -91,11 +91,12 @@ func (self *StepWaitForIP) Run(ctx context.Context, state multistep.StateBag) mu return multistep.ActionContinue } -func InstanceSSHIP(state multistep.StateBag) (string, error) { +func InstanceCommIP(state multistep.StateBag) (string, error) { ip := state.Get("instance_ssh_address").(string) return ip, nil } -func InstanceSSHPort(state multistep.StateBag) (int, error) { - return 22, nil +func InstanceCommPort(state multistep.StateBag) (int, error) { + config := state.Get("commonconfig").(CommonConfig) + return config.Comm.Port(), nil }