While I was changing diagnostics storage settings in Azure, I started getting error messages for some of my VMs while de-allocating them or powering them up and down.
Failed to start virtual machine ‘vm-name’. Error: Handler ‘Microsoft.Azure.Security.Monitoring’ has reported failure for VM Extension ‘Monitoring’ with terminal error code ‘1007’ and error message: ‘Install failed for plugin (name: Microsoft.Azure.Security.Monitoring, version 3.1.0.0) with exception Command C:PackagesPluginsMicrosoft.Azure.Security.Monitoring3.1.0.0AsmExtension.exe of Microsoft.Azure.Security.Monitoring has exited with Exit code: 5’
I solved this error by doing the following:
- Select the VM in Azure > Diagnostics Settings > Uncheck Diagnostics infrastructure logs > Save
- Within the same VM Menu > Select Extensions > Monitoring > Uninstall
- De-allocate the VM
- Start up the VM (You should no longer have the error)
- Go back into the Diagnostics Settings of the VM > Re-check Diagnostics infrastructure logs > Save
- De-allocate/start to test again to make sure you no longer have the error