vSphere scripting : wait for vCenter

Building off an earlier demo environment script I found a better way to delay my demo batch until after vCenter starts, by levering Sysinternal’s plist.exe utility:

REM Wait for vCenter to start.
:Wait
c:progra~1pstoolspslist.exe \vCenter | find “vpxd”
IF NOT ERRORLEVEL 1 goto :Continue
IF ERRORLEVEL 1 goto :Wait
:Continue

This has proven much more reliable than waiting for a ping response from the networking stack!

This entry was posted in Computing, Scripting, Virtualization, VMware and tagged , , , , . Bookmark the permalink.

2 Responses to vSphere scripting : wait for vCenter

  1. You could have used the native “query process vpxd.exe” command instead 🙂

    • JAndrews says:

      Interesting, I have not heard of that utility before. It has parameters to pull the services list from a remote machine but when I try it I get a “specify process” message.
      I’ll play with it.
      Thanks
      Josh

Leave a Reply