[英]AZURE - Save VM ARM Template to Templates
I am trying to save ARM Template of VM into the Templates in Azure but I am getting the following error:我正在尝试将虚拟机的 ARM 模板保存到 Azure 中的模板中,但出现以下错误:
The client 'admin@xxxx.onmicrosoft.com' with object id '1550f813-ee2g-492e-b353-8885c1f85746' does not have authorization to perform action 'Microsoft.Gallery/register/action' over scope '/providers/Microsoft.Gallery' or the scope is invalid.
客户端 'admin@xxxx.onmicrosoft.com' 与 object id '1550f813-ee2g-492e-b353-8885c1f85746' 无权在 scope '/providers/Microsoft.Gallery 上执行操作 'Microsoft.Gallery/register/action' ' 或 scope 无效。 If access was recently granted, please refresh your credentials.
如果最近授予访问权限,请刷新您的凭据。
There are two possible solutions for the above:针对上述问题有两种可能的解决方案:
You can use Template Specs feature instead of Templates feature.您可以使用模板规范功能而不是模板功能。
You can ask your Azure Active Directory tenant admin to create the first gallery template to turn on the ability to create templates for all users under the same tenant.您可以要求您的Azure Active Directory 租户管理员创建第一个图库模板,以启用为同一租户下的所有用户创建模板的功能。
Steps to Create Template Spec:创建模板规范的步骤:
Go to Template Specs in portal. Go 到门户中的模板规范。
Select Create template spec. Select 创建模板规范。
Note: Templates with the same name will be overridden by the latest version.注意:具有相同名称的模板将被最新版本覆盖。
Reference:参考:
Convert portal template to template spec - Azure Resource Manager | 将门户模板转换为模板规范 - Azure 资源管理器 | Microsoft Docs
微软文档
Azure Templates - Failed to save template - Microsoft Q&A Azure 模板 - 保存模板失败 - Microsoft Q&A
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.