Hello Wool Sock
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
To create VMs from custom images, the user needs to have the Microsoft.Compute/images/read
permission on the custom image. The Virtual Machine Contributor
role does not have this permission by default. You can create a custom role with the required permissions and assign it to the user.
Here are the steps to create a custom role:
- Create a JSON file with the following content:
{
"Name": "Custom VM Image Reader",
"IsCustom": true,
"Description": "Read access to custom VM images",
"Actions": [
"Microsoft.Compute/images/read"
],
"NotActions": [],
"DataActions": [],
"NotDataActions": [],
"AssignableScopes": [
"/subscriptions/{subscriptionId}"
]
}
2.Replace {subscriptionId}
with your subscription ID.
3.Use the following Azure CLI command to create the custom role:
`az role definition create --role-definition /path/to/json/file.json`
4.After the user is assigned the custom role, they should be able to create VMs from custom images. Hope this helps. If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.