从用户自定义映像创建VM的ARM模板 [英] ARM Template to create VM from User Custom Image

查看:93
本文介绍了从用户自定义映像创建VM的ARM模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Azure Win2k16 VM,并添加了一些防火墙规则,然后捕获了该VM并创建了Image,在Image属性中Blob Url显示为null.

I have created one Azure Win2k16 VM and added some firewall rules etc then I captured this VM and created Image, in Image properties Blob Url is showing as null.How to get the custom Image blob url which I have created

我的情况:

我想使用ARM模板从上述创建的映像中创建VM,能否请您提供ARM模板以从Custom Image作为输入创建VM.我找到了Powershell脚本来执行此操作,但我的要求是使用ARM来实现模板.

I want to create VM from the above created Image using ARM template,can you please provide me the ARM template to create VM from Custom Image as input.I found Powershell script to do this but my requirement is to achieve this using ARM template.

我们是否有任何将Custom Image uri作为输入的ARM模板,并向我建议实现这一目标的良好做法.感谢您为上述情况提供ARM模板的帮助

Do we have any ARM template which takes Custom Image uri as input and suggest me the good practice to achieve this.Appreciate your help in providing me the ARM template for the above scenario

推荐答案

嗨Kameswara,

Hi Kameswara,

在Azure中创建映像时,可以通过资源ID访问该映像以创建新的VM:

As you created an image in Azure, you can access the image for creating a new VM by the resource ID:

"imageReference": {
    "id": "[resourceId('<resource group name>', 'Microsoft.Compute/images', '<image name>')]"
}

我基于 101-vm-simple- Windows快速入门模板.这使您可以使用该映像来部署新的VM:

https://github.com/christofvg/ArmTemplateFromManagedImage

希望这会有所帮助.

亲切的问候,

克里斯托夫



这篇关于从用户自定义映像创建VM的ARM模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆