web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Ensuring Safe VM Delet...
Power Automate
Unanswered

Ensuring Safe VM Deletion in VMSS: Process Completion Verification Before Scaling Down

(0) ShareShare
ReportReport
Posted on by 123

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?

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard