Azure Local 2609で、ADレスのAzure LocalをデプロイしようとNested Hyper-VでAzure Local仮想マシンを2台作成しました。
Azure Arcの登録をしようと
Register Azure Local with Azure Arc without using Arc gateway
をみたところ、やり方が変わってました(というかパラメーターが増えてる)。。。「Last updated on 09/05/2026」ですね。
$Tenant、$Subscription、$RG、$Regionといった変数のくだりは、変更ないです。
まず変数として下記の行が増えていましたので、上記URLより引用します。
#Optional: Define the Azure Resource Manager access token.
# Required only if you want to use token-based authentication instead of device code authentication.
$armTokenResponse = Get-AzAccessToken
# Convert token to string for use in initialization
# Required because Get-AzAccessToken returns SecureString
$ArmAccessToken = [System.Net.NetworkCredential]::new("", $armTokenResponse.Token).Password
# Define the target Azure Local solution version that the node must update to after registering with Azure Arc.
# Example: "12.2602.1002.10"
$TargetSolutionVersion = "<solution-version>"
さんざんリトライした挙句、$armTokenResponseと$ArmAccessTokenは、オプションだと気づきました。すなわち$armTokenResponseのコメントにオプションだと書いてあるのに気付くのが遅かったです。オプションなのに、実行すると下記のメッセージが出続けます。
あと、自分がやっていたNested Hyper-V VMに対してのInvoke-Commandではうまくいかない様子。具体的には、
Invoke-AzStackHciArcInitialization @params
の部分でデバイス認証すら出ず、エラーになっていました。
しようがないので、リモートデスクトップ接続経由でコマンドを流しました。結果、デバイス認証が使えるようになりました。
しかし今度は、TargetSolutionVersionが正しくないと。生成AIと相談して、TargetSolutionVersionは使わないでお試ししてみます。具体的には、$paramsの要素から、$TargetSolutionVersionをコメントアウトしています。Invoke-AzStackHciArcInitialization @params を再実行。改めてデバイス認証が出ましたので、認証を通します。今回は、TargetSolutionVersion無でブートストラップが、無事に成功。登録が完了したかは、下記のコードで確認ということです。
$status = Get-ArcBootstrapStatus$status.Response.Status
確認結果は、2ノード分として下記のとおりです。
Azure Portal上からも問題ないことを確認しました。








0 件のコメント:
コメントを投稿