LoginSignup
0
1

More than 1 year has passed since last update.

【Azure Automation】Runbook の実行時エラー「RunAsAccount not found. To create this RunAsAccount...」の対処方法

Last updated at Posted at 2022-07-11

前置き

Azure VM の自動起動を設定したく、Azure Automation アカウントを作成しました。
Runbook はギャラリーから「Start Azure V2 VMs」を参照しました。

image.png

現象

Automation > Runbook の編集 > テストウィンドウ > 開始を行うと以下のようなエラーが発生しました。

RunAsAccount not found. To create this RunAsAccount,   
navigate to the RunAsAccount blade and create a RunAsAccount.   
Refer doc for more details (https://docs.microsoft.com/azure/automation/create-runas-account)

Azure Automation では現在マネージドIDを使用してロールを設定する方法が推奨されていて、
それに従い Automation アカウントではマネージドIDを使用をONにしたのですが…
RunAsAccount = 実行アカウントを作成しろとはどういうことでしょうか。

image.png

解決

調べたところ、「Start Azure V2 VMs」が マネージドIDを使用するスクリプトになっていなかったようです。
そのため、Automation の実行アカウントを参照しようとするが未作成のためエラーになっていたということでした。

今回はリポジトリで「Uses Managed Identity instead of RunAs Accounts」と明記していた
Simple-Azure-VM-Start-Stop」という Runbook を使用することにしました。

image.png

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1