Azure - How to programmatically distinguish between different events (deployment vs restart vs VM move)

208 views Asked by At

In Azure Web Role (PaaS model), is there a way to programmatically distinguish between a regular deployment vs Reboot/Restart vs VM move event

I need to run certain startup tasks, or certain conditional code based on whether we are deploying code, or whether Azure Instances were rebooted, or when a VM has been moved internally by Azure and the C: drive got wiped. Something like:

if(deployment) do x
 else if(restart) do y
 else if (VM has moved) do z
0

There are 0 answers