7 Replies Latest reply on Jun 21, 2017 2:35 PM by vMan

    vRops Maintenance mode, scripted? example I found, does not work for me

    coley74 Lurker

      Maintenance tasks (aggressive patching of windows guest os) are throwing out stats in vrops, causing additional risks requesting for adding cpu etc


      These guest servers are consistent and understood, but for these spikes.


      Now, I've discovered that vrops can handle this by placing objects into maintenance mode, which can be done singularly or on a schedule, neither which really work for us.


      Patching is automated and driven from another system.


      Options, Powercli or API ?


      I found a script at vmware codew by Alan Renouf VRealize Operations Maintenance Mode - Samples - VMware {code} which looks promising, however, it fails to run for me.


      When I run the script, it fails on an element, get-omresource




      Get-OMResource : Requested value 'NOTEXISTING' was not found.

      At C:\Enable-OMMaintenance.ps1:40 char:56

      +                   $Item = Get-Inventory -Name $Entry | Get-OMResource

      +                                                        ~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [Get-OMResource], ArgumentExce


          + FullyQualifiedErrorId : System.ArgumentException,VMware.VimAutomation.vR



      To rule out the script somewhat, if I run the Get-OMResource independently, it starts bringing information back from vrops and then it fails with (example)



      objectname     Orange   VirtualMachine

      objectname     Green     VMFolder


      Get-OMResource : 15/06/2017 10:34:54    Get-OMResource        Requested value

      'NOTEXISTING' was not found.

      At line:1 char:1

      + Get-OMResource

      + ~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [Get-OMResource], VimException

          + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio



      Which makes me think this is an API issue maybe?  some part of the vmware.vimautomation.vrops or because I'm on vrops 6.5?


      If anybody has any ideas or alternate suggestions to do what I need, that would be great.


      I tried support, who said buy professional services or use the communities, hence, I'm here.