VMware Cloud Community
javier_dp
Contributor
Contributor

Auto select destination host in a workflow when hosts are inside a DRS cluster

Hi

I have several workflows that deploy virtual machines inside different non automated DRS clusters.

Right now, i get a list of the available hosts for the VM to clone using:

GetAction("com.vmware.library.vc.datastore","getAllAvailableHostForVM").call( #vm )

However, I would like to use DRS to select the host to deploy the VM to. Is it possible to use DRS to select the best available host for deployment, or is it only available for power on actions?

Thanks!

Tags (2)
0 Kudos
2 Replies
tschoergez
Leadership
Leadership

Hi,

if you can ensure that DRS is enabled for the cluster, just specify the complete cluster as target of your deployment workflow. The clone VM methods, exactly: the relocation specification for these, of the vCenter API support both, deploying to a single host (for non DRS enabled cluster) and to the complete cluster (for DRS enabled cluster).

Just be aware: Cloning to a cluster will throw an error if DRS is not enabled for this cluster.

Note: If you use Storage DRS as well, you might have to use a complete different method. See this thread for an example: CloneVm to SDRS Cluster / Storage Pod

Cheers,

Joerg

0 Kudos
stacycarter
Enthusiast
Enthusiast

Joerg,

I came across this old thread and would like to get clarification....If I'm using a clone workflow In vCO to deploy a VM to a fully automated DRS cluster, can I set the value VC:HostSystem for the relocation spec action that is called to a cluster name?

0 Kudos