joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Fix Windows 7 builds that use Windows Updates #197

Closed bmolz closed 8 years ago

bmolz commented 8 years ago

Win7 post SP1 patch has around 270 updates currently, each cycle of updates can spend upwards of 40 minutes searching for updates so reduce number of update cycles reduces the build time. Windows update history shows some updates fail but were subsequently installed successfully. win-updates.ps1 is interrupted by automatic updates so run dis-updates.ps1 first.

StefanScherer commented 8 years ago

@bmolz Thank you. Have you seen #194? This should speed up the searching as well. I'll love to see both in. I'll try building a good old Windows 7 again.

bmolz commented 8 years ago

@StefanScherer my build times dropped from around 7 hours to 4-5 hours with modifying the update cycles. Didn't notice a difference with the hotfix. The dotnet compiles are still failing probably due to the openssh user permissions, if you disable the provisioner and run through vagrant ssh it fails the same but if you run it from inside Windows it works.

sneal commented 8 years ago

@bmolz Is the RestartRequired actually needed? I didn't look real close, but this forces a reboot on initial run of the Windows update script?

sneal commented 8 years ago

Going to go ahead and merge it, looks like a good improvement. Extra reboots never hurt Windows :wink: