1 Reply Latest reply on Oct 21, 2016 9:38 AM by qc4vmware

    Resilient Powershell Hosts

    JoJoGabor Expert

      I need to build in resiliency to my powershell host and for various reasons have to use the Guest Operations method of accessing it, ie not over the network. Therefore I cant use network load balancing to failover between the two. I assume I can just add two powershell hosts and build some logic into each workflow to try one powershell host, and if that is not online, use the next one.

       

      Would that work?

       

      How could I implement that in a workflow?

        • 1. Re: Resilient Powershell Hosts
          qc4vmware Master

          I've done this sort of thing quite a bit in my environment.  I have a runner I use for ssh commands.  I keep config elements which are just an array of hostnames.  I might have a config element for all the hosts I know are setup to run a certain cli (like our ipam management cli for instance).  When I kick off the runner I specify the runtype of "vQIP" and the runner grabs the contents of that config element, selects a random number based on the number of items in the array, then tries to run the command on that host.  If the command fails I slice out the array element and generate another random number on the remaining items and just cycle through the array.  I also have a retries parameter both for iterations and a timeout I can pass in.