Why will my Log Analytics Workspace not connect to my VM? I am getting an failed to enable agent on VM error.
Azure Virtual Machines
-
KarishmaTiwari-MSFT • 20,677 Reputation points • Microsoft Employee
2023-07-21T02:35:00.3966667+00:00 @Bryceson From the screenshot, I see that there is (deprecated) displayed next to the VM name. I am wondering if that's the reason you are unable to do so. Are you able to perform other actions on this VM?
Can you click on the error in the notifications and share more details on the error (JSON etc.)?Additional reading: https://learn.microsoft.com/en-us/azure/azure-monitor/agents/agent-windows-troubleshoot?tabs=UpdateMMA
-
Bryceson • 5 Reputation points
2023-07-21T06:06:43.25+00:00 @KarishmaTiwari-MSFT Hello, there are no other details on the error in the notifications. How can the deprecated VM be restored?
-
KarishmaTiwari-MSFT • 20,677 Reputation points • Microsoft Employee
2023-07-22T01:43:36.21+00:00 @Bryceson Can you please share the VM details like type, size, is it marketplace VM, etc. for the VM which is showing as deprecated for you?
-
Bryceson • 5 Reputation points
2023-07-22T23:56:18.84+00:00 These are the details of my VM.
{ "name": "honeypot-vm", "id": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/Honeypot/providers/Microsoft.Compute/virtualMachines/honeypot-vm", "type": "Microsoft.Compute/virtualMachines", "location": "westus3", "identity": { "type": "SystemAssigned", "principalId": "700a2c20-6bea-4313-9367-fc3e3b91e84a", "tenantId": "5b124f53-1143-4ccc-b834-c2f99250e56b" }, "properties": { "vmId": "0fc10868-cd32-468f-a123-1b18e869a8dd", "hardwareProfile": { "vmSize": "Standard_D2s_v3" }, "storageProfile": { "imageReference": { "publisher": "canonical", "offer": "0001-com-ubuntu-server-jammy", "sku": "22_04-lts-gen2", "version": "latest", "exactVersion": "22.04.202307010" }, "osDisk": { "osType": "Linux", "name": "honeypot-vm_OsDisk_1_75e25d12e2fa45d0a4434658f27a6872", "createOption": "FromImage", "caching": "ReadWrite", "managedDisk": { "storageAccountType": "Premium_LRS", "id": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/Honeypot/providers/Microsoft.Compute/disks/honeypot-vm_OsDisk_1_75e25d12e2fa45d0a4434658f27a6872" }, "deleteOption": "Delete", "diskSizeGB": 30 }, "dataDisks": [] }, "osProfile": { "computerName": "honeypot-vm", "adminUsername": "brycesonadmin", "linuxConfiguration": { "disablePasswordAuthentication": false, "provisionVMAgent": true, "patchSettings": { "patchMode": "ImageDefault", "assessmentMode": "ImageDefault" } }, "secrets": [], "allowExtensionOperations": true, "requireGuestProvisionSignal": true }, "securityProfile": { "uefiSettings": { "secureBootEnabled": true, "vTpmEnabled": true }, "securityType": "TrustedLaunch" }, "networkProfile": { "networkInterfaces": [ { "id": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/Honeypot/providers/Microsoft.Network/networkInterfaces/honeypot-vm222", "properties": { "deleteOption": "Detach" } } ] }, "diagnosticsProfile": { "bootDiagnostics": { "enabled": true } }, "provisioningState": "Succeeded" }, "resources": [ { "name": "AzureMonitorLinuxAgent", "id": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/Honeypot/providers/Microsoft.Compute/virtualMachines/honeypot-vm/extensions/AzureMonitorLinuxAgent", "type": "Microsoft.Compute/virtualMachines/extensions", "location": "westus3", "properties": { "autoUpgradeMinorVersion": true, "provisioningState": "Succeeded", "enableAutomaticUpgrade": true, "publisher": "Microsoft.Azure.Monitor", "type": "AzureMonitorLinuxAgent", "typeHandlerVersion": "1.6" } }, { "name": "MDE.Linux", "id": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/Honeypot/providers/Microsoft.Compute/virtualMachines/honeypot-vm/extensions/MDE.Linux", "type": "Microsoft.Compute/virtualMachines/extensions", "location": "westus3", "properties": { "autoUpgradeMinorVersion": true, "forceUpdateTag": "bd793fd4-3c02-4152-8664-90c45da12e07", "provisioningState": "Succeeded", "publisher": "Microsoft.Azure.AzureDefenderForServers", "type": "MDE.Linux", "typeHandlerVersion": "1.0", "settings": { "azureResourceId": "/subscriptions/feeb2f66-8463-4fd4-a412-4db7eca33eec/resourceGroups/HONEYPOT/providers/Microsoft.Compute/virtualMachines/honeypot-vm", "forceReOnboarding": false, "vNextEnabled": false, "autoUpdate": true } } } ] }
-
kobulloc-MSFT • 26,631 Reputation points • Microsoft Employee
2023-08-02T05:25:46.8766667+00:00 Hello, @Bryceson ! If you are still running into issues with the Log Analytics workspace, let's check the Log Analytics VM extension:
https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/vmext-troubleshoot
The easiest way to do this is to confirm that you can see the VM agent log file at
C:\WindowsAzure\logs\WaAppAgent.log
. If you can't, the VM agent isn't installed and you'll need to install it: -
Bryceson • 5 Reputation points
2023-08-07T14:51:50.7666667+00:00 Hello @Anonymous , Thank you for the information! I will implement these techniques and let you know if they worked.
Sign in to comment