Specifying HostSystem in cluster

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Specifying HostSystem in cluster

When I create VMs using vmomi I can specify the cluster but if there are multiple HostSystems then the HostSystem that the VM gets created on seems random. Can I control this through resource pools?

Looking at the diagram here: http://vmware.github.io/pyvmomi-community-samples/learn/overview.html
it seems that there is a disconnect between the HostSystems and the VM folder/Resource Pools.

My use case is that the vSphere is used for development, test and production VMs which are separated by HostSystem but on the same cluster (I'm not in control of this). I need to specify where my VM will be created depending on if I'm deploying to test or production.

Any suggestions?