question

MichaWets avatar image
0 Votes"
MichaWets asked SwathiDhanwada-MSFT commented

ARM Template doesn't work as described in the Docs

I opened a Github Issue, but they redirected me to here, the Q&A: https://github.com/MicrosoftDocs/azure-docs/issues/82801

It is regarding this Doc page: https://docs.microsoft.com/en-us/azure/automation/extension-based-hybrid-runbook-worker-install

I tried to run the ARM Template, but it fails each time: I'm using the full template in a new Resource Group, so it should work, but it fails

It fails when trying to create the HybridRunbookWorkerGroup:
Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups/hybridRunbookWorkers
NotFound

{
"status": "Failed",
"error": {
"code": "NotFound",
"message": "Hybrid Worker Group not found"
}
}

And it fails on the VM extension:
Microsoft.Compute/virtualMachines/extensions
Conflict

{
"status": "Failed",
"error": {
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'HybridWorkerExtension'. Error message: "[Internal Error] The Hybrid Worker Extension failed to execute: {"Message":"Specified machineId is not associated with automation account. AccountId b57ecb13-b905-4235-866c-b17193b4e0ca, machineId /subscriptions/178da5f5-d770-4e8c-8c08-f7af16d8e4a0/resourcegroups/test-micha/providers/Microsoft.Compute/virtualMachines/simple-vm."}.\r\nMore information about the failure can be found in the logs located under 'C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Automation.HybridWorker.HybridWorkerForWindows\0.1.0.8' on the VM. For more troubleshooting, please follow the steps mentioned here: 'https://aka.ms/troubleshoot-hybrid-runbook-worker-v2'"rnrnMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "
}
}

azure-automationazure-dtl-arm-enviormentsazure-dtl-automation
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

stan avatar image
0 Votes"
stan answered SwathiDhanwada-MSFT commented

Hi,
As far as I can see there is no resource for hybridRunbookWorkerGroups resource. That resource should be deployed before hybridRunbookWorkerGroups/hybridRunbookWorkers. Also hybridRunbookWorkerGroups/hybridRunbookWorkers should be dependent on the hybridRunbookWorkerGroups resource. Also resource HybridWorkerExtension should be dependent on hybridRunbookWorkerGroups/hybridRunbookWorkers resource as well.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @stan ,

I had the same idea, but thing is, this is the official template from Microsoft.
So I tried to make them aware of this, but it doesn't seem to work through GitHub

Let's try it differently through some MVP channels then ;-)

0 Votes 0 ·

@MichaWets I have tested the template. It’s working as expected. Its clearly mentioned in the document that, ARM template works only if there is an existing automation account and Hybrid Worker Group created.
145863-image.png


The same information has been conveyed by @stan .

May I know if you are suggesting to modify the template in such a way that it automatically creates the HRW within the template?

0 Votes 0 ·
image.png (25.7 KiB)