I've modified your answer xml file to work with my Windows10 Pro iso, and have been able to complete the first builder phase "virtualbox-01-windows-base", but the second phase "virtualbox-02-win_updates-wmf5" fails because WUInstallAMD64.exe fails with various errors*, causing powershell to exit with 11 meaning "at least one error occurred, reboot required".
I noticed you run scripts/install_windows_updates.ps1 several times in a loop, with windows restarts each time. Any reason why you shouldn't add exit code 11 to "valid_exit_codes" in the win_updates builder, so this builder will make a best effort at applying updates? I have done this in my fork of your (wonderful!**) repo. What I have found is that any of the various windows update errors that occur are all eliminated by the 2nd or 3rd reboot/WUInstall cycle.
- WUInstall errors I've seen so far are:
- "0x80240017 - WU_E_NOT_APPLICABLE - Operation was not performed because there are no applicable updates.
- Download failed
** I applaud your use of chaining phases to facilitate resumption of failed packer builds. :-)
I've modified your answer xml file to work with my Windows10 Pro iso, and have been able to complete the first builder phase "virtualbox-01-windows-base", but the second phase "virtualbox-02-win_updates-wmf5" fails because WUInstallAMD64.exe fails with various errors*, causing powershell to exit with 11 meaning "at least one error occurred, reboot required".
I noticed you run scripts/install_windows_updates.ps1 several times in a loop, with windows restarts each time. Any reason why you shouldn't add exit code 11 to "valid_exit_codes" in the win_updates builder, so this builder will make a best effort at applying updates? I have done this in my fork of your (wonderful!**) repo. What I have found is that any of the various windows update errors that occur are all eliminated by the 2nd or 3rd reboot/WUInstall cycle.
** I applaud your use of chaining phases to facilitate resumption of failed packer builds. :-)