VMware Cloud Community
cheerschen
Contributor
Contributor

Machine state

We know that a virtual machine can be in "PoweredOff", "PoweredOn" and "Suspended" states.

What if I want to keep track of the transient states such as on to off/ off to on/suspended to on/on to suspended in progress? Which VI SDK APIs are for this?

Reply
0 Kudos
3 Replies
admin
Immortal
Immortal

you could see which tasks are currently associated with the virtual machine and derive the information from that. See recentTask property on ManagedEntity.

Reply
0 Kudos
nitinsahi
Enthusiast
Enthusiast

I think I didn't understand your question well..... Do you want to take a report of VM's that for how many hours these were UP,Down,Suspend ??

Reply
0 Kudos
cheerschen
Contributor
Contributor

I am writting a "wrapper" above VI SDK, and there is something like "QueryMachineState" method. I am supposed to return 'TransitioningToOn' state instead of 'PoweredOn' for a VM that is in the progress from off to on.

Reply
0 Kudos