Share via

running logic app error code start vm

Paul Webber 0 Reputation points
Aug 15, 2023, 1:25 PM

while running a logic app to start stop a vm

im getting a internal server error during the scheduled code

code is

User's image

{
    "inputs": {
        "body": {
            "Action": "start",
            "EnableClassic": true,
            "RequestScopes": {
                "ExcludedVMLists": [],
                "ResourceGroups": [
                    "/subscriptions/xxxxxxx-xxxx-xxx-xxxx-xxxxxxxxx/resourceGroups/xxx-xx-rg/"
                ]
            }
        },
        "function": {
            "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxx-xx-automationV2/providers/Microsoft.Web/sites/xxx-xx-autoV2xxxxxxxxxcsls/functions/Scheduled"
        }
    }
}
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,452 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,375 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Harry Cook 5 Reputation points
    Jan 9, 2024, 8:20 PM

    I know it's a little late but just incase it helps other users, I had exactly the same when using the copied in input from the V2 Deploy guide, when comparing it to the blank scheduled stop or start request body, I found that the copied in text had "EnableClassic": true set rather than false as per the original example. Changed this to false and it ran instantly.

    Hope this helps someone.

    1 person found this answer helpful.
    0 comments No comments

  2. Dillon Silzer 57,661 Reputation points
    Aug 17, 2023, 4:52 PM

    Have you tried the following deployment scripts with Start/Stop VMs v2 GitHub organization?

    Deploy feature

    https://learn.microsoft.com/en-us/azure/azure-functions/start-stop-vms/deploy#deploy-feature

    Or did you build your own flow from scratch?


    If this is helpful please accept answer.

    0 comments No comments

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.