Automation task in Azure doesn't start nor stop a machine

Jan Vávra 386 Reputation points
2021-01-11T07:00:51.993+00:00

At Azure portal at a one specific Azure VM with Windows I've configured two Automated task. One for starting at 8 am and another at 6 pm to stop.
These tasks are not working. I receive only email with error report.

Your automation task failed to start virtual machine adclient
Your automation task failed to stop virtual machine adclient (obviously because the VM is not running)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
{count} vote

7 answers

Sort by: Most helpful
  1. גלעד דואני 10 Reputation points
    2023-08-14T09:06:24.8466667+00:00

    hello,
    I know its been a long time since the last comment on this but this is the only place i found things regarding this issue. hope you find this helpful
    we had the same problem and managed to solve it (we also used the task option and not the runbook)
    we solved it by:

    1. opening azure and going to logic apps
    2. going to the specific logic app for your vm (when you create a task in the vm menu it opens a logic app)
    3. in the specific logic app check if the api is connected (in the api connections) or if it says error, on our case it said error
    4. go to the specific api connection that has the error and go to the edit option, there you can validate the api connection again and it starts working again
    2 people found this answer helpful.

  2. SUNOJ KUMAR YELURU 15,256 Reputation points MVP Volunteer Moderator
    2021-01-11T08:39:44.02+00:00

    @Jan Vávra

    I am using Automation Runbook: start-stop-vms

    Configure Start/Stop VMs during off-hours

    Go to automation>Runbook>Jobs ( if still existing jobs is running click stop)

    55079-capture.jpg

    ----------

    Please don’t forget to "Accept the answer" and up-vote wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  3. Sumarigo-MSFT 47,466 Reputation points Microsoft Employee Moderator
    2021-01-11T09:07:12.277+00:00

    @Jan Vávra For a better understanding of the issue: When did the problem start? Was it working fine before?
    May I know which version of OS(version) are you using? Can you share the screenshot of the error message?
    I would suggest ensuring you have all Windows updates applied to the VMs you are seeing the issue with.

    This article provides information on troubleshooting and resolving issues that arise when you deploy the Azure Automation Start/Stop VMs during off-hours feature on your VMs: https://learn.microsoft.com/en-us/azure/automation/troubleshoot/start-stop-vm

    Please refer to this Stack Overflow threads which gives some ideas on your query
    https://stackoverflow.com/questions/30574146/whats-the-right-way-to-run-startup-task-for-azure-virtual-machine
    https://stackoverflow.com/questions/62551801/task-scheduler-windows-server-2019-task-not-running-onstart

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    -----------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  4. Jan Vávra 76 Reputation points
    2021-01-11T09:52:54.91+00:00

    @SUNOJ KUMAR YELURU

    I haven't made any automation account. I started from vm properties | Automation | Tasks (preview) | clicked Add

    55381-obrazek.png

    Is that way bad and I should go your way?


  5. Jan Vávra 76 Reputation points
    2021-01-11T09:55:08.797+00:00

    @Sumarigo-MSFT
    It is a Windows 10.

    Should I make an Windows account in the VM?


Your answer

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