Hi,
I'm using VIX API to automate some deployment tests.
I'm using VMware Server, with some virtual machines. All virtual machines are with the independent-nonpersistent mode.
The problem i'm facing is that I need to reset the virtual machine OS, and, after the reset, continue to use VIX API commands, such as running programs in guest, copying files,....
I manage to reset the vmware with option VIX_VMPOWEROP_FROM_GUEST.
But now i need to wait until the reset is finish, and then continue running programs on the virtual machine.
I've tried to use the PowerState info, but i always get state PowerOn (1032) ( despite vmware reseting)
/PowerState of Vmware 1032 = VIX_POWERSTATE_POWERED_ON
//while(virtualMachine.PowerState != 1032)
How can i wait until the vmware finishes reseting and continue with the test?
Thanks,
Just use the wait for vmware tools command.
Waiting for tools is a good option. I've found a few cases where other services are not quite ready after a reboot, so I prefer to test the login using login_to_guest(), waiting for a positive response and sleeping a small time between failures. This guarentees the run program command will work since a successful login is a prerequisite.