Thank you for the hints.
Yes, I am calling against the vCenter API and not separate ESXi hosts.
The property looks interesting, especially seeing the script uses it: my$location=VirtualMachineRelocateSpec->new();
I am not sure however what to specify there for the host, it seems to take an object reference, and I am not certain I even need one, and what the different options for it mean:
The target host for the virtual machine. If not specified,
- if resource pool is not specified, current host is used.
- if resource pool is specified, and the target pool represents a stand-alone host, the host is used.
- if resource pool is specified, and the target pool represents a DRS-enabled cluster, a host selected by DRS is used.
- if resource pool is specified and the target pool represents a cluster without DRS enabled, an InvalidArgument exception be thrown.
Keep in mind please, I am not a VMware certified admin, I am the programmer trying to automate what the admin can do in GUI
I will ask tomorrow at work, if any of those things make sense to him as required for DataStoreCluster cloning.
But if it is not? how is the scripts supposed to work? if by default it takes an empty VirtualMachineRelocateSpec object?
Does it work for you?