github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/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 /c "packer restart" /t 5 && net stop winrm`. A key action of this is to stop WinRM so that Packer can
    42      detect it is rebooting.
    43  
    44  -   `restart_check_command` (string) - A command to execute to check if the
    45      restart succeeded. This will be done in a loop.
    46  
    47  -   `restart_timeout` (string) - The timeout to wait for the restart. By
    48      default this is 5 minutes. Example value: `5m`. If you are installing
    49      updates or have a lot of startup services, you will probably need to
    50      increase this duration.