Share via

how do I enable tasks to turn off a vm and re-start a vm?

pierre shiraziefard 45 Reputation points
2026-06-02T15:39:12.3+00:00

I do not see it in Tasks for a vm, need to turn it off on non-used hours and start the vm again on business hours.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


4 answers

Sort by: Most helpful
  1. pierre shiraziefard 45 Reputation points
    2026-06-04T14:13:07.66+00:00

    1.Check your permissions first: For the Tasks blade to be interactive, your account needs at least Contributor access on the VM or its resource group. If you're currently assigned a Reader or a narrower custom role, that would explain the greyed-out state.

    Fix: Go to your VM → Access Control (IAM) → Add role assignment → assign Virtual Machine Contributor (or Contributor) to your account, then retry the Tasks option.

    added VM contributor, no change still no access.

    Was this answer helpful?

    0 comments No comments

  2. pierre shiraziefard 45 Reputation points
    2026-06-04T13:40:16.85+00:00

    I have installed below:

    If Tasks remain unavailable, go with the Start/Stop VMs v2 route it's the most robust option Microsoft currently offers for scheduled VM management.

    Yet in automation tasks for a vm still shaded and not accesible. I am looking to test this out for one VM only not globally for all my vm's.

    Was this answer helpful?

    0 comments No comments

  3. pierre shiraziefard 45 Reputation points
    2026-06-02T15:41:56.3+00:00

    tasks are greyed out (pic attached) on a single vm,Screenshot 2026-06-02 114106

    Was this answer helpful?

    0 comments No comments

  4. AI answer

    2026-06-02T15:39:24.8966667+00:00

    There are three supported ways in Azure to automatically stop and start a virtual machine on a schedule.

    1. Use the built-in Auto-shutdown on the VM (stop only)
      • In the Azure portal, open the target virtual machine.
      • Under Operations, select Auto-shutdown.
      • Turn the setting On.
      • Set the daily shutdown time and time zone.
      • Optionally configure notification (email or webhook) before shutdown.
      • Save the configuration.
      • This will automatically stop (deallocate) the VM at the configured time each day. It does not start the VM again; combine with another option below if automatic start is required.
    2. Use Start/Stop VMs v2 (start and stop, including sequences and CPU-based stop)
      • Deploy the Start/Stop VMs v2 solution to the subscription.
      • This deployment creates several Logic Apps, including:
        • ststv2_vms_Scheduled_start and ststv2_vms_Scheduled_stop for schedule-based start/stop.
        • ststv2_vms_Sequenced_start and ststv2_vms_Sequenced_stop for sequence-based start/stop using VM tags.
        • ststv2_vms_AutoStop for CPU-based auto-stop.
      • To configure a simple business-hours schedule:
        1. In the Azure portal, go to Logic apps.
        2. Open ststv2_vms_Scheduled_start to configure the morning start schedule.
          • Open Logic app designer.
          • Select the Recurrence trigger and set the schedule (for example, every weekday at 08:00 in the desired time zone).
          • Select the Function-Try action and edit the JSON request body to define the scope (subscription, resource groups, or specific VMs) and set "Action": "start".
        3. Open ststv2_vms_Scheduled_stop to configure the evening stop schedule.
          • Similarly configure Recurrence for the stop time (for example, weekdays at 18:00).
          • In Function-Try, set "Action": "stop" and define the same VM scope.
      • This approach can target multiple subscriptions, resource groups, or specific VMs and supports both Azure Resource Manager and classic VMs.
    3. Use Automation Tasks on the VM resource (simple per-VM schedules)
      • For a single VM, an automation task can be created directly on that VM resource:
        • From the VM in the Azure portal, use the automation task templates such as Power off Virtual Machine, Start Virtual Machine, or Deallocate Virtual Machine.
        • Configure the task’s Interval and Frequency (Day/Week/Month) to define how often it runs.
      • This creates a Logic App-based workflow that continues to run until disabled or deleted.

    If the Tasks blade on the VM does not show the start/stop templates, use either the VM’s Auto-shutdown setting for stop-only, or deploy Start/Stop VMs v2 for full start/stop scheduling across one or more VMs.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.