Azure VM: Restore a VM
Who can use this feature
Anyone with these permissions: Restore resources
Use standard restore when you want the VM to come up only after every disk is fully restored, or when the VM isn’t eligible for instant restore. For the eligibility requirements, see Restore support notes. This article explains how to restore an Azure virtual machine (VM) from your Eon snapshots with standard restore. For faster recovery, where the VM becomes available while disk data loads in the background, see Azure VM: Restore a VM (Instant Restore).
To replace the disks of the existing VM instead of creating a new VM, see Azure VM: Restore Disks in Place.
You can use restore recipes to restore an instance from clean files picked from several snapshots. For more information, see Restore from a Recipe.
This procedure applies to both Azure Virtual Machines and SQL Server on Azure Virtual Machines. Both resource types use the same restore wizard.
Restore the VM
Before you start
Before you restore an Azure VM, make sure:
- A restore account has been connected to your Eon account.
-
If the VM is encrypted with Azure Disk Encryption (ADE), the restore account has the ADE encrypted VM restore option turned on. This applies to Windows and Linux VMs, in the same subscription or another. To restore a Linux VM with encrypted data disks, the restore account also needs restore onboarding version 1.12.0 or later. With an older version, Eon restores the VM, but the job ends with an error asking you to update the restore permissions. See Azure: Connect Restore Subscriptions.
-
If a disk’s Key Vault is in another subscription, the Azure CLI and
jqinstalled.
Some disk encryption set combinations aren’t supported. See Restore support notes before you choose a disk encryption set.
Find the snapshot you want to restore
-
In your inventory, select the Azure VM you want to restore. The Resource details panel opens.
-
Click the Eon snapshots tab. You’ll see a calendar view with colored dots on the days when snapshots were taken. There can be more than one snapshot per day.
When you click a day, a list of Eon snapshots taken that day is displayed below the calendar.
-
Expand the snapshot you want to restore. Click Instance, and then click Restore. The Restore virtual machine wizard opens.
Choose the restore account
In the Restore virtual machine wizard, you’re taken through a three-step process. The first step is to choose a restore account.
Choose the subscription you want to restore to, and then click Next.
Set the instance details
In the Instance configuration step, you’ll set the instance details.
-
Enter a VM name for the restored VM.
-
Choose a Region to deploy the restored VM to.
-
Choose a Resource group to deploy the restored VM to.
-
Configure the Network interface. You can select an existing network interface, or create a new one. If you create a new network interface, you’ll need to select or create a virtual network and subnet.
-
Choose the Virtual machine size. You can keep the original VM size, or select a different size. If the original size isn’t available in the selected region, you must select a different size. For information on available options, see Azure VM sizes from Microsoft.
-
If you want to retain the tags that were present when the snapshot was taken, turn Keep original tags on. Otherwise, turn Keep original tags off.
-
If you want the VM to start automatically after the restore completes, turn Start instance after restore on. For a Linux VM with ADE-encrypted data disks, Eon unlocks and checks the data disks only when this is on.
-
Click Next.
Set details for the attached disks
In this step of the wizard, you’ll set the encryption, disk settings, and tags for the disks attached to the VM. Expand individual disks to show disk-specific settings.
Encryption
-
If the VM has more than one disk, choose whether to use one key for every disk. Encrypt all disks with the same key is on when all the source disks had the same encryption, and off when they differed. To choose a key for each disk, turn it off, and then set Encryption at rest in each disk’s settings.
-
In Encryption at rest, select Platform-managed key, or select one of your disk encryption sets. The list shows the disk encryption sets in the restore subscription and the region you chose. The set that encrypted the source disks is preselected and tagged Original. If that set isn’t available in the subscription and region you chose, the choice falls back to Platform-managed key, and the wizard tells you why. If your restore permissions are earlier than version 1.13.0, an info message says that Eon lists only the disk encryption sets its restore app has the Reader role on. If the set you want isn’t listed, grant Eon’s restore app access to it.
Grant Eon access to a disk encryption set
Eon lists a disk encryption set only when its restore app can read it. You need to grant access only in these cases:
- The disk encryption set is outside your restore scope.
- Your restore permissions are earlier than version 1.13.0. From version 1.13.0, Eon can read every disk encryption set in your restore scope, so you can update your restore permissions instead.
To grant access, give Eon’s restore app the Reader role on the set, then check that Eon can read it. You need permissions to assign roles on the disk encryption set in Azure; if you don’t have them, ask your Azure administrator.
-
In the Encryption at rest picker, select Don’t see your disk encryption set? The console shows the commands to run, with Eon’s restore app ID filled in.
-
Assign the Reader role to Eon’s restore app on the disk encryption set. In the following commands, replace
<restore-app-id>with Eon’s restore app ID, which the console fills in for you. Replace<disk-encryption-set-id>with the resource ID of your disk encryption set.Azure CLI
Terraform
MSYS_NO_PATHCONV=1stops Git Bash on Windows from rewriting the resource ID. -
In the Disk encryption set resource ID field, enter the resource ID of the disk encryption set, and click Check access. The result tells you what to do next:
A newly granted disk encryption set can take a while to appear in the Encryption at rest list. Use this set selects it right away, so you don’t have to wait. Then continue with the rest of the restore wizard.
Disk settings
For each disk, you can keep the original disk settings, or you can rename the disk.
You can’t choose a disk size. For disk size behavior, see Restore support notes.
Tags
Each disk has its own tags, independent of the VM-level tags in the previous step. If you want to retain the tags that were present when the snapshot was taken, turn Keep original tags on. Otherwise, turn Keep original tags off.
Encryption keys
If a disk is encrypted with ADE, the wizard shows what you need to do about its key. What you do depends on where the encryption key is stored:
-
Every disk’s Key Vault is in the restore account’s subscription, and you restore to the VM’s original region: The restored disks reference the original keys automatically, and the VM boots with its existing encryption. There’s no additional action needed from you.
-
A disk’s Key Vault is in another subscription, or you restore to another region: Azure requires a disk’s Key Vault to be in the same subscription and region as the disk, so you copy each key into a Key Vault in the restore account’s subscription, in the region you restore to. For the region requirement, see Azure Disk Encryption Key Vault requirements. Then you tell Eon where you put it.
-
In the restore account’s subscription and the region you restore to, create a Key Vault with disk encryption enabled, or use an existing one. The wizard calls this setting “enabled for disk encryption.” In the Azure portal, it’s Azure Disk Encryption for volume encryption. If the restore account is limited to a resource group, the Key Vault must be in that resource group.
-
For each key the wizard lists, copy the commands the wizard shows, replace
<target-vault-name>with the name of your Key Vault, and run them. Copy every key version the wizard lists, even when several share a name. Linux keeps a separate key version for each disk. The last command prints the new secret URL. -
In the wizard, enter the new secret URL in New secret URL. The URL must include the key version. Then enter the Key Vault’s resource ID in Destination Key Vault resource ID. The Key Vault must be the one in the secret URL.
-
Start the restore job
Click Restore to start the asynchronous restore job.
You can see your list of restore jobs on the Restore jobs tab in the Jobs page.
After the job is completed, the status changes to SUCCESS, and you can work with the restored VM as normal. For what to expect after you restore an ADE-encrypted Linux VM, see Restore troubleshooting.