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?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With