Re: [packer] Build 'vmware-iso' errored: Timeout waiting for WinRM - Windows Updates

769 views
Skip to first unread message

Rickard von Essen

unread,
Jun 21, 2017, 6:31:11 AM6/21/17
to packe...@googlegroups.com
If you are installing alot of updates during a restart you should probably increase restart_timeout to something ridiculously large like 120m. See


On Jun 21, 2017 12:14, <dan.t...@waitrose.co.uk> 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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/5218ee94-551c-4cbe-84d1-aa94cda68e2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Blake Garner

unread,
Jun 21, 2017, 2:41:17 PM6/21/17
to Packer
Take a look at the windows update process I have in this project. 

Basically installs updates and reboots repeatedly until no updates are left. I use an 8hr timeout to accommodate windows 7. 
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.

Matthew Hooker

unread,
Jun 21, 2017, 2:46:08 PM6/21/17
to Packer
Just saw I think this same issue come up here https://github.com/hashicorp/packer/issues/5039

the solution I believe is to set a longer timeout on the restart provisioner. I've got a PR out to update the error messages to be clearer that this isn't related to winrm. Hope this helps!

Reply all
Reply to author
Forward
0 new messages