rgl / packer-plugin-windows-update

Packer plugin for installing Windows updates
Mozilla Public License 2.0
299 stars 71 forks source link

Windows Update provisioner did not install patches #141

Closed BorysMariusz closed 5 months ago

BorysMariusz commented 5 months ago

Hello I try to use Windows Update Packer provisioner to create Windows Server 2022 images. The code which I am using in the Packer configuration is:

provisioner "windows-update" { pause_before = "60s" search_criteria = "IsInstalled=0" filters = [ "exclude:$_.Title -like '*Preview*'", "exclude:$_.Title -like '*Defender*'", "exclude:$_.InstallationBehavior.CanRequestUserInput", "exclude:$_.KBArticleIDs -Contains '5033688'", # Exclude SQL CU25 "include:$true" ] restart_timeout = "120m" }

What I can see in Github Actions Runner logs:

azure-arm.windows2022: Searching for Windows updates... azure-arm.windows2022: Found Windows update (2024-01-09; 22.02 MB): 2024-01 Security Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5034439) azure-arm.windows2022: Found Windows update (2024-02-13; 65.98 MB): 2024-02 Cumulative Update for .NET Framework 3.5, 4.8 and 4.8.1 for Microsoft server operating system version 21H2 for x64 (KB5034682) azure-arm.windows2022: Found Windows update (2024-03-12; 64.77 MB): Windows Malicious Software Removal Tool x64 - v5.122 (KB890830) azure-arm.windows2022: Downloading Windows updates (3 updates; 152.77 MB)... azure-arm.windows2022: Installing Windows updates... azure-arm.windows2022: Waiting for operation to complete (system performance: 7% cpu; 11% memory)... azure-arm.windows2022: Waiting for operation to complete (system performance: 2% cpu; 13% memory)...

But when I login to the Azure VM created from that image, Windows Update still waits for those updates to be installed:

WindowsUpdate

I appreciate any help on that

BorysMariusz commented 5 months ago

https://github.com/rgl/packer-plugin-windows-update/issues/115