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
- Using Azure DevOps Repos in your Azure Cloud Shell
- Restarting your Azure Application Gateway with PowerShell
- Renaming your repos in Azure DevOps
- Visual Studio Code keyboard shortcut to manage your code
- Using Azure ephemeral disks when provisioning VMs with ARM