What is the suggested proper way to determine is a VM is running after issuing a reboot power operation?
If you're using the RebootVM_Task() you'll be able to monitor when the task has completed. Then you'll want to query the powerState of the VM and you can probably monitor the bootTime value which how uptime is computed on the vSphere Client under the "Virtual Machines" tab. This should then let you know when the system is running. The other thing you could do versus doing a loop or sleep is to check for the VMware Tools status or guest info such as IP Address as that won't be available until the OS has booted up and VMware Tools service is running. So there's a few ways and all of which can be checked using the vSphere APIs
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
If you're using the RebootVM_Task() you'll be able to monitor when the task has completed. Then you'll want to query the powerState of the VM and you can probably monitor the bootTime value which how uptime is computed on the vSphere Client under the "Virtual Machines" tab. This should then let you know when the system is running. The other thing you could do versus doing a loop or sleep is to check for the VMware Tools status or guest info such as IP Address as that won't be available until the OS has booted up and VMware Tools service is running. So there's a few ways and all of which can be checked using the vSphere APIs
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
If you have the VMware Tools isntalled then virtulal-machine.guest.guestState.
If you don't have the VMware Tools IMHO there is no reliable way to tell whether the guest operating system is up and running.