-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packer fails whilst searching for updates with exit code 16001 #17
Comments
Does the plugin provide any error messages back from its script, i would say there might be something with my env and potentially proxies. |
Do you have a sleep in any of your powershell code? |
I've never seen that error before. Try to follow the script at https://github.com/rgl/packer-provisioner-windows-update/blob/master/update/windows-update.ps1. |
https://docs.microsoft.com/en-us/windows/desktop/Wua_Sdk/using-wua-from-a-remote-computer Based on the above it says some wua api commands cannot be run remotely, im guessing your plugin uploads the script and runs it locally rather than remotely, correct? |
I uploaded the file to a dummy server and tried to mimic running it remotely as i suspect packer is doing, the error code i suspect, but have not validated is related to unknown error code maybe. When i try run the script i uploaded remotlet i get the below error code. If this was a windows issue, i would of thought everyone would of got it, so i'm unsure where the problem lies for me. ERROR: Creating an instance of the COM component with CLSID {C01B9BA0-BEA7-41BA-B604-D0A36F469133} from |
Also, this is trying it on a Windows 2016 image. |
On the machine itself, you should run it with administrator privileges. The provider actually does it remotely, but indirectly, with a scheduled task that is run as SYSTEM. see https://github.com/rgl/packer-provisioner-windows-update/blob/master/update/elevated-template.ps1 |
Please try with the new 0.6.0 and packer 1.2.5 (restart is broken after that release, so stick with 1.2.5 for now), winrm, and use the provision step without any options, i.e.: {
"provisioners": [
{
"type": "windows-update"
}
]
} It should now install all recommended updates alike the windows update ui. |
closed due to lack of feedback. |
1536205203,,ui,say,==> amazon-ebs: Machine successfully restarted%!(PACKER_COMMA) moving on
1536205203,,ui,say,==> amazon-ebs: Uploading the Windows update elevated script...
1536205217,,ui,say,==> amazon-ebs: Uploading the Windows update script...
1536205230,,ui,say,==> amazon-ebs: Running Windows update...
1536205235,,ui,message, amazon-ebs: #< CLIXML
1536205236,,ui,message, amazon-ebs: Searching for Windows updates...
1536205296,,ui,say,==> amazon-ebs: Terminating the source AWS instance...
1536205328,,ui,say,==> amazon-ebs: Cleaning up any extra volumes...
1536205328,,ui,say,==> amazon-ebs: No volumes to clean up%!(PACKER_COMMA) skipping
1536205328,,ui,say,==> amazon-ebs: Deleting temporary security group...
1536205328,,ui,say,==> amazon-ebs: Deleting temporary keypair...
1536205328,,ui,error,Build 'amazon-ebs' errored: Windows update script exited with non-zero exit
status: 16001
1536205328,,error-count,1
1536205328,,ui,error,\n==> Some builds didn't complete successfully and had errors:
1536205328,amazon-ebs,error,Windows update script exited with non-zero exit status: 16001
1536205328,,ui,error,--> amazon-ebs: Windows update script exited with non-zero exit status: 1600
1
1536205328,,ui,say,\n==> Builds finished but no artifacts were created.
The text was updated successfully, but these errors were encountered: