github.com/ratanraj/packer@v1.3.2/website/source/docs/provisioners/windows-restart.html.md (about)

     1  ---
     2  description: |
     3      The Windows restart provisioner restarts a Windows machine and waits for it to
     4      come back up.
     5  layout: docs
     6  page_title: 'Windows Restart - Provisioners'
     7  sidebar_current: 'docs-provisioners-windows-restart'
     8  ---
     9  
    10  # Windows Restart Provisioner
    11  
    12  Type: `windows-restart`
    13  
    14  The Windows restart provisioner initiates a reboot on a Windows machine and
    15  waits for the machine to come back online.
    16  
    17  The Windows provisioning process often requires multiple reboots, and this
    18  provisioner helps to ease that process.
    19  
    20  Packer expects the machine to be ready to continue provisioning after it
    21  reboots. Packer detects that the reboot has completed by making an RPC call
    22  through the Windows Remote Management (WinRM) service, not by ACPI functions, so Windows must be completely booted in order to continue.
    23  
    24  ## Basic Example
    25  
    26  The example below is fully functional.
    27  
    28  ``` json
    29  {
    30    "type": "windows-restart"
    31  }
    32  ```
    33  
    34  ## Configuration Reference
    35  
    36  The reference of available configuration options is listed below.
    37  
    38  Optional parameters:
    39  
    40  -   `restart_command` (string) - The command to execute to initiate the
    41      restart. By default this is `shutdown /r /f /t 0 /c "packer restart"`.
    42  
    43  -   `restart_check_command` (string) - A command to execute to check if the
    44      restart succeeded. This will be done in a loop. Example usage:
    45  
    46  ``` json
    47      {
    48        "type": "windows-restart",
    49        "restart_check_command": "powershell -command \"& {Write-Output 'restarted.'}\""
    50      },
    51  ```
    52  
    53  -   `restart_timeout` (string) - The timeout to wait for the restart. By
    54      default this is 5 minutes. Example value: `5m`. If you are installing
    55      updates or have a lot of startup services, you will probably need to
    56      increase this duration.