You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

创建Azure容器实例时遇‘unrecognized arguments’错误求助

解决Azure CLI创建容器实例时标签参数报错的问题

错误原因

你在--tags参数后给每个标签单独加了双引号,导致Azure CLI将"Environment=Test"和"Owner=SQC"识别为未定义的命令参数,从而抛出unrecognized arguments错误。

正确命令写法

Azure CLI的--tags参数接受空格分隔的键值对,不需要为每个标签单独加引号,正确命令如下:

az container create --resource-group sonarQubeSQC --name sonarqube --image sonarqube --ports 9000 --dns-name-label sqc.sonarqube --tags Client=Internal Environment=Test Owner=SQC --cpu 2 --memory 3.5

如果你的终端环境(比如Windows CMD)需要处理特殊字符,也可以用单个引号将所有标签括起来:

az container create --resource-group sonarQubeSQC --name sonarqube --image sonarqube --ports 9000 --dns-name-label sqc.sonarqube --tags 'Client=Internal Environment=Test Owner=SQC' --cpu 2 --memory 3.5

内容的提问来源于stack exchange,提问作者Arvind

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 14:07:05