rgl / packer-plugin-windows-update

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

Windows 2016 not installing updates #68

Open jpatigny opened 4 years ago

jpatigny commented 4 years ago

Hello,

I wasn't able to install windows updates on Windows 2016 Server. I tested multiple scenarios with different outcomes :

For the record, i'm using a local wsus server instead of Windows Updates online but as it's w<orking well on windows 2019...the wsus isn't the problem. I use the configuration of scenario 1 for Windows 2019 (core and gui are both working).

Scénario 1

Different behaviour between core and gui version

Provisionner config

{
  "type": "windows-update",
  "filters": [ "include:$_.Title -like '*Servicing Stack Update for Windows*'" ] 
},
{ "type": "windows-restart" },
{ "type": "windows-update"  },

GUI Logs

==> vsphere-iso: Uploading the Windows update elevated script...
==> vsphere-iso: Uploading the Windows update check for reboot required elevated script...
==> vsphere-iso: Uploading the Windows update script...
==> vsphere-iso: Running Windows update...
    vsphere-iso: Searching for Windows updates...
    vsphere-iso: Waiting for operation to complete (system performance: 1 % cpu; 14 % memory)...
    vsphere-iso: Waiting for operation to complete (system performance: 13 % cpu; 19 % memory)...
    vsphere-iso: Skipped (filter) Windows update (2020-05-08; 1271.31 MB): 2018-05 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4103723)
    vsphere-iso: Found Windows update (2020-05-08; 11.59 MB): 2020-04 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB4550994)
    vsphere-iso: Skipped (filter) Windows update (2020-05-19; 107.44 MB): Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.315.958.0)
    vsphere-iso: Downloading Windows updates (1 updates; 11.59 MB)...
==> vsphere-iso: Restarting Machine
==> vsphere-iso: Waiting for machine to restart...
==> vsphere-iso: A system shutdown is in progress.(1115)
    vsphere-iso: WIN2016C restarted.
==> vsphere-iso: #< CLIXML
==> vsphere-iso: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
==> vsphere-iso: Machine successfully restarted, moving on
==> vsphere-iso: Uploading the Windows update elevated script...
==> vsphere-iso: Uploading the Windows update check for reboot required elevated script...
==> vsphere-iso: Uploading the Windows update script...
==> vsphere-iso: Running Windows update...
    vsphere-iso: Searching for Windows updates...
    vsphere-iso: Found Windows update (2020-05-08; 1271.31 MB): 2018-05 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4103723)
    vsphere-iso: Found Windows update (2020-05-08; 11.59 MB): 2020-04 Servicing Stack Update for Windows Server 2016 for x64-based Syst ems (KB4550994)
    vsphere-iso: Found Windows update (2020-05-19; 107.44 MB): Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.315.958.0)
    vsphere-iso: Downloading Windows updates (3 updates; 1390.34 MB)...
==> vsphere-iso: Provisioning with Powershell... 

CORE Logs (stays stuck)

==> vsphere-iso: Uploading the Windows update elevated script...
==> vsphere-iso: Uploading the Windows update check for reboot required elevated script...
==> vsphere-iso: Uploading the Windows update script...
==> vsphere-iso: Running Windows update...
        vsphere-iso: Searching for Windows updates...

Scénario 2

Same behaviour between core and gui (download but no install)

Provisionner config:

{ "type": "windows-update" },
{ "type": "windows-restart" },
{ "type": "windows-update" },

GUI Logs

Same as scenario 1

CORE Logs (stays stuck)

Same as gui

Does anyone has a working config ?

rgl commented 4 years ago

Sorry, but I have no clue, it works for me with the images that I have on the rgl/windows-vagrant repository.