Hello to All,
I have workflow to create VM from template,
I want to create list with 5 datasores with most free space to choose,
any idea how to do that?
Depends on how you sort .. if your sort option presents the one with the most free space as the one in the first element of the array, you simply have a scriptable task that that takes that actions output array as an input, then within the scriptable task get the first element (var ds = myArray[0]) and then pass "ds" on to the rest of your workflow.
Have a look at the package I attached here: Sort Datastores Action and Sample workflow
Hi Burke,
this is excelent packege but i get array of datastores(sort) in the end of workflow,
in my workflow i want to get only one datastore (the best datastore) in output parameter that i can use it for clone vm's.
you know how i can take the best datastore from the array?
Depends on how you sort .. if your sort option presents the one with the most free space as the one in the first element of the array, you simply have a scriptable task that that takes that actions output array as an input, then within the scriptable task get the first element (var ds = myArray[0]) and then pass "ds" on to the rest of your workflow.