从Azure CLI和门户命令提示符运行打包程序生成时出错
azure arm:从VM元数据服务获取subscriptionID以进行托管身份验证时出错:无效字符“我只需要添加订阅ID并确保资源组位于正确的区域中从Azure CLI和门户命令提示符运行打包程序生成时出错,azure,azure-devops,packer,Azure,Azure Devops,Packer,azure arm:从VM元数据服务获取subscriptionID以进行托管身份验证时出错:无效字符“我只需要添加订阅ID并确保资源组位于正确的区域中 { "variables": { "client_id": "", "client_secret": "", "subscription_id": "" }, "builders&qu
{
"variables": {
"client_id": "",
"client_secret": "",
"subscription_id": ""
},
"builders": [{
"type": "azure-arm",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"subscription_id": "{{user `subscription_id`}}",
"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "18.04-LTS",
"managed_image_resource_group_name": "packer-rg",
"managed_image_name": "myPackerImage",
"location": "East US",
"vm_size": "Standard_A2"
}],
"provisioners": [{
"inline": [
"apt-get update",
"apt-get upgrade -y"
],
"inline_shebang": "/bin/sh -x",
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'"
}]