I want to add a VM Y under the VM override of a cluster X and update the vSphere HA Additional delay value using power CLI commandsI am new to such a configuration. Your answers will help a lot.Thanks in advance
With the Set-VM cmdlet you can only set the restart priority afaik, not the delay.For that, you will need to use the ReconfigureComputeResource method.Something like this.Note that there shouldn't be a rule for that VM yet, otherwise, the call will fail.
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/97e6db01-d441-472e-ad53-b48c2bb0e1e4/45347fb1-052d-44b7-b3e9-cbefc34488e3/SDK/vsphere-ws/docs/ReferenceGuide/vim.ComputeResource.html#reconfigureEx
Thanks, I will test it and get back to you.
George
I have modified the script to reflect add and edit and it is working, thank you for your code it helped a lot.I am posting below my code for any help it may brings:
I am getting the below error:Exception calling "ReconfigureComputeResource" with "2" argument(s): "The setting of vmConfig is invalid for cluster XXXCan you help with this, please?
Is that with your snippet or mine?