VMware Cloud Community
SteveEsx
Contributor
Contributor

vRA Multi machine deployment, how to get day 2 action to apply to all VMs instead of doing it on each VM

Our users typically deploy multi machine blueprints that might for example contain 6 virtual machines. Now in the vRA GUI it is very time consuming to do a VM action like Power On or Off on such multi machine deployments because you have to do the action on each individual VM, there is no "Power On All VMs" on the parent object (parent object only has the actions "change lease/owner/security, destroy, expire, scale in/out and view details").

Is there a way to get action choices on parent object that applies to all VMs in that multi machine deployment?

Things our users typically want to do at the same time on all VMs in a multi machine deployment is:

Create Snapshot

Power On

Power Off

If there is no built in functionality for that is it possible to vRO code it as a custom action on the parent object?

Maybe someone else already found an efficient solution to this?

Thanks for any tips.

0 Kudos
1 Reply
eoinbyrne
Expert
Expert

It would certainly be possible to create a vRO custom action on the Deployment which would apply the required action to each child VM. The action in the vRA UI just sets the context for the action. In your case the context is the Deployment to start with but there are helper actions and APIs to walk the data model to get the child VMs as a list/array. Once you have that all you would be doing is applying the per-VM action to each VM

Effectively what you'd need to do in the vRO action would be

1. Get the Deployment resource ID

2. Use the CAFE api or plugin to locate all the child VM resources

3. Apply the required action to each child resource (if it's a vRA OOTB action at least)

0 Kudos