GithubHelp home page GithubHelp logo

Comments (9)

roniyako avatar roniyako commented on September 18, 2024

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.

roniyako avatar roniyako commented on September 18, 2024

Do you have a sleep in any of your powershell code?

from packer-plugin-windows-update.

rgl avatar rgl commented on September 18, 2024

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.

roniyako avatar roniyako commented on September 18, 2024

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.

roniyako avatar roniyako commented on September 18, 2024

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.

roniyako avatar roniyako commented on September 18, 2024

Also, this is trying it on a Windows 2016 image.

from packer-plugin-windows-update.

rgl avatar rgl commented on September 18, 2024

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.

rgl avatar rgl commented on September 18, 2024

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.

rgl avatar rgl commented on September 18, 2024

closed due to lack of feedback.

from packer-plugin-windows-update.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.