Schedule VM Shutdown and Startup

Hello,
Could someone has any example about How can I schedule a VM shutdown and Startup !?
What is the best way of to do it!?

Regards
Carlos

1 Like

Hi,

we are atm creating the generic object in which we save the information about the schedule via service dialog. So in service dialog you can choose which vm’s, when and with what action will be added to the schedule. This information is then saved in generic object. GO then creates a tag value. So let’s say you have tag category “Schedule” and there you put your first tag “scheduler_working_hours” with value “start-time_action-type”(f.e. 1800_stop) and end-time_action-type(0800_start) (let’s say you want to turn it off at 18:00 and start the OS again in the next morning)
This 2 tags are then added to all hosts selected in service dialog.

The thing where we are not so happy is how to trigger it. Atm we have developed a simple method which is started every 10 minutes. This method is checking are there any tags which have an action time planned in the following 10 minutes and if so we get the list of vms and we trigger the action against the list.
There would be a relief if we could do it just by setting some policies/events/actions but we are still not there yet.

Generic object here helps when you want to manipulate the schedules. You can then with some service dialog load the instance of GO and then edit the information like exclude or include some vms or you can adjust the values of time and action.

Hope it helps, and it would be nice to see if @buc or @pemcg can come up with some better solutions…

Best regards,
Matko

You can run an automation method using the built-in scheduler (Configuration -> Settings -> Schedules). One of the schedule action types is “Automation Task”, and although the most granular you can set this to is hourly, you could conceivably run a simple state machine that ran one of its states 6 times with a 10 minute retry interval.

pemcg