2 Replies Latest reply on Jan 12, 2017 4:44 AM by JimKnopf99

    Maintenance Schedules

    JimKnopf99 Master

      Hi,

       

      i have multiple different servers with applications running on that have a backup windows starts at night. But not all at the same time.

      For example. SQL Server Service down. I get that message from the in guest epops agent.

       

      Therefor i have to create a maintenace window for those machines.

      But as far as i understand, it is only possible to create a schedule for a specific time and policy.

      Also it is not possible to create a schedule with more than one time. Maybe one Maintenance from 9 to 10 and the other from 22 to 23.

       

      In previous versions, it was possible to create a maintenance schedule per VM. But that has changed.

       

      I don´t wan´t to create hundres of policiy only for the reason to create maintenance schedules for my vm´s.

      Is there any other way to implement that?

       

      Thanks

      Frank

        • 1. Re: Maintenance Schedules
          MichaelRyom Hot Shot
          vExpert

          AFAIK there is a 1:1 between maintenance schedule and a policy There is the possibility to put a given VM/object into maintenance mode. This can be done manually, which is not what your are seeking.

           

          I think the API is what you want. Follow this URL https://vRops/suite-api/docs/rest/index.html , change vRops to your vRops FQDN, to get to the documentation of the API.

          If you want an introduction to the vRops API used with Powershell look there -> vRops API consumed with Powershell - Michael Ryom

           

          Below I have copy/pasted from the vRops API documentation the two API calls that could be of interest to you. My basic idea is that you create a pre backup script (which most backup products support), where the script puts the object into maintenance in vRops after the backup job is done it then needs to run a post backup script which deletes(exits) the object in maintenance. I could be more precise than what you do to day.

           

          If you find this to cumbersome to get started with. You could also just create a script which at a given point in time puts a lot of VMs into maintenance and after a given time exits maintenance on all of the objects. Well there are probably a few other way to do this Look at the copy/paste from the API documentation and see if it does not fit the bill

           

          Hope you find it useful - Best regards

          Michael Ryom

           

          PUT /api/resources/{id}/maintained

          Put the specific Resource in Maintenance.
          The Resource can end up in two maintenance states - MAINTAINED OR MAINTAINED_MANUAL - depending upon the inputs specified.

          • If duration/end time is specified, the resource will be placed in MAINTAINED state and after the duration/end time expires, the resource state is automatically set to the state it was in before entering the maintenance window.
          • If duration/end time is not specified, the resource will be placed in MAINTAINED_MANUAL state. Callers have to execute DELETE /suite-api/api/resources/{id}/maintained API to set the Resource back to whatever state it was in.
          • If both duration and end time are specified, end time takes preference over duration.

          Request description about parameters and structure of input data

              The following are request parameters supported by this method
          namedescriptionstyletyperequiredrepeatingdefault
          durationDuration for which this resource will be in maintenance (In Minutes)query xs:int  nono
          endquery xs:long  nono
          idtemplate xs:uuid  yesno

          Response  http response codes, description about schema of return types

          HTTP Response Codes
          200
          Response type
          No content returned by this method.

           

           

          PUT /api/resources/maintained

          Puts all the specified Resource in Maintenance.
          The Resources can end up in two maintenance states - MAINTAINED OR MAINTAINED_MANUAL - depending upon the inputs specified.

          • If duration/end time is specified, the Resources will be placed in MAINTAINED state and after the duration/end time expires, the state of the Resources would be automatically set to the state they were in before entering the maintenance window.
          • If duration/end time is not specified, the Resources will be placed in MAINTAINED_MANUAL state. Callers have to execute DELETE /suite-api/api/resources/maintained?id=ID1&id=ID2 API to set the Resources back to whatever state they were in.
          • If both duration and end time are specified, end time takes preference over duration.

           

          Request description about parameters and structure of input data

              The following are request parameters supported by this method
          namedescriptionstyletyperequiredrepeatingdefault
          idResource identifierquery xs:uuid  yesyes
          durationDuration for which this resource will be in maintenance (In Minutes)query xs:int  nono
          endquery xs:long  nono

          Response  http response codes, description about schema of return types

          HTTP Response Codes
          200
          Response type
          No content returned by this method.

           

          • 2. Re: Maintenance Schedules
            JimKnopf99 Master

            mmh,

            thats bad i guess. Yes, i could build a script for each server when it goes in maintanence. But i think, that should be part of the gui.

            It was part. Therefor i didn´t understand why they kick it away.

             

            It is not only a monitoring tool, But that is a huge part of vrealize operations. And maintanence schedules are also a big part of monitoring the right way.

            Because i didn´t want to get alarms during such a maintanence window.

            So please VMware, build a better way to do that in the gui!

            Thanks