VMware Cloud Community
Venkatanagesh
Contributor
Contributor

How to invoke a VCO Workflow along with reconfigure resource action.

Hi,

I would like to know if there is a way to invoke a VCO Workflow whenever a VM is reconfigured via reconfigure resource action in VRAC.

I could not find any stub for reconfigure, is there a way to edit the internal reconfigure VM Generic workflow using Designer so that a vCO workflow gets triggered whenever reconfigure is done? If so what is the procedure to modify the workflow to suit this need?

Thanks.

0 Kudos
11 Replies
pizzle85
Expert
Expert

there is an unsupported method. In one of the vRA databases there is a table that contains the workflowstubs. You need to find the "reconfigure" workflowstub in there and set hidden:false. This will allow you to modify the workflow stub through the vRA designer applicatoin to add a step that calls out to vRO. Its a PITA and its unsupported but it works. Its important to remember that you only get to do this once. Someone asked about this earlier to shutdown, reconfigure, startup a machine. In that instance you would only be able to shutdown, reconfigure or reconfigure, startup because you only have one workflow state object "reconfigure" there is no "pre-reconfigure" and "post-reconfigure" workflow states.

You could also just write your own custom ASD resource actions and do whatever you want.

I personally use the custom reconfigure stuff to create CMDB entries for every change a user makes to their VM objects in vRA.

Venkatanagesh
Contributor
Contributor

Thanks. Do you know the table name?

0 Kudos
pizzle85
Expert
Expert

i think its workflowStubs or something like that. Just have a browse. Im pretty sure its in the SQL DB.

0 Kudos
JensVM
Enthusiast
Enthusiast

Hello Venkatanagesh,

did you find the table / could you explain a little more how to manage the invocing of a vRO workflow when a vRAC reconfigure task has been startet? In my case, I want to automatically increase the partitions disk space in a client machine. Therefore I already wrote a script which does this. It is triggered out of a vRO Workflow. So when I start a reconfigure configuration changing partition / disk size in vRAC, the script should be automatically be executed.

Thanks and Best Regards

Jens

0 Kudos
pizzle85
Expert
Expert

Jens, do you want to increase the disk size every time anyone ever clicks the reconfigure button for any VM in vRA or do you just want to give them the option to expand the disk through the reconfigure interface?

0 Kudos
skoch
Enthusiast
Enthusiast

You mention that use custom reconfigure for creating CMDB entries. I have a similar use case. Are you doing this through the reconfigure wfstub, ASD or something else?

0 Kudos
Venkatanagesh
Contributor
Contributor

Hi,

There is no reconfigure wfstub. I was trying to get this using ASD, but no luck so far. Using ASD, I could map a VCO workflow to VM reconfigure, but this is not getting executed for some reason. Still trying to figure it out.

0 Kudos
pizzle85
Expert
Expert

Remember this is unsupported. You would probably be better off waiting until vRA 7 is released to see if they introduce a supported version of this.

In the IaaS SQL DB navigate to the table "DynamicOps.RepositoryModel.WorkflowDefinitions" find the row with the name "ReconfigureVMGeneric" set the field "IsProtected' to 0. Flipping that from 1 to 0 will make it visible to the vRA Designer application. Open up designer, edit the reconfigure workflowStub to add a step to call out to a vRO workflow (you can look at the other workflowstubs that were modified by vRO to provide extensibility). After that the generic native "Reconfigure" button will call out to that vRO workflow.

0 Kudos
vMarkusK1985
Expert
Expert

I think at the moment it’s the best option to do it via a ASD.

I you have some specific needs like "Add disk to a windows VM - Initialize - format", a ASD as Action is very handy.

With vRA 7 the new event broker will also help!

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos
tm19
Contributor
Contributor

This ^ is the way we do it, the standard reconfigure options are not made available, we replace them with ASD workflows so we can add extra steps/control. This seems to work well as long as your not using the built in vra approval processes.

Cheers

0 Kudos
vMarkusK1985
Expert
Expert

OK, If you need  it more advanced, vRA 7 should help. I have read its comming this quarter...

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos