Wednesday, December 01, 2021

custom role for user able to start and stop vm in Azure

Apparently there is no built-in role at present in Azure which allows a user the permissions to start and stop a VM in Azure (and not much else). Even the Virtual Machine Admin role doesn't. According to this SO post,

1. Add Custom Role
2. Select "Clone a role" and role to close is "Virtual Machine User Login"
3. Click Next
4. Select add permissions
5. Scroll  down to "Microsoft.Compute.VirtualMachines" and tick
Microsoft.Compute/virtualMachines/start/action"
"Microsoft.Compute/virtualMachines/powerOff/action"
"Microsoft.Compute/virtualMachines/deallocate/action"
6. Click Next, select subscription, Next, Next then "Create".

And then after creating the role, we can assign it to a user.

No comments:

Post a Comment