Ensuring Safe VM Deletion in VMSS: Process Completion Verification Before Scaling Down
Hi everyone, good morning!
I’m working on setting up a logic flow in Power Automate that will delete VMs from my Virtual Machine Scale Set (VMSS) when we have a low number of items to process. I’ve already managed to create a logic that checks the number of items in my database and, based on that, I can successfully increase or decrease the capacity in my VMSS – this part is working well.
The issue is… when reducing resources, I need to check if the VM I intend to delete is still running any flow (to avoid the risk of deleting it while it’s mid-process).
I think I can determine this by looking at some table in Dataverse or something similar.
Now, my goal is to delete certain VMs. Is it possible to ensure that the VM completes whatever it’s currently executing before deletion?
This way, I could be sure that the VM has finished its task before proceeding with deletion. I know other automation platforms offer options like “Immediate STOP,” which stops the VM immediately, and “Request STOP,” which essentially means “finish what you’re doing, then stop.”
This would be when I decrease the number of instances, right?
Do you think I could achieve something like this via Power Automate or Azure?
Hi everyone, good morning! I’m working on setting up a logic flow in Power Automate that will delete VMs from my Virtual Machine Scale Set (VMSS) when we have a low number of items to process. I’ve already managed to create a logic that checks the number of items in my database and, based on that, I can successfully increase or decrease the capacity in my VMSS – this part is working well. The issue is… when reducing resources, I need to check if the VM I intend to delete is still running any flow (to avoid the risk of deleting it while it’s mid-process).I think I can determine this by looking at some table in Dataverse or something similar.Now, my goal is to delete certain VMs. Is it possible to ensure that the VM completes whatever it’s currently executing before deletion? This way, I could be sure that the VM has finished its task before proceeding with deletion. I know other automation platforms offer options like “Immediate STOP,” which stops the VM immediately, and “Request STOP,” which essentially means “finish what you’re doing, then stop.”This would be when I decrease the number of instances, right? Do you think I could achieve something like this via Power Automate or Azure? Read More