Automation

 View Only
  • 1.  Cluster VM Override change additional delay value

    Posted Aug 09, 2023 12:55 PM

    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 commands

    I am new to such a configuration. Your answers will help a lot.

    Thanks in advance



  • 2.  RE: Cluster VM Override change additional delay value
    Best Answer

    Posted Aug 09, 2023 04:44 PM

    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  



  • 3.  RE: Cluster VM Override change additional delay value

    Posted Aug 10, 2023 11:24 AM

    Thanks,  

    I will test it and get back to you.

    George



  • 4.  RE: Cluster VM Override change additional delay value

    Posted Aug 10, 2023 12:46 PM

    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:



  • 5.  RE: Cluster VM Override change additional delay value

    Posted Aug 10, 2023 02:04 PM

    I am getting the below error:

    Exception calling "ReconfigureComputeResource" with "2" argument(s): "The setting of vmConfig is invalid for cluster XXX

    Can you help with this, please?




  • 6.  RE: Cluster VM Override change additional delay value

    Posted Aug 10, 2023 02:32 PM

    Is that with your snippet or mine?