Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

How to select datastore from cluster/resourcepool?

$
0
0

Hello,

 

as you know from my other threads, i am working on a workflow to create multiple identical VMs on a VC-cluster.

Right now a VM is created like this:

 

task = vmFolder.createVM_Task( configSpec, vmCluster.resourcePool);

configSpec is being filled with the configuration of the VM. vmCluster is an input parameter of the workflow and contains the cluster.

This works nice, but i still have to specify the datastore to store the files on via another input parameter, because the cluster has multiple shared storage units.

Also note that our clusters only have one resource pool, the default one.

 

Letting the user select a datastore is not a very nice solution because of possible errors and mistakes (user can select the local disk of the VMHost, not enough space on the selected storage etc.). But i, as a developer, also can't predefine the storage to use (multiple storage units, different unit names etc.).

 

Now what i've been thinking about (and trying to implement) was to get the datastores of the vmCluster or the resourcePool, verify if they are set up for vm-files and if they have enough space for the VM.

I know how to verify the size and which storages are to use for VMs, but i don't know how to get them out of the cluster/resourcepool.

Can anyone help me with that?

 

Thanks and

Regards

Andreas

 

PS: Is it just me or am i really doing such complicated things with orchestrator over here?


Viewing all articles
Browse latest Browse all 6251

Trending Articles