From cd5cf77998c05cf9bd955d56b8aaf3d50f718ec9 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 24 Jun 2020 10:40:42 -0700 Subject: [PATCH] only set up localhost port forwarding if skipnatmapping is false. --- builder/qemu/comm_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/qemu/comm_config.go b/builder/qemu/comm_config.go index 45b68b79a..46b3ab082 100644 --- a/builder/qemu/comm_config.go +++ b/builder/qemu/comm_config.go @@ -46,7 +46,7 @@ func (c *CommConfig) Prepare(ctx *interpolate.Context) (warnings []string, errs c.HostPortMax = c.SSHHostPortMax } - if c.Comm.SSHHost == "" { + if c.Comm.SSHHost == "" && c.SkipNatMapping { c.Comm.SSHHost = "127.0.0.1" }