Search code examples
azureazure-storageazure-rm-template

Azure. How to deploy VM from managed image with ARM Template


I have an managed image of VM, as described here. I need to deploy some VMs from that image with Managed Disk as OS disk. How can I do that with ARM Templates?


Solution

  • Just take a regular VM arm template and replace storageProfile with this:

    "storageProfile": {
                        "imageReference": {
                            "id": "[resourceId('Microsoft.Compute/images', 'imageName')]"
                        },
                        "osDisk": {
                            "createOption": "FromImage"
                        }
                    },