How to add user assigned managed identity to Azure Lab VM?

204 views Asked by At

My goal is to have a VM to run builds for Azure DevOps with a user-assigned managed identity so we can keep everything connectionStringLess.

I have just created an Azure Lab and a VM in it.

The reason for this in the lab is so we can shut it down during nights and weekends.

However, I can't find the option to assign managed identities to it.

enter image description here

If possible, how do I do it?

1

There are 1 answers

0
Joy Wang On BEST ANSWER

Looks the lab VM (Microsoft.DevTestLab/labs/virtualmachines) does not support MSI currently, you need to use the azure VM(Microsoft.Compute/virtualMachines).

Reference - Services that support managed identities for Azure resources.

Besides, I notice you use the lab VM for auto-start/stop reason, actually the Azure VM also supports that, see Start/Stop VMs during off-hours solution in Azure Automation, not only schedule VMs to start and stop, but also other features.