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~1\pstools\pslist.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!

About these ads

About JAndrews

Currently a VMware Certified Instructor and vExpert (2012) I have been a programmer, network admin, network engineer, security specialist, storage specialist and virtualization specialist. See About for more. Certifications include VMware: VCI, VCAP(4,5)-DCA, VCP (3,4,5) | Microsoft: MCSE (NT, 2003:Messaging, Security) | NetApp NACE | Novell CNE | IBM CATE
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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s