Programming API Might Not Show Current Value for Virtual Machine Power State
Details
When you call GetProperties( ) to examine the
VIX_PROPERTY_VM_POWER_STATE property, the value might not
immediately show the result of a recent change in the virtual
machine's power state. Instead, the value shows the previous power
state. For example, after you power off a virtual machine, the
Vix_GetProperties( ) might continue to report for a brief time that
the power state of the virtual machine is
VIX_POWERSTATE_POWERED_ON.
Solution
If your client application depends on checking the power state,
sleep several seconds after a power state change before checking
the value of the VIX_PROPERTY_VM_POWER_STATE property.