具有串行控制台的 Fortinet 虚拟机的 Azure 运行命令?

标签 azure console invoke-command runcommand fortigate

我正在尝试使用 Azure 执行一个 .conf 文件,该文件包含一些命令行,这些命令行可在具有 FortiOS v6.4.3(基于 Linux 的系统)的虚拟机中的 Fortinet 串行控制台中执行。

我使用 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 远程连接到虚拟机时,我们会进入串行控制台,而不是 shell 控制台,与 Azure Bastion 相同

最佳答案

Azure CLI ( source ) 似乎尚未提供串行控制台支持。

关于具有串行控制台的 Fortinet 虚拟机的 Azure 运行命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68663989/

相关文章:

VS 2010 中的 C++ 项目

powershell远程

powershell - 如何让 7za.exe 通过 Powershell Remoting 运行?

azure - 如何在azure门户上恢复已删除的虚拟机?

java - 部署队列触发的azure函数时在哪里指定连接字符串

mysql - 无法使用 Entity Framework 连接到Mysql主/从

azure - 解析 Windows Azure 中 xlst 文件的路径

c++ - 有没有办法检查外部数据是否通过管道传输到程序或程序是否自行运行?

javascript - 如果没有定义,js 会覆盖 console.log

powershell - 通过 Powershell 中的 Invoke-Command 从网络共享运行 Setup.exe