FortiOS v6.4.3 (Linux ベースのシステム) を搭載した仮想マシンの Fortinet のシリアル コンソールで実行できるいくつかのコマンド ラインを含む .conf ファイルを Azure で実行しようとしています。
AZ CLI を使用して、仮想マシンでスクリプトを実行します。コマンドは次のとおりです。
az vm run-command invoke --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" --resource-group "myresourcegroup" --name "myfortinet" --command-id RunShellScript --scripts $scriptfgtvm
$scriptfgtvm には次のものが含まれます。
config system interface
edit port1
set allowaccess ping https ssh fgfm snmp
next
end
問題は、必要な変更が表示されず、フィードバックは「サポートされていません」ですが、正常にプロビジョニングされていることです。
{
"value": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "Not supported.",
"time": "2021-08-05T08:24:01+00:00"
}
]
}
SSH を介してリモートで vm に接続すると、Azure Bastion と同じように、シェル コンソールではなく、シリアル コンソールに入ります。