Take a look at the windows update process I have in this project. 
https://github.com/trodemaster/packer-win-pc/

Basically installs updates and reboots repeatedly until no updates are 
left. I use an 8hr timeout to accommodate windows 7. 

On Wednesday, June 21, 2017 at 3:31:11 AM UTC-7, Rickard von Essen wrote:
>
> If you are installing alot of updates during a restart you should probably 
> increase restart_timeout to something ridiculously large like 120m. See
>
>
> https://www.packer.io/docs/provisioners/windows-restart.html#restart_timeout
>
> On Jun 21, 2017 12:14, <[email protected] <javascript:>> wrote:
>
>> Hi guys,
>>
>> Building a Windows Server 2012 R2 image, using the Windows Update 
>> PowerShell module to install updates from a local WSUS instance (called via 
>> a powershell provisioner essentially running "Get-WUInstall -AcceptAll 
>> -IgnoreReboot" ), the process installs over 100 patches successfully.
>>
>> Then my template uses a windows-restart provisioner, but (presumably) 
>> this takes too long to shutdown and restart (due to the Windows installer 
>> module configuring the 100+ updates), that I get "Timeout waiting for 
>> WinRM".
>>
>> I've set the shutdown_timeout to a greater value than the restart is 
>> actually taking, but presumably this setting is only used on the final 
>> shutdown?
>>
>> I think my only option is to try and perform the windows updates via 
>> scripts called from the autounattend file prior to WinRM being available 
>> for the first time, or perhaps carving up the Windows Updates process to 
>> only install 20 or so at a time, and manage multiple restarts?
>>
>> P.S Windows 2008 R2 works fine with the same template (and installing 
>> over 180 patches!), presumably because it's 'more efficient' at installing 
>> and configuring on restart.
>>
>> Thanks in advance for any help.
>>
>> Dan
>>
>>
>> **********************************************************************
>> This email is confidential and may contain copyright material of the John 
>> Lewis Partnership. 
>> If you are not the intended recipient, please notify us immediately and 
>> delete all copies of this message. 
>> (Please note that it is your responsibility to scan this message for 
>> viruses). Email to and from the
>> John Lewis Partnership is automatically monitored for operational and 
>> lawful business reasons.
>> **********************************************************************
>>
>> John Lewis plc
>> Registered in England 233462
>> Registered office 171 Victoria Street London SW1E 5NN
>>
>> Websites: http://www.johnlewis.com
>> http://www.waitrose.com
>> https://www.johnlewisfinance.com
>> http://www.johnlewispartnership.co.uk
>> ********************************************************************** 
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/5218ee94-551c-4cbe-84d1-aa94cda68e2d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/5218ee94-551c-4cbe-84d1-aa94cda68e2d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/ddc81fd2-aab9-4458-a30f-53738887eddf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to