I have a script that stops a VM, and after reconfiguration starts the VM again.
I'm using Wait-Tools to determine when the VM is up again.
Although VMware Tools is definitely installed on the VM, and is the latest version, the Wait-Tools cmdlet sometimes fails with this error :
Wait-Tools : 4/6/20 12:00:58 PM Wait-Tools The specified VM 'APIAWA01' does not have VMware Tools installed.
At /tar/PowerCLI_scripts/UPD.ps1:173 char:28
+ $result = Start-VM $vm | Wait-Tools
+ ~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (APIAWA01:VirtualMachineImpl) [Wait-Tools], ViError
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_WaitTools_ToolsNotInstalledOrVersionIncorrect,VMware.VimAutomation.ViCore.Cmdlets.Commands.WaitTools
Any suggestions, please ?
Is this a timing issue ?
I'm running the script from Powershell in Linux. Could that be the problem ?
How can I determine the cause of this intermittent problem ?
Is there another (better) way to wait until the VM is completely up again ?
Thanks,
Hans
Hi Luc,
Tried that, but it didn't work.
Anyway, I'm going to close this post because I just found another thread where you are using the GuestOperationsReady property.
Tried that, and this seems to work perfectly.
So, in the end, thanks for pointing me to the other way of doing this, and thank you for your swift reaction !
Regards,
Hans
Try using the TimeoutSeconds parameter on the Wait-Tools cmdlet.
Some guest OS types might be slower in starting the VMware Tools service.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc,
Tried that, but it didn't work.
Anyway, I'm going to close this post because I just found another thread where you are using the GuestOperationsReady property.
Tried that, and this seems to work perfectly.
So, in the end, thanks for pointing me to the other way of doing this, and thank you for your swift reaction !
Regards,
Hans