Azure

Ubunut 20.04 に VM insightsのDependency Agentをインストールする

はじめに

VM insightsをプロセスと依存関係を有効にしてUbuntu 20.04にインストールしようとすると失敗します。

特にエラー内容は表示されません。

結論としてはUbuntu 20.04はKernelのバージョンが対応していないことが原因です。

VM Insights Dependency Agent - Azure Monitor | Microsoft Learn
VM Insights Dependency Agent - Azure Monitor | Microsoft Learn

This article describes how to upgrade the VM insights Dependency agent using command-line, setup wiz ...

docs.microsoft.com

$ uname -a
Linux vm1 5.15.0-1017-azure #20~20.04.1-Ubuntu SMP Fri Aug 5 12:16:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

対応しているバージョンは5.8、5.4です。

aptでインストール可能なバージョン毎の最新版をピックアップしてみました。

linux-image-unsigned-5.11.0-1028-azure
linux-image-unsigned-5.13.0-1031-azure
linux-image-unsigned-5.15.0-1017-azure
linux-image-unsigned-5.4.0-1089-azure
linux-image-unsigned-5.8.0-1043-azure

5.8をインストールしてDependency Agentが利用できるようにしていきます。

インストール

Kerne;lのダウングレードは以下で説明した方法で行っていきます。

仮想マシンのUbuntuのKernelをダウングレードする - 技術的な何か。
仮想マシンのUbuntuのKernelをダウングレードする - 技術的な何か。

はじめに UbuntuのKernelのバージョンをダウングレードする方法を紹介します。 なぜ、ダウングレードするかというと、Azure Site RecoveryでKernelのバージョン指定があるか

level69.net

linux-image-unsigned-5.8.0-1043-azureをインストールしてきます。

apt install linux-image-unsigned-5.8.0-1043-azure

grubの編集を行い、起動するKernelを指定します。

vi /etc/default/grub

GRUB_DEFAULTを編集します。

#GRUB_DEFAULT=0
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.8.0-1043-azure"

アップデートします。

update-grub

リブートします。

起動後にログを確認するとDependencyAgentがインストールされたことが分かります。
2022-08-16T03:58:01.527408Z INFO ExtHandler ExtHandler All extensions in the goal state have reached a terminal state: [('Microsoft.Azure.Monitor.AzureMonitorLinuxAgent', 'Ready'), ('Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentLinux', 'success')]

しばらくするとマップなども表示されるようになります。

まとめ

Kernelをダウングレードしてまでプロセスの依存関係を知りたいかは別の話です。ここら辺お整備が早く行われることを期待しています。

-Azure
-