Rahul418282
Contributor
Contributor

vRO package/workflow to automate vCenter Schedule task

I want to create VM weekly reboot task along with VM provisioning via vRA blueprint. Understand there is a schedule task option within vCenter which allows VM's hourly or weekly reboot.

 

Is there any workflow or vRO package available?

Labels (1)
0 Kudos
4 Replies
nef_user
Enthusiast
Enthusiast

You can create a workflow at vRO that schedule the run of another vRO workflow to reboot de VM. I use this method to change vm virtual hardware at scheduled time.

0 Kudos
nef_user
Enthusiast
Enthusiast

You can also use VcScheduledTaskManager to create the task at vCenter. This object is an attribute of sdkConnection object available using default vCenter Server Plugin

0 Kudos
Rahul418282
Contributor
Contributor

Thanks for suggestion. I am trying to provide this as resource action ( sort of day 2 action for end user ).

Selected "Create Recurrent Task" followed by "Reboot Guest OS" vRO workflows. Provided workflow ID of Reboot Guest OS to first task but how to pass selected virtual machine name to Create recurrent task?

Selected external source but no vRO logic is appearing?

Passing Virtual machine manually!! What would be the Key and value?

 

0 Kudos
nef_user
Enthusiast
Enthusiast

You need to get the Vc:VirtualMachine object  of the vm first. After that, the Create Recurrent Task workflow requires a Properties object as input.

 

var workflowArguments = new Properties();

workflowArguments.put("vm", vmObject); //First is the name of the input at the workflow, and the second is the vm object.

0 Kudos