I run a dedicated Windows VM that has no interactive logons, and is running a Jenkins agent as a service. Jenkins automatically generates a bug report when a build fails and assigns it to the people who changed the source code since the last build.
When Windows Update decides to reboot the machine, it just kills the current build, which leads to a "failed" status and a spurious bug report.
Is there a way to somehow coordinate between WU and a service so that the agent can be shut down gracefully before the update?