From 892413b7ea4daa0b8a984c43047e9312d272dba7 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Jul 2020 13:57:51 -0400 Subject: [PATCH] docs/builder/vsphere-iso: Add documentation for BootConfig (#9538) * docs/builder/vsphere-iso: Add documentation for BootConfig * Add documenation for http_ip * Remove duplicate build configuration section --- builder/vsphere/common/step_boot_command.go | 5 +- .../docs/builders/vmware/vsphere-clone.mdx | 3 +- .../docs/builders/vmware/vsphere-iso.mdx | 52 ++++++++++--------- .../common/BootConfig-not-required.mdx | 5 ++ 4 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 website/pages/partials/builder/vsphere/common/BootConfig-not-required.mdx diff --git a/builder/vsphere/common/step_boot_command.go b/builder/vsphere/common/step_boot_command.go index c7aceaf4e..4949ff0d6 100644 --- a/builder/vsphere/common/step_boot_command.go +++ b/builder/vsphere/common/step_boot_command.go @@ -1,3 +1,4 @@ +//go:generate struct-markdown package common import ( @@ -15,7 +16,9 @@ import ( type BootConfig struct { bootcommand.BootConfig `mapstructure:",squash"` - HTTPIP string `mapstructure:"http_ip"` + // The IP address to use for the HTTP server started to serve the `http_directory`. + // If unset, Packer will automatically discover and assign an IP. + HTTPIP string `mapstructure:"http_ip"` } type bootCommandTemplateData struct { diff --git a/website/pages/docs/builders/vmware/vsphere-clone.mdx b/website/pages/docs/builders/vmware/vsphere-clone.mdx index ee39316f4..361300eb1 100644 --- a/website/pages/docs/builders/vmware/vsphere-clone.mdx +++ b/website/pages/docs/builders/vmware/vsphere-clone.mdx @@ -54,8 +54,7 @@ necessary for this build to succeed and can be found further down the page. @include 'common/bootcommand/BootConfig-not-required.mdx' -For more examples of various boot commands, see the sample projects from our -[community templates page](/community-tools#templates). +@include 'builder/vsphere/common/BootConfig-not-required.mdx' ### Http directory configuration diff --git a/website/pages/docs/builders/vmware/vsphere-iso.mdx b/website/pages/docs/builders/vmware/vsphere-iso.mdx index 6aa4a6bb0..47774cfda 100644 --- a/website/pages/docs/builders/vmware/vsphere-iso.mdx +++ b/website/pages/docs/builders/vmware/vsphere-iso.mdx @@ -41,6 +41,33 @@ necessary for this build to succeed and can be found further down the page. @include 'builder/vsphere/iso/Config-not-required.mdx' +### Boot Configuration + +@include 'common/bootcommand/BootConfig.mdx' + +We send each character to the VM with a default delay of 100ms between groups. +The delay alleviates possible issues with latency and CPU +contention. If you notice missing keys, you can tune this delay by specifying +"boot_keygroup_interval" in your Packer template, for example: + +```json +{ + "builders": [ + { + "type": "vsphere-iso", + "boot_keygroup_interval": "500ms" + ... + } + ] +} +``` + +#### Optional: + +@include 'common/bootcommand/BootConfig-not-required.mdx' + +@include 'builder/vsphere/common/BootConfig-not-required.mdx' + ### Http directory configuration @include 'common/HTTPConfig.mdx' @@ -162,31 +189,6 @@ from the datastore. Example: @include 'helper/communicator/WinRM-not-required.mdx' -## Boot Configuration - -@include 'common/bootcommand/BootConfig.mdx' - -We send each character to the VM with a default delay of 100ms between groups. -The delay alleviates possible issues with latency and CPU -contention. If you notice missing keys, you can tune this delay by specifying -"boot_keygroup_interval" in your Packer template, for example: - -```json -{ - "builders": [ - { - "type": "vsphere-iso", - "boot_keygroup_interval": "500ms" - ... - } - ] -} -``` - -#### Optional: - -@include 'common/bootcommand/BootConfig-not-required.mdx' - ## Working with Clusters #### Standalone Hosts diff --git a/website/pages/partials/builder/vsphere/common/BootConfig-not-required.mdx b/website/pages/partials/builder/vsphere/common/BootConfig-not-required.mdx new file mode 100644 index 000000000..880321a0f --- /dev/null +++ b/website/pages/partials/builder/vsphere/common/BootConfig-not-required.mdx @@ -0,0 +1,5 @@ + + +- `http_ip` (string) - The IP address to use for the HTTP server started to serve the `http_directory`. + If unset, Packer will automatically discover and assign an IP. + \ No newline at end of file