VMware {code} Community
rjreilly
Contributor
Contributor

clone vm to best host


why is there not an option for the vcenter to make the decision on where to clone a vm to ? I have hundreds of blades, is there a work around for this ? I dont care what esx server it's on as long as it is in the right cluster.  ( i swear i saw this as an option but cannot find it now... )
Cheers !


Robert

0 Kudos
1 Reply
stumpr
Virtuoso
Virtuoso

You use a resource pool as a target...it's described (but poorly) in the API docs -

A type of RelocateSpec that specifies the location of resources the newly cloned virtual machine will use. The location specifies:

  • A datastore where the virtual machine will be located on physical storage. This is always provided because it indicates where the newly created clone will be copied.
  • a resource pool and optionally a host. The resource pool determines what compute resources will be available to the clone and the host indicates which machine will host the clone.

Basically, you set your relocate spec to the cluster of your choice.  Now if you want to pick a specific cluster, you'll need to do a little perf or summary data querying to determine which cluster you prefer.  Similarly, you can do a more complicated StoragePod deployment so you can also leverage that feature if you are using it for storage DRS.

Also, bear in mind there is a default resource pool on every cluster (root resource pool), so you don't need defined resource pools to deploy to the cluster.  All this assumes you are using DRS and have it configured.  If it is not configured with the appropriate automation level, you may have to get a recommendation for a host and then clone the vm there.

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos