Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interpret the status of an Azure VM's instanceView?

It's possible to get information about a VM's "instance view". This is how we'd figure out if a VM is stopped, running, etc. However, the data that Azure returns is a bit cryptic and entirely undocumented (the official documentation says absolutely nothing at all about this).

The statuses array seems to be the one of most usefulness. I've managed to piece together some patterns about its values. For example, it usually contains two objects, one stating the ProvisioningState and the other being the PowerState. I don't understand exactly what ProvisioningState means (so what exactly is the ProvisioningState?).

I notice that a combination of ProvisioningState/succeeded and some other status seems to imply "this is the final status" (running, stopped, generalized, etc). If it's ProvisioningState/updating, then it's a lot weirder. I've seen it have no secondary state, I've seen it be running at this time (and the site seems accessible on that VM).

So that brings me to my second question: what does it mean for ProvisioningState to be updating or creating, yet the PowerState is running and the VM seems entirely functional?

like image 705
Kat Avatar asked Nov 09 '22 23:11

Kat


1 Answers

I found a few variations. There are probably much more, but these might help someone:

The PowerState/ code, has the following values for the displayStatus: VM starting, VM running, VM deallocating, VM deallocated

If a VM is being deleted the, PowerState/ code disappears and you only have the ProvisioningState/ code with the value Deleting for the displayStatus.

like image 142
nmat Avatar answered Nov 14 '22 22:11

nmat