Azure Monitor VM Insights install failed in training exercise

Walter Halvorsen 0 Reputation points
2024-08-07T23:19:13.1033333+00:00

The deployment of VM Insights failed in the training exercise to enable it. The error message is below and seems to indicate the Python code is looking for another O/S than Ubuntu which was the O/S of the VM created in the first exercise. Also, the "Enable Insights using" in the Monitor configuration window did not show up as in the example (just the Subscription and Data collection rule.

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"VMExtensionHandlerNonTransientError","message":"The handler for VM extension type 'Microsoft.Azure.Monitor.AzureMonitorLinuxAgent' has reported terminal failure for VM extension 'AzureMonitorLinuxAgent' with error message: '[ExtensionOperationError] Non-zero exit code: 51, /var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./shim.sh -install\n[stdout]\nPython 3.12.3\nImporting utils failed with error: No module named 'imp'\nUnable to initialize waagent log because of exception name 'waagent' is not defined\nInfo: Azure Monitoring Agent for Linux started to handle.\nError: Unsupported operating system: ubuntu 24.04\nError: Unsupported operating system: ubuntu 24.04\n\n\n[stderr]\n/var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./agent.py:38: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13\n import crypt\n'.\r\n \r\n'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'"}]}

This question is related to the following Learning Module

Azure | Azure Training
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 29,405 Reputation points Volunteer Moderator
    2024-08-08T01:08:55.0433333+00:00

    Ubuntu 24.04 is not supported. Use a supported Ubuntu version (like 20.04 or 22.04) that is listed in the Azure Monitor Agent documentation. You might need to create a new VM with a supported OS version for the training exercise.

    See: https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-supported-operating-systems#linux-operating-systems

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    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.