VMware Cloud Community
NVA
Contributor
Contributor

A workflow for a complete shutdown of DataCenter

Hi,

We have 21 ESXs (VSphere 4 enterprise PLUS) and one VCenter 4.

We need to create a workflow for a complete shutdown of our DataCenter (shutdown VMs and ESX).

We can shutdown just one VM or all VM of an object (cluster, ressource pool, etc), but we want to shutdown VMs in a specific order and wait five minutes after the shutdown of a specific VM... Have you idea about this ? How can we create this kind of workflow (We have about 180 VMs) !

Thank you for your help and advise...

Regards,

0 Kudos
4 Replies
admin
Immortal
Immortal

What you can do is write a workflow using:

- a loop (example in the document section from a workflow that creates multiple VMs)

- the "shutdownVM" workflow

- the "getAllVMsOfCluster" action

- the waiting timer

- a script similar to the below to set the time to the waiting timer (replace 5 * 60 *1000 to get the time you want to wait)

userInteractionExpTime = new Date();

System.log( "Current date : '" + userInteractionExpTime + "'" );

userInteractionExpTime.setTime( userInteractionExpTime.getTime() + (5 * 60 * 1000) );

System.log( "Waiting timer will expire at '" + userInteractionExpTime + "'" );

Good luck,

Sia

NVA
Contributor
Contributor

Hi,

Thank you for your reply !

Ok I go to try this...

Regards,

0 Kudos
AndyShine
Enthusiast
Enthusiast

NVA,

Did you get any where with this? I've got to do the exact same thing (though on a smaller scale). Orchestrator looks like the toold for the job but I'm a complete newbie with the product.

Regards

0 Kudos
admin
Immortal
Immortal

Hi Andy,

Since you are new to vCO, it would be helpful for you to refer how to write workflows and use the existing workflows. Please refer to section developing workflows and calling workflows within a workflow from http://www.vmware.com/pdf/vco_40_developers_guide.pdf. As mentioned by Sia, there is an existing worklfow shutdown guest OS and wait, which you can call from your workflow and then set the timer accordingly for the time to wait.

0 Kudos