Using C#, with VM WebService 2.5 against ESX 3.5
I am seeing some odd behavior that I am hoping somebody will be able to assist me with...
I have a suite of integration tests that perform various operations against a VM, including Power Operations and Shutdown/Reboot operations).
In order for these Tests to pass, I place the VM into the proper state before starting each test. (For Example, in order to PowerOff a VM, the VM must first be Powered On, or to ShutDown a Guest the VM must be have completed booting.) Of course, some of these tests require the VM Tools to be installed on the Guest. (And they are for this Test VM).
Several of my tests are failing with a "System.Exception: Operation failed since VMware tools are not running in this virtual machine."
I suspect, these are failing because the operation I am trying to peform (ShutDownGuest for example) is being performed prematurely. (Before the Tools have had an opportunity to load).
My attempt at solving this problem is the following:
Wait for the PowerState to be On
Wait for the GuestOS to be "running"
Wait for the ToolStatus to either be toolsOK, or toolsOld.
Now execute the Operation (ShutDownGuest)
This does not work, because theToolStatus is reporting that the tools are installed and ready to be used, however when the operation is performed the API throws the above exception.
To summarize my question. What is the best method to determine that a machine has been powered on and the tools are installed and ready to be used?
Thanks
Sounds like the objects you verify are correct. It may be the case the shutdownGuestOS needs different version of vmtools. Try verifying the vmtools version compatibility?
-Ram
What kind of Guest OS is installed in the VM. I had this Problem with an old intel Solaris 10 OS. After installing the vmware tools the ShutDownGuest works, but after booting the guest the vmware tools didnt come up.
I have repeatedly uninstalled / installed the tools, after reboot it was every time the same error, vmware tool not installed / running.
An update of a new kernel release had fixed that problem.
best regards
Christian
