When bootstrapping a windows 2016 machine, the template defaults to windows 2008r2
10.254.130.157 Detected Windows Version 10.0 Build 14393
10.254.130.157 Warning: Unknown version of Windows, assuming default of Windows 2008r2
Windows 2016 standard edition is detected as:
C:\Users\Administrator>ver
Microsoft Windows [Version 10.0.14393]
Windows 10 is detected as:
C:\WINDOWS\system32>ver
Microsoft Windows [Version 10.0.10586]
full output
10.254.130.157 ) 1>C:\chef\wget.ps1
10.254.130.157
10.254.130.157 C:\Users\vagrant>(
10.254.130.157
10.254.130.157
10.254.130.157
10.254.130.157 )
10.254.130.157 Detected Windows Version 10.0 Build 14393
10.254.130.157 Warning: Unknown version of Windows, assuming default of Windows 2008r2
10.254.130.157
10.254.130.157 C:\Users\vagrant>goto architecture_select
10.254.130.157
10.254.130.157 C:\Users\vagrant>IF "AMD64" == "x86" IF not defined PROCESSOR_ARCHITEW6432
10.254.130.157
10.254.130.157 C:\Users\vagrant>goto install
10.254.130.157 Checking for existing downloaded package at "C:\Users\vagrant\AppData\Local\Temp\chef-client-latest.msi"
10.254.130.157 No existing downloaded packages to delete.
10.254.130.157 Attempting to download client package using PowerShell if available...
10.254.130.157 powershell.exe -ExecutionPolicy Unrestricted -InputFormat None -NoProfile -NonInteractive -File C:\chef\wget.ps1 "https://www.chef.io/chef/download?p=windows&pv=2008r2&m=x86_64&DownloadContext=PowerShell&v=12" "C:\Users\vagrant\AppData\Local\Temp\chef-client-latest.msi"
10.254.130.157 Download via PowerShell succeeded.
10.254.130.157 Installing downloaded client package...
10.254.130.157
10.254.130.157 C:\Users\vagrant>msiexec /qn /log "C:\Users\vagrant\AppData\Local\Temp\chef-client-msi8863.log" /i "C:\Users\vagrant\AppData\Local\Temp\chef-client-latest.msi"
10.254.130.157 WARNING: Failed to install Chef Client MSI package in remote context with status code 1603.
10.254.130.157 WARNING: This may be due to a defect in operating system update KB2918614: http://support.microsoft.com/kb/2918614
10.254.130.157 WARNING: Saving installation log of failure at "C:\Users\vagrant\AppData\Local\Temp\chef-client-msi8863.log-fail.log"
10.254.130.157 WARNING: Retrying installation with local context...
10.254.130.157 WARNING: Task may not run because /ST is earlier than current time.
10.254.130.157 SUCCESS: The scheduled task "chefclientbootstraptask" has successfully been created.
10.254.130.157 Successfully created scheduled task to install Chef Client.
10.254.130.157 SUCCESS: Attempted to run the scheduled task "chefclientbootstraptask".
10.254.130.157 Successfully started Chef Client installation scheduled task.
10.254.130.157 Waiting for installation to complete -- this may take a few minutes...
10.254.130.157
10.254.130.157 SUCCESS: Signal received.
10.254.130.157 Finished waiting for Chef Client package to install.
10.254.130.157 Installation completed successfully
10.254.130.157 Writing validation key...
10.254.130.157 Validation key written.
10.254.130.157
10.254.130.157 C:\Users\vagrant>mkdir C:\chef\trusted_certs
10.254.130.157
When bootstrapping a windows 2016 machine, the template defaults to windows 2008r2
Windows 2016 standard edition is detected as:
Windows 10 is detected as:
full output
The solution is to add another definition here:
https://github.com/chef/knife-windows/blob/acb113c75fc82f6deb4e25efd94823a15882e873/lib/chef/knife/bootstrap/windows-chef-client-msi.erb#L69-L83
It appears windows-chef-client-msi.erb only supports server editions of windows. Just add the download link for 2016