From ebcfd0cd8ecdfb2c15a41f80ddf39655313aeb7f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 24 Jan 2022 06:48:02 -0500 Subject: [PATCH] windows-restart: Update documentation for restart_check_command (#11507) Closes #11467 --- provisioner/windows-restart/provisioner.go | 5 +++-- website/content/docs/provisioners/windows-restart.mdx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index c7761c7ff..c98087063 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -40,8 +40,9 @@ type Config struct { // The command used to restart the guest machine RestartCommand string `mapstructure:"restart_command"` - // The command used to check if the guest machine has restarted - // The output of this command will be displayed to the user + // The command to run after executing `restart_command` to check if the guest machine has restarted. + // This command will retry until the connection to the guest machine has been restored or `restart_timeout` has exceeded. + // The output of this command will be displayed to the user. RestartCheckCommand string `mapstructure:"restart_check_command"` // The timeout for waiting for the machine to restart diff --git a/website/content/docs/provisioners/windows-restart.mdx b/website/content/docs/provisioners/windows-restart.mdx index c6c46b4c0..9c78bced5 100644 --- a/website/content/docs/provisioners/windows-restart.mdx +++ b/website/content/docs/provisioners/windows-restart.mdx @@ -78,8 +78,9 @@ Optional parameters: - `restart_command` (string) - The command to execute to initiate the restart. By default this is `shutdown /r /f /t 0 /c "packer restart"`. -- `restart_check_command` (string) - A command to execute to check if the - restart succeeded. This will be done in a loop. Example usage: +- `restart_check_command` (string) - The command to run after executing `restart_command` + to check if the guest machine has restarted. This command will retry until the connection + to the guest machine has been restored or `restart_timeout` has exceeded.