Hi all,
By default vRA PowerOn VMs after deployement.
I want to power off a VM after deployement.
In Administration --> Subscriptions --> Conditions
I configure this :
My workflow is executed to PowerOff the VM, after, vRA PowerOn the VM
I don't now witch parameter I have to choose in Data>Lifecycle state > Lifecyce state name
Any idea to PowerOff the VM in the end of the cycle.
Thanks
Hi everyone,
Here is the answer to my question from our TAM. It works good
//===================================//
// In vRA //
//===================================//
1- Create a Custom Properties (Administration>Property Dictionary>Property Definitions).
name exp = PreventOn
Date Type = Boolean
2- Add a new Properties (PreventOn) to your Property Group (exp : CreateCoquille). Name = PreventOn ; Value = true
3- Modify the Blueprint how deploy the VMs(Design>Blueprints)
In Properties --> Property Groups, add the to your Property Groups the (CreateCoquille) group
Right now, when you deploy a new VM, the Custom Properties (PreventOn) is assigned to your VM with the value true.
4- Go to Administration > Events > Subscriptions
Create a new Subsciption the type "Machine lifecycle" and add all conditions in the screenshot
Important, for the 4th conditions, Data > Machine > Properties, add this line to bind your Custom Properties
${data~machine~properties~PreventOn}
This condition is true when we deploy the VM for the firt time, the cutom Properties exist with value = true. So all conditions are met, and our workflow is executed (see section "In Orchestrator" )
once the workflow is executed, the cutom properties is removed, which allows us to start the machine without the worfkflow being executed to prevent it from starting, since the 4th conditions will never be true (we delete the cutom properties in the workflow)
/===================================//
// In Orchestrator //
//===================================//
1- Create a scriptable task
2- Create two Output (workflowNextState, type =string), (virtualMachineDeleteProperties, type = Properties ) spelling is important for this two variable
3- In the scriptable task, add this line: workflowNextState = "TurningOff";
This line inform vRA to jump to step TurningOff
4- In the scriptable task, add this line: virtualMachineDeleteProperties.put("SNG.PreventOn");
This line delete the cutom property (PreventOn) from the VM. When the deployment is complete
Wishing that it helps
See the solution presented by a user here to skip the initial power on entirely.
Thanks daphnissov,
Can you explain me how to do that :
"In the associated workflow, set the workflowNextState parameter to BuildComplete and put it as output parameter. "
Hi everyone,
Here is the answer to my question from our TAM. It works good
//===================================//
// In vRA //
//===================================//
1- Create a Custom Properties (Administration>Property Dictionary>Property Definitions).
name exp = PreventOn
Date Type = Boolean
2- Add a new Properties (PreventOn) to your Property Group (exp : CreateCoquille). Name = PreventOn ; Value = true
3- Modify the Blueprint how deploy the VMs(Design>Blueprints)
In Properties --> Property Groups, add the to your Property Groups the (CreateCoquille) group
Right now, when you deploy a new VM, the Custom Properties (PreventOn) is assigned to your VM with the value true.
4- Go to Administration > Events > Subscriptions
Create a new Subsciption the type "Machine lifecycle" and add all conditions in the screenshot
Important, for the 4th conditions, Data > Machine > Properties, add this line to bind your Custom Properties
${data~machine~properties~PreventOn}
This condition is true when we deploy the VM for the firt time, the cutom Properties exist with value = true. So all conditions are met, and our workflow is executed (see section "In Orchestrator" )
once the workflow is executed, the cutom properties is removed, which allows us to start the machine without the worfkflow being executed to prevent it from starting, since the 4th conditions will never be true (we delete the cutom properties in the workflow)
/===================================//
// In Orchestrator //
//===================================//
1- Create a scriptable task
2- Create two Output (workflowNextState, type =string), (virtualMachineDeleteProperties, type = Properties ) spelling is important for this two variable
3- In the scriptable task, add this line: workflowNextState = "TurningOff";
This line inform vRA to jump to step TurningOff
4- In the scriptable task, add this line: virtualMachineDeleteProperties.put("SNG.PreventOn");
This line delete the cutom property (PreventOn) from the VM. When the deployment is complete
Wishing that it helps