Skip to content

Add exit code 11 to valid_exit_codes in windows update builder #17

@timblaktu

Description

@timblaktu

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:
    1. "0x80240017 - WU_E_NOT_APPLICABLE - Operation was not performed because there are no applicable updates.
    2. Download failed

** I applaud your use of chaining phases to facilitate resumption of failed packer builds. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions