Score:0

Can I detect the event of a VM being shutdown on the OS level in Azure?

dk flag

When I shutdown a VM (Linux/Windows) in Azure it is still being billed until I explicitly deallocate it. I want to automate the deallocation after manual shutdown.

To achieve this, I need to identify stopped but still allocated VMs. Doing this on a regular interval works, but isn't as dynamic as I'd like it.

Is there any mechanism (Event Grid, Automation Account, Logic App, ...) that can be used in order to detect an OS-level shutdown of Windows and Linux machine (i.e. a change in the state of a VM from running to stopped) without polling (i.e. event-driven), and which doesn't rely on any modification or additional software on the VM-side?

ng flag
This is not easy to achieve, could you instead avoid people manually shutting down VM's from the OS?
dk flag
@SamCogan unfortunately no, I cannot guarantee all users will stick to this. Additionally, it's the most conventient and user friendly way to use the OS-level shutdown.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.