VMware Cloud Community
AndyShine
Enthusiast
Enthusiast

How to feed a list of vm's to the shutdown action?

I'd like to have a workflow, that I can schedule, that shutsdown a set of vm's that I give it as list. The list would change depending on what's driving the need to shutdown the vm's.

Any suggestions?

Thanks

Andrew

0 Kudos
4 Replies
admin
Immortal
Immortal

Take a look at the vCenter batch workflow. It's pretty flexible. I'm not sure if it can be scheduled though. You might be able to use inputs and run it from another scheduled workflow.

Bill

0 Kudos
admin
Immortal
Immortal

The batch workflow can be scheduled.

Sia

0 Kudos
admin
Immortal
Immortal

Hi Andrew,

What you can do is to write a workflow that takes an array of VM as input. In the new workflow, you would wrap the existing shutdown VM workflow in a loop that takes one VM at a time and feed it to the showdown VM workflow. The example in this post: http://communities.vmware.com/docs/DOC-10461 can be a reference to your workflow.

I don't know how you plan on determining the list of VMs. There are quite a few actions our of the box that can help you: we have get all VMs from host, cluster, datastore, etc.

Thanks,

Sia

0 Kudos
stuartclements
Community Manager
Community Manager

BTW, I wrote a WF that uses the "Start workflows in a series" WF, to use as the basis for the docs for a new section on running the same WF multiple times. Will also doc how to create a loop with an iterator.

Series WF attached.

--

Stuart Clements

Staff Technical Writer

VMware Switzerland

Tel: +41 21 321 2443

Skype: stuclem

0 Kudos