1 Reply Latest reply on Mar 9, 2020 2:09 PM by GeiAll

    vRA Orchestrator Workflow - Skip Initial Power On

    benlooy Lurker

      Hello! *We are using vRA Version: 7.5.0 (Build: 10053500)

       

      We need to deploy blueprints with the VMs powered off. Post provisioning, the machines should be in a powered off state.

       

      We found one way of doing this on another thread:

      "You need an addition event subscription with event topic Machine provisioning with the condition "Data->Lifecycle state->Lifecycle state event" EQUALS "BasicVmWorkflow.CreatingMachine.EVENT.OnCreatingMachineComplete" and maybe a second condition if u dont want it for all your Blueprints. In the associated workflow, set the workflowNextState parameter to BuildComplete and put it as output parameter. Now the initial power on event will be bypassed and the machine will not turn on at this point."

       

      This is what we have done so far:

       

      1. Under property definitions we created a property and group "Nopoweron" with bolean value true.

      2. Assigned that property and property group to the machines in the blueprint.

      3. Created a event broker subscription:

      (We differed from the solution mentioned above because we are trying to clone the virtual machines in the blueprint, not create them.)

      4. We built a workflow, and it consists of a single scriptable item:

           We have one input: "payload" type properties.

           Under Scripting we have:

      workflowNextState = payload.get("workflowNextState");

      System.log("workflowNextState: " + workflowNextState );

      virtualMachineAddOrUpdateProperties = new Properties();

      virtualMachineAddOrUpdateProperties.put("workflowNextState", 'BuildComplete');

          

      The workflow has one output: virtualMachineAddOrUpdateProperties type properties.

      5. I referenced the workflow in the event broker subscription.

       

      So far, we have had no luck getting this to work and the workflow does not show that it is getting executed.

       

      Thanks in advance for your help!

        • 1. Re: vRA Orchestrator Workflow - Skip Initial Power On
          GeiAll Enthusiast

          Hi Benlooy.

           

          If your workflow show no logs, it's most likely something wrong with the conditions.

          It should show in the log if it's executed. Try running with only LifeCycle state event to confirm this.

           

          Second, I'm quite sure you must run the EBS workflow as blocking. Or else any parameters will not be updated back to vRA before the execution of the next event. (EG: Triggering Poweron will be run before your EBS workflow is finished.)

           

          Futher more try to run with virtualMachineEvent instead of virtualMachineAddOrUpdateProperties. (virtualMachineAddOrUpdateProperties seems to change behaviour between different versions of vRA. I had it working in 7.0 and 7.1, 7.3 does not updates the properites between the different events. Running 7.6 now, not actually tested it here).

           

          Add an output property to your workflow:

           

          virtualMachineEvent (String)

           

          then set it to:

          virtualMachineEvent = "BuildSuccess"

           

          This is working in 7.3 atleast, however it will then skip any EBS workflows using VMPSMasterWorkflow32.MachineProvisioned or VMPSMasterWorkflow32.VMPSMasterWorkflow32.MachineActivated

           

           

          If you want to see more details, you can have a look at my notes here:

          http://www.threestar.no/dokuwiki/doku.php?id=vrealize:eventbroker:properties