When running a restore of a virtual machine, the Azure Portal provides the basic tooling to restore a VM. However, some options are left out during the process. An issue that occurred this week with one of my customers is that they had an Azure Policy that requires that all VMs must have the option “I already have a Windows Server license” checked.
The problem is that this error will occur only at the very end of the process, after the transfer of the data from the vault — and that won’t happen until a few good minutes (perhaps hours).
You can always use PowerShell to have more flexibility and it will involve changing an ARM deployment. First, you need to restore the disks as described in this documentation link and the second step is to create the VM itself using this link.
Another possible way is to relax your Azure Policies before starting the restore process. However, this is not practical, especially when having different teams managing the policies vs. day-to-day operations like a VM restore.
More Quick Tips articles
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update
- How to quickly check the status of all your Azure services