Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisioner hangs on Waiting for the Windows Modules Installer to exit on Windows Server 2019 #91

Open
Peter1295 opened this issue Apr 29, 2021 · 7 comments

Comments

@Peter1295
Copy link

Hello,

I face occasionally with an issue that Windows Update hangs on the Waiting for the Windows Modules Installer to exit... , where provisioner waits when TiWorker.exe process shut down. I was waiting even 3 hours with no luck. It happens on multiple different versions of packer and provisioner, I also tried multiple Windows Server 2019 1809 iso. If I manually shut down that process, provisioner continue and whole packer job finish successfuly.
I'm monthly recreating 4 VMs on different environments, what are just applying WU and then converts to VMWare templates. They use the same Packer and WU Provisioner version, same Windows iso, very similar configuration (difference in NIC and HDD) but sometimes one hang, other works fine. Then next month, VM what had a problem finish smoothly.
Same happened to me just yesterday with Packer 1.7.2 and Windows Update Provisioner 0.7.0 that on the 1st attempt it hanged, on 2nd worked smoothly. In the past it failed on Packer 1.6.5 and Provisioner 0.10.1 but also other versions.

I can see there are already existing same issues from the past, but none of them looks like were closed and bug solved. Maybe would be good idea to implement feature to not only wait until TiWorker.exe shut down, but add timer/counter, what will force shut down that process after some time or X attemnts.

@tvories
Copy link
Contributor

tvories commented May 7, 2021

I have this issue on 2012 and the vSphere-iso builder. I was digging into the windows-update.ps1 file to see where I could build a timeout, but I haven't had the time to dig into it yet. I think a reasonable timeout is great, or another check on TiWorker.exe, because when mine hangs, I cannot find a tiworker.exe process running. It is almost like the check itself is broken, not TiWorker.exe hanging.

@JordanMalcolmUK
Copy link

I'm having the same problem with Windows 10 20H2. TiWorker.exe isn't running on the box yet "Waiting for the Windows Modules Installer to exit..." just loops.

@shotah
Copy link

shotah commented May 27, 2021

Having this issue on Windows Server 2016 on Cumulative updates. TiWorker.exe never exits so Packer thinks it's still updating while the host is waiting to reboot and install the Cumulative update.

@feiyushi
Copy link
Contributor

We tried Windows updates in two vms at the same time side by side, one is windows 10 20h2-evd, and the other is windows server 2019 and they both had this infinite loop "Waiting for the Windows Modules Installer to exit..."

@Peter1295
Copy link
Author

Fun fact. From the creation of this issue I didn't face it... 4 scheduled packer jobs monthly and it works. I did absolutely no changes and didn't even change WIN iso. It is really strange.

@feiyushi
Copy link
Contributor

We tried Windows updates in two vms at the same time side by side, one is windows 10 20h2-evd, and the other is windows server 2019 and they both had this infinite loop "Waiting for the Windows Modules Installer to exit..."

We use v0.9.0. I think there's an improvement included in v0.10.0 fixing #61. I'll try more in that version.

@feiyushi
Copy link
Contributor

We tried Windows updates in two vms at the same time side by side, one is windows 10 20h2-evd, and the other is windows server 2019 and they both had this infinite loop "Waiting for the Windows Modules Installer to exit..."

We use v0.9.0. I think there's an improvement included in v0.10.0 fixing #61. I'll try more in that version.

v0.10.0 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants