VMware Cloud Community
Robert_BE
Contributor
Contributor
Jump to solution

choose datastore freespace

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?

1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

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.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
3 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

Have a look at the package I attached here: Sort Datastores Action and Sample workflow

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
Robert_BE
Contributor
Contributor
Jump to solution

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?

0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

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.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos