rgl / packer-plugin-windows-update

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

Server 2022 Desktop Gets Stuck Waiting for operation to complete #118

Open jamie-oconnell opened 1 year ago

jamie-oconnell commented 1 year ago

When running this plugin against windows server 2022 desktop it hangs on waiting for operation to complete. I have to login to the vm and under windows update menu it shows "Updates are ready to install" with the install now button showing. If I click install now the updates install and the build completes.

Here is my template:

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

  provisioner "windows-restart" {}

  provisioner "windows-update" {
    pause_before    = "30s"
    search_criteria = "IsInstalled=0"
    filters = [
      "exclude:$_.Title -like '*VMware*'",
      "exclude:$_.Title -like '*Preview*'",
      "exclude:$_.Title -like '*Defender*'",
      "exclude:$_.InstallationBehavior.CanRequestUserInput",
      "include:$true"
    ]
    restart_timeout = "120m"
  }

  provisioner "windows-restart" {
    restart_timeout = "30m"
  }
jantari commented 1 year ago

I'm seeing the same, also on Server 2022 with Desktop Experience. Our Server 2022 Core build succeeds no problem.

It gets stuck on Waiting for operation to complete (system performance: x% cpu; x% memory)... for 6+ hours before I cancel the job.

paulmsullivan commented 1 year ago

I'm seeing this same behavior, on Server 2022 with Desktop Experience. I let it wait 3 hours, then rebooted the VM through vSphere VMTools. It then picked back up and continued the Packer provisioning workflow.

Berman510 commented 2 weeks ago

Same issue here - I haven't been able to run windows updates via packer for a long time now.