我创建了 Azure 托管应用程序。我使用托管映像mainTemplate.json
来创建新的虚拟机,例如:
{
"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')]"
}
},
...
}
}
这在服务目录中运行良好。但是当我尝试从 Azure Marketplace 部署应用程序时,出现下一个错误:
源 blob https://sdfasdfasdf.blob.core.windows.net/images/myserver.vhd不属于订阅 ****** 中的存储帐户。
在 Azure常见问题解答中,我发现了下一个:
问:我可以使用 Azure 存储帐户中的 VHD 文件来创建具有不同订阅的托管磁盘吗?
答:是的。
我做错了什么?