From 486c92d0513c417365dd3daa687692b07ede7805 Mon Sep 17 00:00:00 2001 From: ejdre Date: Fri, 5 Jul 2024 15:33:47 +0100 Subject: [PATCH 1/9] Added new property for ssh to listen on all interfaces --- builder/virtualbox/common/comm_config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builder/virtualbox/common/comm_config.go b/builder/virtualbox/common/comm_config.go index ceddba45..2aeee79b 100644 --- a/builder/virtualbox/common/comm_config.go +++ b/builder/virtualbox/common/comm_config.go @@ -26,6 +26,9 @@ type CommConfig struct { // does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port // on the host to communicate to the virtual machine. SkipNatMapping bool `mapstructure:"skip_nat_mapping" required:"false"` + // Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 + // as opposed to 127.0.0.1 + SSHListenOnAllInterfaces bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false"` // These are deprecated, but we keep them around for backwards compatibility // TODO: remove later From e53486d8971e8ddbf815320f349a69a0cf2522e4 Mon Sep 17 00:00:00 2001 From: ejdre Date: Fri, 5 Jul 2024 15:35:55 +0100 Subject: [PATCH 2/9] Ran go generate --- builder/virtualbox/iso/builder.hcl2spec.go | 2 ++ builder/virtualbox/ovf/config.hcl2spec.go | 2 ++ builder/virtualbox/vm/config.hcl2spec.go | 2 ++ .../builder/virtualbox/common/CommConfig-not-required.mdx | 3 +++ 4 files changed, 9 insertions(+) diff --git a/builder/virtualbox/iso/builder.hcl2spec.go b/builder/virtualbox/iso/builder.hcl2spec.go index 439fd5e2..6344e170 100644 --- a/builder/virtualbox/iso/builder.hcl2spec.go +++ b/builder/virtualbox/iso/builder.hcl2spec.go @@ -104,6 +104,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` + SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -250,6 +251,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, + "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/builder/virtualbox/ovf/config.hcl2spec.go b/builder/virtualbox/ovf/config.hcl2spec.go index fe915292..bf135942 100644 --- a/builder/virtualbox/ovf/config.hcl2spec.go +++ b/builder/virtualbox/ovf/config.hcl2spec.go @@ -94,6 +94,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` + SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -216,6 +217,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, + "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/builder/virtualbox/vm/config.hcl2spec.go b/builder/virtualbox/vm/config.hcl2spec.go index f8065ac5..0ef2d921 100644 --- a/builder/virtualbox/vm/config.hcl2spec.go +++ b/builder/virtualbox/vm/config.hcl2spec.go @@ -94,6 +94,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` + SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -214,6 +215,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, + "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx b/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx index ae818dae..c1caa86f 100644 --- a/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx +++ b/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx @@ -12,4 +12,7 @@ does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. +- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 + as opposed to 127.0.0.1 + From 553275f8c0009fa027b17f71a2e03f1a1c96819f Mon Sep 17 00:00:00 2001 From: ejdre Date: Sun, 7 Jul 2024 17:30:10 +0100 Subject: [PATCH 3/9] Started using the SSHListenOnAllInterfaces on the step_port_forwarding --- .../virtualbox/common/step_port_forwarding.go | 17 ++++++++++++----- builder/virtualbox/iso/builder.go | 9 +++++---- builder/virtualbox/ovf/builder.go | 9 +++++---- builder/virtualbox/vm/builder.go | 9 +++++---- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/builder/virtualbox/common/step_port_forwarding.go b/builder/virtualbox/common/step_port_forwarding.go index 6f94431c..bf7f2570 100644 --- a/builder/virtualbox/common/step_port_forwarding.go +++ b/builder/virtualbox/common/step_port_forwarding.go @@ -28,10 +28,11 @@ import ( // // Produces: type StepPortForwarding struct { - CommConfig *communicator.Config - HostPortMin int - HostPortMax int - SkipNatMapping bool + CommConfig *communicator.Config + HostPortMin int + HostPortMax int + SkipNatMapping bool + SSHListenOnAllInterfaces bool l *net.Listener } @@ -133,10 +134,16 @@ func (s *StepPortForwarding) Run(ctx context.Context, state multistep.StateBag) // Create a forwarded port mapping to the VM ui.Say(fmt.Sprintf("Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port %d)", commHostPort)) + + bindingAddress := "127.0.0.1" + if s.SSHListenOnAllInterfaces { + bindingAddress = "0.0.0.0" + } + command = []string{ "modifyvm", vmName, "--natpf1", - fmt.Sprintf("packercomm,tcp,127.0.0.1,%d,,%d", commHostPort, guestPort), + fmt.Sprintf("packercomm,tcp,%s,%d,,%d", bindingAddress, commHostPort, guestPort), } retried := false retry: diff --git a/builder/virtualbox/iso/builder.go b/builder/virtualbox/iso/builder.go index 1893c44c..7a2b4072 100644 --- a/builder/virtualbox/iso/builder.go +++ b/builder/virtualbox/iso/builder.go @@ -432,10 +432,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, diff --git a/builder/virtualbox/ovf/builder.go b/builder/virtualbox/ovf/builder.go index 06787077..c3eb4e21 100644 --- a/builder/virtualbox/ovf/builder.go +++ b/builder/virtualbox/ovf/builder.go @@ -107,10 +107,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, diff --git a/builder/virtualbox/vm/builder.go b/builder/virtualbox/vm/builder.go index ac5b7bd2..406803ab 100644 --- a/builder/virtualbox/vm/builder.go +++ b/builder/virtualbox/vm/builder.go @@ -91,10 +91,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, From 7cf7b25e632e6fec5b0c54ebd3e3286122e67513 Mon Sep 17 00:00:00 2001 From: ejdre Date: Wed, 10 Jul 2024 19:40:12 +0100 Subject: [PATCH 4/9] Ran go generate to add HTTPOnlyIPv4 property --- builder/virtualbox/iso/builder.hcl2spec.go | 2 ++ builder/virtualbox/ovf/config.hcl2spec.go | 2 ++ builder/virtualbox/vm/config.hcl2spec.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/builder/virtualbox/iso/builder.hcl2spec.go b/builder/virtualbox/iso/builder.hcl2spec.go index 6344e170..0cd9ec6f 100644 --- a/builder/virtualbox/iso/builder.hcl2spec.go +++ b/builder/virtualbox/iso/builder.hcl2spec.go @@ -24,6 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` + HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` ISOChecksum *string `mapstructure:"iso_checksum" required:"true" cty:"iso_checksum" hcl:"iso_checksum"` RawSingleISOUrl *string `mapstructure:"iso_url" required:"true" cty:"iso_url" hcl:"iso_url"` ISOUrls []string `mapstructure:"iso_urls" cty:"iso_urls" hcl:"iso_urls"` @@ -171,6 +172,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, + "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, "iso_checksum": &hcldec.AttrSpec{Name: "iso_checksum", Type: cty.String, Required: false}, "iso_url": &hcldec.AttrSpec{Name: "iso_url", Type: cty.String, Required: false}, "iso_urls": &hcldec.AttrSpec{Name: "iso_urls", Type: cty.List(cty.String), Required: false}, diff --git a/builder/virtualbox/ovf/config.hcl2spec.go b/builder/virtualbox/ovf/config.hcl2spec.go index bf135942..9af42043 100644 --- a/builder/virtualbox/ovf/config.hcl2spec.go +++ b/builder/virtualbox/ovf/config.hcl2spec.go @@ -24,6 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` + HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"` FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"` FloppyContent map[string]string `mapstructure:"floppy_content" cty:"floppy_content" hcl:"floppy_content"` @@ -147,6 +148,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, + "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, "floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false}, "floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false}, "floppy_content": &hcldec.AttrSpec{Name: "floppy_content", Type: cty.Map(cty.String), Required: false}, diff --git a/builder/virtualbox/vm/config.hcl2spec.go b/builder/virtualbox/vm/config.hcl2spec.go index 0ef2d921..b4981fcb 100644 --- a/builder/virtualbox/vm/config.hcl2spec.go +++ b/builder/virtualbox/vm/config.hcl2spec.go @@ -24,6 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` + HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"` FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"` FloppyContent map[string]string `mapstructure:"floppy_content" cty:"floppy_content" hcl:"floppy_content"` @@ -145,6 +146,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, + "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, "floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false}, "floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false}, "floppy_content": &hcldec.AttrSpec{Name: "floppy_content", Type: cty.Map(cty.String), Required: false}, From b44bf6ea07ad8831deda6ff51b63f84e81b4e1a1 Mon Sep 17 00:00:00 2001 From: ejdre Date: Thu, 18 Jul 2024 09:05:24 +0100 Subject: [PATCH 5/9] Ran make generate and added missing web-docs --- .web-docs/components/builder/iso/README.md | 3 +++ .web-docs/components/builder/ovf/README.md | 3 +++ .web-docs/components/builder/vm/README.md | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.web-docs/components/builder/iso/README.md b/.web-docs/components/builder/iso/README.md index 868588bd..b8d91195 100644 --- a/.web-docs/components/builder/iso/README.md +++ b/.web-docs/components/builder/iso/README.md @@ -858,6 +858,9 @@ used to do things such as set RAM, CPUs, etc. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. +- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 + as opposed to 127.0.0.1 + diff --git a/.web-docs/components/builder/ovf/README.md b/.web-docs/components/builder/ovf/README.md index 0a7be30a..b967cdc2 100644 --- a/.web-docs/components/builder/ovf/README.md +++ b/.web-docs/components/builder/ovf/README.md @@ -620,6 +620,9 @@ boot time. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. +- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 + as opposed to 127.0.0.1 + diff --git a/.web-docs/components/builder/vm/README.md b/.web-docs/components/builder/vm/README.md index 5c65dd13..fd5d3873 100644 --- a/.web-docs/components/builder/vm/README.md +++ b/.web-docs/components/builder/vm/README.md @@ -637,6 +637,9 @@ boot time. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. +- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 + as opposed to 127.0.0.1 + From 835aa6825f6fc96fc96acd6c9d9654d377f72529 Mon Sep 17 00:00:00 2001 From: ejdre Date: Mon, 19 Aug 2024 01:07:59 +0100 Subject: [PATCH 6/9] Changed SSHListenOnAllInterfaces to SSHListenAddress where the user can specify the address --- builder/virtualbox/common/comm_config.go | 9 ++++++--- .../virtualbox/common/step_port_forwarding.go | 17 ++++++----------- builder/virtualbox/iso/builder.go | 10 +++++----- builder/virtualbox/iso/builder.hcl2spec.go | 8 ++++---- builder/virtualbox/ovf/builder.go | 10 +++++----- builder/virtualbox/ovf/config.hcl2spec.go | 8 ++++---- builder/virtualbox/vm/builder.go | 10 +++++----- builder/virtualbox/vm/config.hcl2spec.go | 8 ++++---- .../common/CommConfig-not-required.mdx | 3 +-- 9 files changed, 40 insertions(+), 43 deletions(-) diff --git a/builder/virtualbox/common/comm_config.go b/builder/virtualbox/common/comm_config.go index 2aeee79b..a05eb6d3 100644 --- a/builder/virtualbox/common/comm_config.go +++ b/builder/virtualbox/common/comm_config.go @@ -26,9 +26,8 @@ type CommConfig struct { // does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port // on the host to communicate to the virtual machine. SkipNatMapping bool `mapstructure:"skip_nat_mapping" required:"false"` - // Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 - // as opposed to 127.0.0.1 - SSHListenOnAllInterfaces bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false"` + // The address where the SSH port forwarding will be set to listen on. This value defaults to `127.0.0.1`. + SSHListenAddress string `mapstructure:"ssh_listen_address" required:"false"` // These are deprecated, but we keep them around for backwards compatibility // TODO: remove later @@ -75,5 +74,9 @@ func (c *CommConfig) Prepare(ctx *interpolate.Context) []error { errors.New("host_port_min must be less than host_port_max")) } + if c.SSHListenAddress == "" { + c.SSHListenAddress = "127.0.0.1" + } + return errs } diff --git a/builder/virtualbox/common/step_port_forwarding.go b/builder/virtualbox/common/step_port_forwarding.go index bf7f2570..f55877a5 100644 --- a/builder/virtualbox/common/step_port_forwarding.go +++ b/builder/virtualbox/common/step_port_forwarding.go @@ -28,11 +28,11 @@ import ( // // Produces: type StepPortForwarding struct { - CommConfig *communicator.Config - HostPortMin int - HostPortMax int - SkipNatMapping bool - SSHListenOnAllInterfaces bool + CommConfig *communicator.Config + HostPortMin int + HostPortMax int + SkipNatMapping bool + SSHListenAddress string l *net.Listener } @@ -135,15 +135,10 @@ func (s *StepPortForwarding) Run(ctx context.Context, state multistep.StateBag) // Create a forwarded port mapping to the VM ui.Say(fmt.Sprintf("Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port %d)", commHostPort)) - bindingAddress := "127.0.0.1" - if s.SSHListenOnAllInterfaces { - bindingAddress = "0.0.0.0" - } - command = []string{ "modifyvm", vmName, "--natpf1", - fmt.Sprintf("packercomm,tcp,%s,%d,,%d", bindingAddress, commHostPort, guestPort), + fmt.Sprintf("packercomm,tcp,%s,%d,,%d", s.SSHListenAddress, commHostPort, guestPort), } retried := false retry: diff --git a/builder/virtualbox/iso/builder.go b/builder/virtualbox/iso/builder.go index 7a2b4072..af5a6995 100644 --- a/builder/virtualbox/iso/builder.go +++ b/builder/virtualbox/iso/builder.go @@ -432,11 +432,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, - SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenAddress: b.config.SSHListenAddress, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, diff --git a/builder/virtualbox/iso/builder.hcl2spec.go b/builder/virtualbox/iso/builder.hcl2spec.go index 0cd9ec6f..2acd2468 100644 --- a/builder/virtualbox/iso/builder.hcl2spec.go +++ b/builder/virtualbox/iso/builder.hcl2spec.go @@ -24,7 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` - HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` + HTTPNetworkProtocol *string `mapstructure:"http_network_protocol" cty:"http_network_protocol" hcl:"http_network_protocol"` ISOChecksum *string `mapstructure:"iso_checksum" required:"true" cty:"iso_checksum" hcl:"iso_checksum"` RawSingleISOUrl *string `mapstructure:"iso_url" required:"true" cty:"iso_url" hcl:"iso_url"` ISOUrls []string `mapstructure:"iso_urls" cty:"iso_urls" hcl:"iso_urls"` @@ -105,7 +105,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` - SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` + SSHListenAddress *string `mapstructure:"ssh_listen_address" required:"false" cty:"ssh_listen_address" hcl:"ssh_listen_address"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -172,7 +172,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, - "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, + "http_network_protocol": &hcldec.AttrSpec{Name: "http_network_protocol", Type: cty.String, Required: false}, "iso_checksum": &hcldec.AttrSpec{Name: "iso_checksum", Type: cty.String, Required: false}, "iso_url": &hcldec.AttrSpec{Name: "iso_url", Type: cty.String, Required: false}, "iso_urls": &hcldec.AttrSpec{Name: "iso_urls", Type: cty.List(cty.String), Required: false}, @@ -253,7 +253,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, - "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, + "ssh_listen_address": &hcldec.AttrSpec{Name: "ssh_listen_address", Type: cty.String, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/builder/virtualbox/ovf/builder.go b/builder/virtualbox/ovf/builder.go index c3eb4e21..e4756aa2 100644 --- a/builder/virtualbox/ovf/builder.go +++ b/builder/virtualbox/ovf/builder.go @@ -107,11 +107,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, - SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenAddress: b.config.SSHListenAddress, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, diff --git a/builder/virtualbox/ovf/config.hcl2spec.go b/builder/virtualbox/ovf/config.hcl2spec.go index 9af42043..16a0f385 100644 --- a/builder/virtualbox/ovf/config.hcl2spec.go +++ b/builder/virtualbox/ovf/config.hcl2spec.go @@ -24,7 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` - HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` + HTTPNetworkProtocol *string `mapstructure:"http_network_protocol" cty:"http_network_protocol" hcl:"http_network_protocol"` FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"` FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"` FloppyContent map[string]string `mapstructure:"floppy_content" cty:"floppy_content" hcl:"floppy_content"` @@ -95,7 +95,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` - SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` + SSHListenAddress *string `mapstructure:"ssh_listen_address" required:"false" cty:"ssh_listen_address" hcl:"ssh_listen_address"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -148,7 +148,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, - "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, + "http_network_protocol": &hcldec.AttrSpec{Name: "http_network_protocol", Type: cty.String, Required: false}, "floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false}, "floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false}, "floppy_content": &hcldec.AttrSpec{Name: "floppy_content", Type: cty.Map(cty.String), Required: false}, @@ -219,7 +219,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, - "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, + "ssh_listen_address": &hcldec.AttrSpec{Name: "ssh_listen_address", Type: cty.String, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/builder/virtualbox/vm/builder.go b/builder/virtualbox/vm/builder.go index 406803ab..8e22db25 100644 --- a/builder/virtualbox/vm/builder.go +++ b/builder/virtualbox/vm/builder.go @@ -91,11 +91,11 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) }, new(vboxcommon.StepAttachFloppy), &vboxcommon.StepPortForwarding{ - CommConfig: &b.config.CommConfig.Comm, - HostPortMin: b.config.HostPortMin, - HostPortMax: b.config.HostPortMax, - SkipNatMapping: b.config.SkipNatMapping, - SSHListenOnAllInterfaces: b.config.SSHListenOnAllInterfaces, + CommConfig: &b.config.CommConfig.Comm, + HostPortMin: b.config.HostPortMin, + HostPortMax: b.config.HostPortMax, + SkipNatMapping: b.config.SkipNatMapping, + SSHListenAddress: b.config.SSHListenAddress, }, &vboxcommon.StepVBoxManage{ Commands: b.config.VBoxManage, diff --git a/builder/virtualbox/vm/config.hcl2spec.go b/builder/virtualbox/vm/config.hcl2spec.go index b4981fcb..d4ff9186 100644 --- a/builder/virtualbox/vm/config.hcl2spec.go +++ b/builder/virtualbox/vm/config.hcl2spec.go @@ -24,7 +24,7 @@ type FlatConfig struct { HTTPPortMax *int `mapstructure:"http_port_max" cty:"http_port_max" hcl:"http_port_max"` HTTPAddress *string `mapstructure:"http_bind_address" cty:"http_bind_address" hcl:"http_bind_address"` HTTPInterface *string `mapstructure:"http_interface" undocumented:"true" cty:"http_interface" hcl:"http_interface"` - HTTPOnlyIPv4 *bool `mapstructure:"http_only_ipv4" cty:"http_only_ipv4" hcl:"http_only_ipv4"` + HTTPNetworkProtocol *string `mapstructure:"http_network_protocol" cty:"http_network_protocol" hcl:"http_network_protocol"` FloppyFiles []string `mapstructure:"floppy_files" cty:"floppy_files" hcl:"floppy_files"` FloppyDirectories []string `mapstructure:"floppy_dirs" cty:"floppy_dirs" hcl:"floppy_dirs"` FloppyContent map[string]string `mapstructure:"floppy_content" cty:"floppy_content" hcl:"floppy_content"` @@ -95,7 +95,7 @@ type FlatConfig struct { HostPortMin *int `mapstructure:"host_port_min" required:"false" cty:"host_port_min" hcl:"host_port_min"` HostPortMax *int `mapstructure:"host_port_max" required:"false" cty:"host_port_max" hcl:"host_port_max"` SkipNatMapping *bool `mapstructure:"skip_nat_mapping" required:"false" cty:"skip_nat_mapping" hcl:"skip_nat_mapping"` - SSHListenOnAllInterfaces *bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false" cty:"ssh_listen_on_all_interfaces" hcl:"ssh_listen_on_all_interfaces"` + SSHListenAddress *string `mapstructure:"ssh_listen_address" required:"false" cty:"ssh_listen_address" hcl:"ssh_listen_address"` SSHHostPortMin *int `mapstructure:"ssh_host_port_min" required:"false" cty:"ssh_host_port_min" hcl:"ssh_host_port_min"` SSHHostPortMax *int `mapstructure:"ssh_host_port_max" cty:"ssh_host_port_max" hcl:"ssh_host_port_max"` SSHSkipNatMapping *bool `mapstructure:"ssh_skip_nat_mapping" required:"false" cty:"ssh_skip_nat_mapping" hcl:"ssh_skip_nat_mapping"` @@ -146,7 +146,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "http_port_max": &hcldec.AttrSpec{Name: "http_port_max", Type: cty.Number, Required: false}, "http_bind_address": &hcldec.AttrSpec{Name: "http_bind_address", Type: cty.String, Required: false}, "http_interface": &hcldec.AttrSpec{Name: "http_interface", Type: cty.String, Required: false}, - "http_only_ipv4": &hcldec.AttrSpec{Name: "http_only_ipv4", Type: cty.Bool, Required: false}, + "http_network_protocol": &hcldec.AttrSpec{Name: "http_network_protocol", Type: cty.String, Required: false}, "floppy_files": &hcldec.AttrSpec{Name: "floppy_files", Type: cty.List(cty.String), Required: false}, "floppy_dirs": &hcldec.AttrSpec{Name: "floppy_dirs", Type: cty.List(cty.String), Required: false}, "floppy_content": &hcldec.AttrSpec{Name: "floppy_content", Type: cty.Map(cty.String), Required: false}, @@ -217,7 +217,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "host_port_min": &hcldec.AttrSpec{Name: "host_port_min", Type: cty.Number, Required: false}, "host_port_max": &hcldec.AttrSpec{Name: "host_port_max", Type: cty.Number, Required: false}, "skip_nat_mapping": &hcldec.AttrSpec{Name: "skip_nat_mapping", Type: cty.Bool, Required: false}, - "ssh_listen_on_all_interfaces": &hcldec.AttrSpec{Name: "ssh_listen_on_all_interfaces", Type: cty.Bool, Required: false}, + "ssh_listen_address": &hcldec.AttrSpec{Name: "ssh_listen_address", Type: cty.String, Required: false}, "ssh_host_port_min": &hcldec.AttrSpec{Name: "ssh_host_port_min", Type: cty.Number, Required: false}, "ssh_host_port_max": &hcldec.AttrSpec{Name: "ssh_host_port_max", Type: cty.Number, Required: false}, "ssh_skip_nat_mapping": &hcldec.AttrSpec{Name: "ssh_skip_nat_mapping", Type: cty.Bool, Required: false}, diff --git a/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx b/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx index c1caa86f..de05f5bc 100644 --- a/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx +++ b/docs-partials/builder/virtualbox/common/CommConfig-not-required.mdx @@ -12,7 +12,6 @@ does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. -- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 - as opposed to 127.0.0.1 +- `ssh_listen_address` (string) - The address where the SSH port forwarding will be set to listen on. This value defaults to `127.0.0.1`. From 0baa889a1787ffff3b0dc30c7e426135d1f6cd34 Mon Sep 17 00:00:00 2001 From: ejdre Date: Mon, 19 Aug 2024 01:47:42 +0100 Subject: [PATCH 7/9] Updated web-docs --- .web-docs/components/builder/iso/README.md | 3 +-- .web-docs/components/builder/ovf/README.md | 3 +-- .web-docs/components/builder/vm/README.md | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.web-docs/components/builder/iso/README.md b/.web-docs/components/builder/iso/README.md index b8d91195..6473f3b8 100644 --- a/.web-docs/components/builder/iso/README.md +++ b/.web-docs/components/builder/iso/README.md @@ -858,8 +858,7 @@ used to do things such as set RAM, CPUs, etc. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. -- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 - as opposed to 127.0.0.1 +- `ssh_listen_address` (string) - The address where the SSH port forwarding will be set to listen on. This value defaults to `127.0.0.1`. diff --git a/.web-docs/components/builder/ovf/README.md b/.web-docs/components/builder/ovf/README.md index b967cdc2..8f05b494 100644 --- a/.web-docs/components/builder/ovf/README.md +++ b/.web-docs/components/builder/ovf/README.md @@ -620,8 +620,7 @@ boot time. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. -- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 - as opposed to 127.0.0.1 +- `ssh_listen_address` (string) - The address where the SSH port forwarding will be set to listen on. This value defaults to `127.0.0.1`. diff --git a/.web-docs/components/builder/vm/README.md b/.web-docs/components/builder/vm/README.md index fd5d3873..f93237bb 100644 --- a/.web-docs/components/builder/vm/README.md +++ b/.web-docs/components/builder/vm/README.md @@ -637,8 +637,7 @@ boot time. does not setup forwarded port mapping for communicator (SSH or WinRM) requests and uses ssh_port or winrm_port on the host to communicate to the virtual machine. -- `ssh_listen_on_all_interfaces` (bool) - Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 - as opposed to 127.0.0.1 +- `ssh_listen_address` (string) - The address where the SSH port forwarding will be set to listen on. This value defaults to `127.0.0.1`. From 6a394fec0816ad1c4882253ccd6be4bc5499c990 Mon Sep 17 00:00:00 2001 From: ejdre Date: Tue, 21 Jan 2025 09:13:50 +0000 Subject: [PATCH 8/9] Updated packer sdk to version 0.6.0 --- go.mod | 20 +++++++++++--------- go.sum | 40 +++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index b26fa69a..a14b004f 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,10 @@ require ( github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/hcl/v2 v2.19.1 - github.com/hashicorp/packer-plugin-sdk v0.5.4 + github.com/hashicorp/packer-plugin-sdk v0.6.0 github.com/stretchr/testify v1.8.4 github.com/zclconf/go-cty v1.13.3 - golang.org/x/mod v0.13.0 + golang.org/x/mod v0.17.0 ) require ( @@ -48,12 +48,12 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.6 // indirect + github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/go-sockaddr v1.0.7 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/serf v0.10.1 // indirect @@ -81,16 +81,18 @@ require ( github.com/ryanuber/go-glob v1.0.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect github.com/ulikunitz/xz v0.5.10 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.150.0 // indirect diff --git a/go.sum b/go.sum index 9ee34d62..f2d5e5ff 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,8 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.6 h1:TwRYfx2z2C4cLbXmT8I5PgP/xmuqASDyiVuGYfs9GZM= -github.com/hashicorp/go-retryablehttp v0.7.6/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -173,8 +173,9 @@ github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7ml github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-sockaddr v1.0.7 h1:G+pTkSO01HpR5qCxg7lxfsFEZaG+C0VssTy/9dbT+Fw= +github.com/hashicorp/go-sockaddr v1.0.7/go.mod h1:FZQbEYa1pxkQ7WLpyXJ6cbjpT8q0YgQaK/JakXqGyWw= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -193,8 +194,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/packer-plugin-sdk v0.5.4 h1:5Bl5DMEa//G4gBNcl842JopM9L4KSSsxpvB4W1lEwIA= -github.com/hashicorp/packer-plugin-sdk v0.5.4/go.mod h1:ALm0ZIK3c/F4iOqPNi7xVuHTgrR5dxzOK+DhFN5DHj4= +github.com/hashicorp/packer-plugin-sdk v0.6.0 h1:v8JdmM1PkkHu3gIUs63UcsgGlD0U3m/7DWG6PxcmOPw= +github.com/hashicorp/packer-plugin-sdk v0.6.0/go.mod h1:bDCCzvZ6lUJjrY7eI+i9lYmGs9NSymdFFQiGluF8dEg= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hashicorp/vault/api v1.14.0 h1:Ah3CFLixD5jmjusOgm8grfN9M0d+Y8fVR2SW0K6pJLU= @@ -319,6 +320,7 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -332,6 +334,10 @@ github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= @@ -345,8 +351,8 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= @@ -361,8 +367,8 @@ golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99f golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -389,8 +395,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -419,19 +425,19 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From b35d553678e63fee8b6fbe3a5d49934cc622cfa4 Mon Sep 17 00:00:00 2001 From: ejdre Date: Tue, 21 Jan 2025 09:17:24 +0000 Subject: [PATCH 9/9] Ran make generate to update documentation --- .web-docs/components/builder/iso/README.md | 3 +++ .web-docs/components/builder/ovf/README.md | 3 +++ .web-docs/components/builder/vm/README.md | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.web-docs/components/builder/iso/README.md b/.web-docs/components/builder/iso/README.md index 6473f3b8..99355f9a 100644 --- a/.web-docs/components/builder/iso/README.md +++ b/.web-docs/components/builder/iso/README.md @@ -441,6 +441,9 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg - `http_bind_address` (string) - This is the bind address for the HTTP server. Defaults to 0.0.0.0 so that it will work with any network interface. +- `http_network_protocol` (string) - Defines the HTTP Network protocol. Valid options are `tcp`, `tcp4`, `tcp6`, + `unix`, and `unixpacket`. This value defaults to `tcp`. + diff --git a/.web-docs/components/builder/ovf/README.md b/.web-docs/components/builder/ovf/README.md index 8f05b494..0bfc3d12 100644 --- a/.web-docs/components/builder/ovf/README.md +++ b/.web-docs/components/builder/ovf/README.md @@ -278,6 +278,9 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg - `http_bind_address` (string) - This is the bind address for the HTTP server. Defaults to 0.0.0.0 so that it will work with any network interface. +- `http_network_protocol` (string) - Defines the HTTP Network protocol. Valid options are `tcp`, `tcp4`, `tcp6`, + `unix`, and `unixpacket`. This value defaults to `tcp`. + diff --git a/.web-docs/components/builder/vm/README.md b/.web-docs/components/builder/vm/README.md index f93237bb..ff67e565 100644 --- a/.web-docs/components/builder/vm/README.md +++ b/.web-docs/components/builder/vm/README.md @@ -231,6 +231,9 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg - `http_bind_address` (string) - This is the bind address for the HTTP server. Defaults to 0.0.0.0 so that it will work with any network interface. +- `http_network_protocol` (string) - Defines the HTTP Network protocol. Valid options are `tcp`, `tcp4`, `tcp6`, + `unix`, and `unixpacket`. This value defaults to `tcp`. +