I need help triggering an automation task as part of the teardown workflow when a VM has shutdown due to shutdown policy

Hello Team,

I need some assistance here.

I have an automation task for uninstalling the SCCM client during VM deletion. This task works when I delete a normal VM, but it doesn’t work when an instance is shutdown due to a shutdown policy. When I delete an expired VM, I have a task in my teardown workflow to start the instance and then run the SCCM uninstall automation on it. However, during the uninstall task, Morpheus immediately powers down the instance, causing the task to fail every time, and the instance is not deleted. Please advise on how I can handle this automation. Is there a way to automate the process so that Morpheus does not shut down expired VMs during the teardown task. I appreciate any kind of help here.

Reg - Ajay

Sounds like on the poll, Morpheus is detecting the server should be shutdown (from the policy) and shutting down again. Which in turn, is immediately terminating your instance.

If you are automating that process, step 1 may need to be “remove shutdown” on the instance.

See this link.