I am encountering the following error when trying to use a PowerShell runbook to turn on IaaS diagnostics for an ARM virtual machine:
Set-AzureRmVMDiagnosticsExtension : Long running operation failed with status 'Failed'. StartTime: 3/7/2016 6:23:28 PM EndTime: 3/7/2016 6:24:36 PM OperationID: 15126cd6-f553-4853-a583-cad38d16d659 Status: Failed ErrorCode: VMExtensionHandlerNonTransientError ErrorMessage: Handler 'Microsoft.Azure.Diagnostics.IaaSDiagnostics' has reported failure for VM Extension 'Microsoft.Insights.VMDiagnosticsSettings' with terminal error code '1009' and error message: 'Enable failed for plugin (name: Microsoft.Azure.Diagnostics.IaaSDiagnostics, version 1.5.9.0) with exception Command C:\Packages\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.5.9.0\DiagnosticsPluginLauncher.exe of Microsoft.Azure.Diagnostics.IaaSDiagnostics has exited with Exit code: -106'
Some context:
What is happening is that we will get this error, but in the portal, the VM's diagnostics are turned on but no metrics will be collected. In the extensions pane, the IaaS Diagnostics extension is "Unavailable", with an error that the handler status is "Not Ready".The VM is domain-joined and has the BGInfo extension installed. We are pulling an XML file into Azure Automation as an asset and creating an XML object from that asset to be used as the diagnostics config XML. So far, we haven't run into any errors with the configuration path or the XML contents.