azureazure-resource-managerazure-marketplaceazure-managed-disk

Azure Marketplace: Is it possible to use images in Managed Application offer?


I created Azure Managed Application. I used managed images in mainTemplate.json to create new VMs, like in example:

{
    "type": "Microsoft.Compute/images",
    "apiVersion": "2018-04-01",
    "name": "front-image",
    "location": "[parameters('location')]",
    "properties": {
        "storageProfile": {
            "osDisk": {
                "osType": "linux",
                "osState": "Generalized",
                "blobUri": "[concat('https://sdfasdfasdf.blob.core.windows.net/images/myserver.vhd')]",
                "caching": "ReadWrite",
                "storageAccountType": "Standard_LRS"
            }
        }
    }
}, {
    "apiVersion": "2016-04-30-preview",
    "type": "Microsoft.Compute/virtualMachines",
    "name": "myserver",
    "location": "[parameters('location')]",
    "dependsOn": ["myserver-nic", "myserver-images"],
    "properties": {
        "storageProfile": {
            "imageReference": {
                "id": "[resourceId('Microsoft.Compute/images', 'myserver-image')]"
            }
        },
        ...
    }
}

This work well in Service catalog. But when I trying deploy application from Azure Marketplace, I have next error:

The source blob https://sdfasdfasdf.blob.core.windows.net/images/myserver.vhd does not belong to a storage account in subscription ****** .

In Azure FAQ I found next:

Q: Can I use a VHD file in an Azure storage account to create a managed disk with a different subscription?

A: Yes.

What I doing wrong?


Solution

  • This is not allowed in the Marketplace (will fail certification). Any vm images used in a marketplace offer (managed app or solution template) must be published to the Azure Marketplace as a VM offer. It can be hidden (so users don't deploy the image directly) but still needs to be in the marketplace.