Hello!
I've been using the vSphere SDK for Perl to do automation.
I have used until now, something like this to clone from templates:
my @args = ("/root/vmware-vsphere-cli-distrib/apps/vm/vmclone.pl --vmhost esx12.infra.local --vmname $templateName --vmname_destination $finalVMName --datastore $dataStore --username $User --password $Pass --url $serverIP");
Which is working.
However now they want to do some changes in infrastructure, and asking me whether I can make it dynamic.
I have not found any examples or documentation stating how to do that, but logic dictates it must be possible somehow - the whole point of vCenter is that it chooses automatically on which host to provision the new VM.
However as I said, no sample shows this is possible (and how).
Any ideas please?