Comments (9)
Does the plugin provide any error messages back from its script, i would say there might be something with my env and potentially proxies.
from packer-plugin-windows-update.
Do you have a sleep in any of your powershell code?
from packer-plugin-windows-update.
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.
from packer-plugin-windows-update.
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?
from packer-plugin-windows-update.
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
the IClassFactory failed due to the following error: 80070005 Access is denied. (Exception from HRESUL
T: 0x80070005 (E_ACCESSDENIED)).
ERROR: at ExitWhenRebootRequired, C:\Users\Administrator\Desktop\update.ps1: line 96
ERROR: at , C:\Users\Administrator\Desktop\update.ps1: line 115
ERROR EXCEPTION: System.UnauthorizedAccessException: Creating an instance of the COM component with CLS
ID {C01B9BA0-BEA7-41BA-B604-D0A36F469133} from the IClassFactory failed due to the following error: 800
70005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
ERROR EXCEPTION: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Bo
olean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
ERROR EXCEPTION: at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis,
Boolean fillCache, StackCrawlMark& stackMark)
ERROR EXCEPTION: at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, O
bject[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
ERROR EXCEPTION: at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder bind
er, Object[] args, CultureInfo culture, Object[] activationAttributes)
ERROR EXCEPTION: at System.Activator.CreateInstance(Type type, Object[] args)
ERROR EXCEPTION: at Microsoft.PowerShell.Commands.NewObjectCommand.SafeCreateInstance(Type t, Object
[] args)
ERROR EXCEPTION: at Microsoft.PowerShell.Commands.NewObjectCommand.CreateComObject()
ERROR EXCEPTION: at Microsoft.PowerShell.Commands.NewObjectCommand.BeginProcessing()
ERROR EXCEPTION: at System.Management.Automation.Cmdlet.DoBeginProcessing()
ERROR EXCEPTION: at System.Management.Automation.CommandProcessorBase.DoBegin()
from packer-plugin-windows-update.
Also, this is trying it on a Windows 2016 image.
from packer-plugin-windows-update.
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
from packer-plugin-windows-update.
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.
from packer-plugin-windows-update.
closed due to lack of feedback.
from packer-plugin-windows-update.
Related Issues (20)
- Win2022 - "Optional quality update available" HOT 5
- error initializing provisioner 'windows-update': Unknown provisioner HOT 4
- Not all updates are being installed even when using multiple update-restart cycles HOT 3
- Windows 2022 Updates Installed... But Server Doesn't Think They Are HOT 5
- windows-update works intermittently
- Server 2022 Desktop Gets Stuck Waiting for operation to complete HOT 3
- HRESULT exceptions result in a successful build HOT 1
- Packer in Azure only applies the first update found (win-10 and win-11) HOT 1
- Do not restart after updates HOT 3
- Conditional values for SearchCriteria and Filters HOT 1
- packer: command not found
- On Server 2012, scheduled task does not exit `101`, rather exits `2147942501` when reboot required HOT 5
- Duplicate SQL Server Updates found when running escalated Windows Update script resulting in HRESULT: 0x80240013 HOT 3
- Unknown Provisioner when running Windows 11 HOT 3
- Windows Update Download from Microsoft not working for the template behind proxy with authentication.
- Unable to download windows updates with this community provisioner
- Always installing the same update HOT 3
- Failed getting the plugin HOT 1
- Windows Update provisioner did not install patches HOT 1
- Windows 2022 - packer-windows-update-elevated.ps1 repeatedly fails HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-plugin-windows-update.