Devtestlab create custom image error 403

Jan Baggen 0 Reputation points
2023-04-18T10:09:11.03+00:00

DevtestLab user logged in with devtestlab user rights cannot create custom image from vm. The user is owner of the specific vm. Clicking create custom image results in "No access" error message. I've checked the IAM settings on this VM and they are correct. The Devtestlab owner can create custom image with no problems. The devtestlab user can install artefacts and is also able to create formula.

Create custom image error: No Access
Extension: Microsoft_Azure_DevTestLab
Error code: 403
Content: CreateCustomImageFromVmBladeV2 { "shellProps": { "sessionId": "", "extName": "Microsoft_Azure_DevTestLab", "contentName": "CreateCustomImageFromVmBladeV2", "resourceId": "/subscriptions//resourceGroups/rg-devtestlab002/providers/microsoft.devtestlab/labs/devtestlab002", "code": 403 }, "error": { "message": "No access", "code": 403 }}

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
255 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
938 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,336 Reputation points Microsoft Employee
    2023-04-19T03:37:56.62+00:00

    Hello, @Jan Baggen ! Why can't a DevTest Labs User create custom images? An Owner or Contributor has the ability to add and remove custom images however a DevTest Labs User does not. You would need to use either an Owner or Contributor role, or you could create a custom role that would be able to accomplish this: https://learn.microsoft.com/en-us/azure/devtest-labs/devtest-lab-add-devtest-user

    Owner The lab Owner role can take all of the following actions: . . . Virtual machine (VM) base tasks:

    • Add and remove custom images.
    • Add, update, and delete formulas.
    • Enable Marketplace images. . . .

    DevTest Labs User The DevTest Labs User role can take the following actions in DevTest Labs:

    • Add, update, and delete VM base formulas.
    • Create VMs.
    • Start, stop, or delete VMs the user creates.
    • Add or remove data disks from VMs the user creates.
    • Apply artifacts to VMs.

    Hopefully this helps! Let me know in the comments if you run into any issues creating a Contributor role.