I have created a cent OS 8.1 VM . When i try to enable diag settings on the Vm and save . I get the below error message .
Microsoft.Azure.Diagnostics.LinuxDiagnostic
Version
3. 0.131
Status
Transitioning
Status level
Info
Status message
[ExtensionOperationError] Non-zero exit code: 127, /var/lib/waagent/Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131/diagnostic.py -install [stdout] [stderr] /usr/bin/env: ‘python’: No such file or directory
I have installed yum install -y python2 . And also made use of the below command
sudo update-alternatives --remove-all python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/diagnostics-linux
Now i see the extension provisioning failed . And in the extension.log i see the below
2021/04/13 23:42:40 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Sleep 60 retry 1
2021/04/13 23:43:40 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Run with timeout: rpm -qi policycoreutils-python; if [ ! $? == 0 ]; then yum install -y policycoreutils-python; fi
2021/04/13 23:43:42 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Return None
2021/04/13 23:43:42 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] package policycoreutils-python is not installed
2021/04/13 23:43:42 Last metadata expiration check: 0:31:22 ago on Tue 13 Apr 2021 11:12:19 PM UTC.
2021/04/13 23:43:42 No match for argument: policycoreutils-python
2021/04/13 23:43:42 Error: Unable to find a match: policycoreutils-python
2021/04/13 23:43:42
2021/04/13 23:43:42 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Sleep 60 retry 0
2021/04/13 23:44:43 ERROR:[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] package policycoreutils-python is not installed
2021/04/13 23:44:43 ERROR:Last metadata expiration check: 0:31:22 ago on Tue 13 Apr 2021 11:12:19 PM UTC.
2021/04/13 23:44:43 ERROR:No match for argument: policycoreutils-python
2021/04/13 23:44:43 ERROR:Error: Unable to find a match: policycoreutils-python
2021/04/13 23:44:43 ERROR:
2021/04/13 23:44:43 ERROR:[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Failed to set up mdsd dependencies: package policycoreutils-python is not installed
2021/04/13 23:44:43 ERROR:Last metadata expiration check: 0:31:22 ago on Tue 13 Apr 2021 11:12:19 PM UTC.
2021/04/13 23:44:43 ERROR:No match for argument: policycoreutils-python
2021/04/13 23:44:43 ERROR:Error: Unable to find a match: policycoreutils-python
2021/04/13 23:44:43 ERROR:
2021/04/13 23:44:43 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Enable,error,1,Failed to set up mdsd dependencies: package policycoreutils-python is not installed
2021/04/13 23:44:43 Last metadata expiration check: 0:31:22 ago on Tue 13 Apr 2021 11:12:19 PM UTC.
2021/04/13 23:44:43 No match for argument: policycoreutils-python
2021/04/13 23:44:43 Error: Unable to find a match: policycoreutils-python
2021/04/13 23:44:43
2021/04/13 23:44:43 [Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.131] Enable,error,-1,Enabled failed
Need help as to how should i proceed further