
Restoring an Azure VM from backup is a crucial process that requires careful planning and execution. You can restore an Azure VM from backup with cross subscription support, allowing you to recover VMs from backups taken in different subscriptions.
To restore an Azure VM from backup, you'll need to select the correct recovery point and deployment model. The recovery point represents a specific point in time when the backup was taken, and the deployment model determines the type of VM you're restoring.
Cross subscription support allows you to recover VMs from backups taken in different subscriptions, giving you more flexibility in your disaster recovery process. This feature is particularly useful for organizations with multiple subscriptions or Azure environments.
Azure provides a user-friendly interface for restoring VMs from backup, making the process easier and more efficient.
Suggestion: Icloud Backup Delete Old Backups
Preparation
Before you start the process of restoring an Azure VM from backup, it's essential to have the correct Azure role-based access control (Azure RBAC) permissions for the Restore VM operation.
To ensure you have the necessary permissions, check if you can restore a VM directly. If not, you can restore a disk and then use the template generated during the restore operation to create a new VM.
You can also access the functionality described in the following sections via Backup center, a single unified management experience in Azure that enables enterprises to govern, monitor, operate, and analyze backups at scale.
To access Backup center, navigate to the Azure portal and click on Restore from the Overview tab.
To restore a VM from backup, you'll need to follow these steps:
- Navigate to Backup center in the Azure portal and click Restore from the Overview tab.
- Select Azure Virtual machines as the Datasource type, and then select a Backup instance.
- Select a VM and click Continue.
- In the next screen that appears, select a restore point to use for the recovery.
Before starting, it's also a good idea to review the prerequisites and limitations of Azure VM backup, including the architecture and support.
Storage and Backup
To restore an Azure VM from a backup, you need to enable backup for it first. This will create a recovery services vault, which stores your backups, and a backup policy, which determines the frequency and retention of your backups. You can enable backup for a VM in Azure Portal by going to the VM blade and selecting Backup under Operations.
Broaden your view: Azure Immutable Backups
For storage, if your virtual machine uses managed disks, Azure Backup doesn't use the specified storage account when you select the Create virtual machine option. However, the storage account is used only for storing the template in the case of Restore disks and Instant Restore.
Azure Backup supports Cross Subscription Restore (CSR) and Cross Zonal Restore (CZR), which allows you to restore Azure VM disks to a different subscription and zone, respectively. However, CZR is only supported for vaults with ZRS or CRR redundancy.
Here's an interesting read: Azure Free Virtual Machine
Storage
When restoring disks, Azure Backup uses the specified storage account only for storing the template, not for creating managed disks. The managed disks are created in the specified resource group.
You can restore disks to a different subscription, which is a feature known as Cross Subscription Restore (CSR). This allows you to restore VM disks to a different subscription than the one where the recovery point is available.
For another approach, see: Azure Managed Disk Terraform
Azure Backup also supports Cross Zonal Restore (CZR), which allows you to restore VM disks to a different zone than the one where the disks reside. This feature is available only for vaults with ZRS or CRR redundancy.
If your virtual machine uses managed disks, Azure Backup restores the managed disk and Azure Resource Manager (ARM) templates, along with the VHD files of the disks in staging location. However, if you restore disks from an Instant recovery point, it restores the managed disks and ARM templates only.
For restoring disk from a Vault-Standard recovery point that is/was greater than 4 TB, Azure Backup doesn't restore the VHD files.
A unique perspective: Azure Arm Operation to Create Vm
Backing Up
To enable backup for a VM, you must create a recovery services vault, which stores your backups, and a backup policy, which determines the frequency and retention of your backups. This can be done in the Azure Portal by going to the VM blade and selecting Backup under Operations.
You can select the default recovery services vault and backup policy, or create your own. To create a new recovery services vault, you'll need to set the vault context, which is the type of data protected in the vault, and verify the protection policy. The protection policy is the schedule when the backup jobs run, and how long each backup snapshot is retained.
You can also use PowerShell to enable backup for a VM. The Enable-AzRecoveryServicesBackupProtection cmdlet can be used to enable backup for a VM. For example, you can set the variables for the VM, the vault, and the policy, and then enable backup for the VM.
To restore a VM from a backup in the Azure Portal, you'll need to go to the Backup center, choose Backup Items, and then Azure Virtual Machine. From there, you can select the VM you want to restore, click Restore VM, choose the restore point, and follow the prompts to complete the restoration.
Here are the steps to enable backup for a VM:
- Go to the Azure Portal and navigate to the virtual machine that you want to enable backup for
- Click on Backup under Operations in the left-hand menu
- In the Backup blade, click on Backup to begin the configuration process
- In the Backup goal blade, select the backup policy that you want to use or create a new one
- In the Backup policy blade, configure the backup frequency, retention, and other settings as per your requirement
- In the Backup settings blade, select the storage account where you want to store the backups
- Review the backup settings, and then click on Enable backup to initiate the backup process
Cross Subscription
Cross Subscription is a feature in Azure Backup that allows you to restore Azure VMs in a subscription that is different from the default one.
This feature is enabled for Recovery Services vault by default, but you can disable or permanently disable it if needed.
Once Cross Subscription Restore is permanently disabled on a vault, it can't be re-enabled because it's an irreversible operation.
If Cross Subscription Restore is disabled but not permanently disabled, you can reverse the operation by selecting Vault > Properties > Cross Subscription Restore > Enable.
Be aware that if a Recovery Services vault is moved to a different subscription when Cross Subscription Restore is disabled or permanently disabled, restore to the original subscription will fail.
Here are some key things to keep in mind about Cross Subscription Restore:
- CSR once permanently disabled on a vault can't be re-enabled.
- CSR can be disabled but not permanently disabled, and then re-enabled by selecting Vault > Properties > Cross Subscription Restore > Enable.
- Restore to the original subscription fails if a Recovery Services vault is moved to a different subscription when CSR is disabled or permanently disabled.
Customization and Configuration
You can customize a restored VM by using the template that was generated as part of the restore operation. To do this, select the relevant restore job in Backup Jobs and then select Deploy Template to initiate template deployment.
Note that if you have a shared access signature (SAS) with Allow storage account key access set to disabled, the template won't deploy when you select Deploy Template.
To customize the VM settings provided in the template, select Edit template. If you want to add more customizations, select Edit parameters. Enter the custom values for the VM, accept the Terms and Conditions, and select Purchase to complete the customization process.
Alternatively, you can use the restore disk option to restore VMs with special network configurations, such as VMs using internal or external load balancing, multiple NICS, or multiple reserved IP addresses.
Customize with Templates
To customize your restored VM, use the template generated as part of the restore operation. This template will serve as a foundation for your new VM.
In Backup Jobs, select the relevant restore job to initiate the customization process. Note that if you're using a shared access signature (SAS) with Allow storage account key access disabled, the template won't deploy when you select Deploy Template.
To customize the VM settings provided in the template, select Edit template. If you need to add more customizations, select Edit parameters.
Enter your custom values for the VM, review the Terms and Conditions, and then select Purchase to complete the customization process.
Replace Existing

Replacing existing disks is a viable restore option. You can review all the available options before making a decision.
To replace an existing VM disk, select Replace existing in the Restore configuration. In the Restore Type dropdown, choose Replace disk/s, which is the restore point you'll use to replace the existing VM disks.
You'll need to specify a storage account in the Staging Location field. This is where VHD files will be created in some scenarios.
Related reading: How to Create Terraform from Existing Vm Azure
Special Configurations
Restoring VMs with special configurations can be a bit tricky, but don't worry, I've got you covered. You can restore VMs using Hybrid Use Benefit by creating a new VM using the provided template with License Type set to Windows_Server.
In the event of an Azure datacenter disaster, Azure Backup supports restoring backed-up VMs to the paired datacenter, and you can choose the new feature, Cross Region Restore, to restore to a second region in either full or partial outage scenarios.
Check this out: Azure Create New App Service

If you're dealing with bare-metal restore, you can use the VM restore from the vault, which is a full replacement for BMR.
Restoring VMs with special network configurations requires using the restore disk option, which makes a copy of the VHDs into the specified storage account.
You can restore a VM in the same zone where it was pinned, if you backed up an Azure VM that's pinned to a zone with Azure Backup.
Here are some special configurations you should be aware of when restoring VMs:
Managed Identities
Managed Identities allow you to eliminate the need for maintaining credentials.
Azure Backup provides the flexibility to restore managed Azure VMs with managed identities, giving you the option to select system-managed or user-managed identities.
You can choose to select system-managed or user-managed identities as an input parameter in the Restore configuration blade of Azure VM.
Managed identities used for restore are only used for accessing storage accounts, not for any other Azure resource controlling.
A different take: Azure Document Management System
These managed identities have to be associated to the vault.
System-assigned or user-assigned managed identities are required on the target staging Storage Account for successful restore operation.
You can also select the user-managed identity by providing the input as their MSI Resource ID.
Managed identities are only supported for managed VMs, not for classic VMs or unmanaged VMs.
Cross Region Restore isn't supported with managed identities.
Azure Backup also allows you to use managed identity (MSI) during restore operation to access storage accounts where disks have to be restored to.
This option is currently supported only for managed disk restore.
You can use the vault's system assigned managed identity to restore disks by passing an additional flag -UseSystemAssignedIdentity to the Restore-AzRecoveryServicesBackupItem command.
Alternatively, you can use a user-assigned managed identity by passing a parameter -UserAssignedIdentityId with the Azure Resource Manager ID of the vault's managed identity.
See what others are reading: Azure Key Vault Secret Version
Network and Access
When restoring an Azure VM from backup, you'll need to consider the network and access settings for the restored disks. You can configure these settings during the restore operation.
Related reading: Azure B Series
Azure Backup allows you to set the disk access preferences at the time of initiating the restore. This feature is generally available for backed-up VMs that use private endpoint-enabled disks.
To enable disk access on restored disks, you can choose from three options: using the same network configurations as the source disk(s), enabling public access from all networks, or disabling public access and enabling private access using disk access.
Here are the three options in more detail:
Note that the option to choose the network configuration of the restored disks the same as that of the source disks or specify the access from specific networks only is currently not available from Azure PowerShell/ Azure CLI.
Assign Network Access
You can configure the access options for restored disks during a restore operation in Azure Backup. This feature is generally available for backed-up VMs that use private endpoint-enabled disks.
To enable disk access on restored disks during VM restore, you have three options to choose from.

Here are the options:
- Use the same network configurations as the source disk(s): This option allows the restored disks to use the same disk access and network configurations as the source disks.
- Enable public access from all networks: This option allows the restored disk to be publicly accessible from all networks.
- Disable public access and enable private access (using disk access): This option allows you to disable public access and assign disk access to the restored disks for private access.
The option to choose the network configuration of the restored disks the same as that of the source disks or specify the access from specific networks only is currently not available from Azure PowerShell or Azure CLI.
Using Managed Identity
Azure Backup allows you to use managed identity to restore VMs with managed identities.
Managed identities eliminate the need for users to maintain credentials, providing an identity for applications to use when connecting to resources that support Microsoft Entra authentication.
You can choose to select system-managed identities or user-managed identities when restoring managed Azure VMs.
System-assigned or user-assigned managed identities have to be associated with the vault and have the role assignment on the staging location (Storage Account) to have Storage account Backup Contributor and Storage Blob data Contributor for the successful restore operation.
Cross Region Restore isn't supported with managed identities.
Azure Backup also allows you to use managed identity to restore disks during the restore operation to access storage accounts where disks have to be restored to.
See what others are reading: Account Azure
This option is currently supported only for managed disk restore, and you can pass an additional flag -UseSystemAssignedIdentity to the Restore-AzRecoveryServicesBackupItem command to use the vault's system assigned managed identity.
You can also pass a parameter -UserAssignedIdentityId with the Azure Resource Manager ID of the vault's managed identity as the value of the parameter to use a user-assigned managed identity.
The support for managed identity is available for only managed VMs, and not supported for classic VMs and unmanaged VMs.
You might enjoy: Azure Key Vault Task
Enable Protection
To enable protection for your Azure Virtual Machine (VM), you need to associate it with a protection policy. This policy determines the backup schedule and retention period. You can use the PowerShell cmdlet Enable-AzRecoveryServicesBackupProtection to enable protection.
Enabling protection requires two objects: the item (your VM) and the policy. Once the policy is associated with the vault, the backup workflow is triggered at the specified time in the policy schedule. A recommended best practice is to ensure a single policy doesn't have more than 100 VMs associated with it.
Discover more: Azure Backup Ransomware Protection

If your VM is encrypted, you need to give the Azure Backup service permission to read keys and secrets from the key vault. The type of encryption used determines the specific permissions required: BEK and KEK, or BEK only. For Azure Government cloud, use the value ff281ffe-705c-4f53-9f37-a40e6f2c68f3 for the ServicePrincipalName parameter in the Set-AzKeyVaultAccessPolicy cmdlet.
To enable protection for multiple VMs at once using PowerShell, consider the following:
Note that the PowerShell client does not currently block if there are more than 100 VMs associated with a policy, but this check is planned to be added in the future.
Restoration and Recovery
Restoring your Azure VM from backup can be a complex process, but it's essential to understand your options. You have the ability to restore unmanaged VMs and disks as managed, which wasn't possible before. This feature is only available during the vault phase and not from the snapshot phase.
To choose the right recovery point, use the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet to list all available recovery points for your backup item. Then, select the recovery point you want to use, making sure to choose the most recent AppConsistent point in the list.
You can also restore selective disks by providing the required disk LUNs as a parameter. This allows you to restore only the disks you need instead of the entire backed-up set.
Scenarios
Restoring your Azure VM is a straightforward process, but it's essential to know which scenario to use in different situations. If you need to restore your entire VM, you can use the "Restore to create a new virtual machine" scenario, which will restore the VM to its original location or an alternate location.
You can also restore specific files within the VM by choosing a restore point, browsing, selecting the files, and restoring them to the same or compatible OS as the backed-up VM.
See what others are reading: Azure Files Backup
If you need to restore disks, you can use the "Restore disks of the VM" scenario, which creates a template and restores the disk. This option is useful if you want to edit the template with special configurations before recreating the VM.
If you're dealing with an encrypted VM, you'll need to use the "Restore an encrypted VM" scenario, which involves restoring the disks and then using PowerShell to create the VM.
If you need to restore a VM across regions, you can use the "Cross Region Restore" scenario, which creates a new VM or restores disks to a secondary region.
Here's a summary of the different restore scenarios for Azure VMs:
Remember, the specific restore method you choose will depend on your needs and the situation.
Restore Azure VM from Backup
Restoring an Azure VM from backup is a straightforward process, but it does require some planning. To start, you need to create a Recovery Services vault, which is a Resource Manager resource that you place within a resource group.
You can use an existing resource group or create a new one using the New-AzResourceGroup cmdlet. When creating a resource group, specify the name and location for the resource group. Once you have your resource group, you can use the New-AzRecoveryServicesVault cmdlet to create the Recovery Services vault.
To restore an Azure VM from backup, you'll need to choose a recovery point, which is the point in time when you want to restore the VM. You can use the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet to list all recovery points for the backup item. It's a good practice to choose the most recent RecoveryPointType = AppConsistent point in the list.
You can then use the Get-AzRecoveryServicesBackupRPMountScript cmdlet to get the script to mount all the disks of the recovery point. The disks are mounted as iSCSI attached disks to the machine where the script is run.
To restore the VM, you can use the Restore-AzRecoveryServicesBackupItem cmdlet, which triggers an alternate location restore operation to create a new VM in the Target_RG resource group. You can also use the Restore-AzRecoveryServicesBackupItem cmdlet to restore the data in-place in the existing VM.
Here's a summary of the restore scenarios for Azure VMs:
Remember to provide the start time in 30-minute multiples only when restoring a VM.
The
The concept of restoration and recovery is multifaceted. It involves more than just rebuilding what's been lost, but also reviving the vitality of the affected area.
Restoration efforts can be categorized into three main stages: immediate response, short-term recovery, and long-term rebuilding. The immediate response stage typically lasts for the first few weeks or months after a disaster.
During this stage, emergency responders and volunteers work together to provide basic necessities like food, water, and shelter to those affected. In the aftermath of Hurricane Katrina, for example, thousands of volunteers helped distribute aid and supplies to affected communities.
Short-term recovery efforts focus on rebuilding infrastructure and providing temporary housing solutions. This stage can last anywhere from a few months to a few years.
In the case of the 2010 Haiti earthquake, temporary shelters and emergency housing were set up to accommodate the large number of displaced people.
Long-term rebuilding efforts involve more comprehensive and sustainable solutions, such as rebuilding homes and businesses, and restoring damaged ecosystems. This stage can take years or even decades to complete.
The goal of long-term rebuilding is to create a more resilient and sustainable community that can withstand future disasters.
Monitoring and Tracking
Monitoring and tracking are crucial steps in the restore process. You can monitor secondary region restore jobs from the Azure portal by going to Recovery Services vault > Backup Jobs and selecting Secondary Region.
To track the restore operation, the backup service creates a job for tracking. Azure Backup displays notifications about the job in the portal, which can be found by selecting the Notifications symbol.
You can also track the restore operation by selecting the relevant VM in the vault and then selecting the relevant VM in the Backup jobs section. This will display the restore process status.
To monitor restore progress, select any restore job with a status of In-progress. This displays a progress bar that shows information about the restore progress.
You can monitor long-running operations, such as backup jobs, without using the Azure portal. To get the status of an in-progress job, use the Get-AzRecoveryservicesBackupJob cmdlet, which gets the backup jobs for a specific vault and stores the status in a variable.
Related reading: Azure Databricks Outage
Here's how to use the cmdlet to get the status of an in-progress job:
- Get-AzRecoveryservicesBackupJob -VaultId "your_vault_id" -Status InProgress
- Store the status in a variable, such as $joblist = Get-AzRecoveryservicesBackupJob -VaultId "your_vault_id" -Status InProgress
Alternatively, you can use the Wait-AzRecoveryServicesBackupJob cmdlet to pause the execution until the job completes or the specified timeout value is reached.
Post-Restoration Steps
After restoring an Azure VM from backup, there are a few things to keep in mind to ensure a smooth recovery.
Firstly, extensions present during the backup configuration are installed, but not enabled. If you see an issue, reinstall the extensions. In the case of disk replacement, reinstallation of extensions is not required.
You may need to add a static IP address to the restored VM if the backed-up VM had one.
If you use the restore disk option, you can specify an availability set when you create a VM from the disk using the provided template or PowerShell.
If you're using a cloud-init-based Linux distribution, such as Ubuntu, for security reasons, the password is blocked after the restore. Use the VMAccess extension on the restored VM to reset the password.
Check this out: Change Password Azure Vm
We recommend using SSH keys on these distributions, so you don't need to reset the password after the restore.
Here are the key post-restoration steps to keep in mind:
- Install and enable extensions present during backup configuration.
- Add a static IP address to the restored VM if necessary.
- Specify an availability set when creating a VM from the restore disk using the provided template or PowerShell.
- Reset the password using VMAccess extension on cloud-init-based Linux distributions.
- Rejoin the VM to the domain after disjoining and restarting it.
Vault and Context
To set up your Azure Recovery Services vault, you'll need to place it within a resource group. You can use an existing resource group or create a new one with the New-AzResourceGroup cmdlet. For instance, you can create a resource group named "test-rg" in the "West US" location with the following command: New-AzResourceGroup -Name "test-rg" -Location "West US".
The Recovery Services vault is a Resource Manager resource, so it's essential to specify the same location for the vault as the resource group. You can create the vault with the New-AzRecoveryServicesVault cmdlet, like this: New-AzRecoveryServicesVault -Name "testvault" -ResourceGroupName "test-rg" -Location "West US".
To complete the setup, you'll need to specify the storage redundancy type for your vault. You have three options: Locally Redundant Storage (LRS), Geo-redundant Storage (GRS), or Zone-redundant storage (ZRS). You can set the storage redundancy type with the -BackupStorageRedundancy option, as shown in the following example: Set-AzRecoveryServicesBackupProperty -Vault $vault1 -BackupStorageRedundancy GeoRedundant.
Related reading: Azure Backup Transfer Data to Vault
Create a Recovery Services Vault
Creating a Recovery Services vault is a crucial step in setting up your backup infrastructure. You'll need to place it within a resource group, which can be an existing one or a new one you create using the New-AzResourceGroup cmdlet.
To create a new resource group, specify the name and location, like this: New-AzResourceGroup -Name "test-rg" -Location "West US". This will create a resource group named "test-rg" in the "West US" location.
You can use an existing resource group for your Recovery Services vault. Just make sure to specify the same location for the vault as was used for the resource group.
The Recovery Services vault is a Resource Manager resource, so you need to create it within a resource group. Use the New-AzRecoveryServicesVault cmdlet to create the vault, specifying the same location as the resource group. For example: New-AzRecoveryServicesVault -Name "testvault" -ResourceGroupName "test-rg" -Location "West US".
You'll also need to specify the type of storage redundancy to use. Your options are Locally Redundant Storage (LRS), Geo-redundant Storage (GRS), or Zone-redundant storage (ZRS). To set the redundancy for your vault, use the Set-AzRecoveryServicesBackupProperty cmdlet, like this: Set-AzRecoveryServicesBackupProperty -Vault $vault1 -BackupStorageRedundancy GeoRedundant.
Here are the available storage redundancy options:
Set Vault Context

Setting the vault context is a crucial step before enabling protection on a VM. This is done using the Set-AzRecoveryServicesVaultContext cmdlet.
To set the vault context, you need to specify the vault name. In the example, the vault name is testvault.
Once the vault context is set, it applies to all subsequent cmdlets. This means you don't need to specify the vault name again in the following cmdlets.
Setting the vault context saves time and reduces errors. It ensures that all cmdlets operate on the correct vault, making the process more efficient.
Discover more: Azure Vm Unable to Set Password
Backup and Recovery Points
When restoring files, you need to choose a recovery point. Use the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet to list all recovery points for the backup item.
It's a good practice to choose the most recent RecoveryPointType = AppConsistent point in the list. If you're unsure which recovery point to use, this is a safe bet.
You can use a script to sort the recovery points in reverse order of time, with the latest point at the top. In PowerShell, you can use standard array indexing to pick the recovery point, like $rp[0] to select the latest point.
Options
You have several options when it comes to choosing a backup and recovery point strategy.
Full backups involve copying all data, which can be time-consuming and may not be feasible for large datasets.
Incremental backups copy only the data that has changed since the last backup, making them a more efficient option.
Differential backups, on the other hand, copy all data that has changed since the last full backup, which can be faster than incremental backups but may still take some time.
Backup and recovery points can be set to occur at specific intervals, such as daily, weekly, or monthly, depending on your needs and schedule.
Having multiple backup and recovery points can help ensure that your data is safe in case of a disaster or system failure.
You can also choose to store your backups on-site or off-site, depending on your preference and the level of security you need.
A fresh viewpoint: Icloud Backup the Last Backup Could Not Be Completed
Methods to Backup
To backup your Azure Virtual Machine (VM), you must enable backup for it. This creates a recovery services vault, which stores your backups, and a backup policy, which determines the frequency and retention of your backups.
You can enable backup for a VM in the Azure Portal by going to the VM blade and selecting Backup under Operations. Alternatively, you can use PowerShell and the Enable-AzRecoveryServicesBackupProtection cmdlet to enable backup for a VM.
To restore a VM from a backup in Azure Portal, you need to go to the Azure portal, select "Backup center", choose "Backup Items", and then "Azure Virtual Machine." Select the VM you want to restore, click "Restore VM", choose the restore point, and follow the prompts to complete the restoration.
Here are the steps to enable backup for a VM:
- Log in to the Azure Portal and navigate to the virtual machine that you want to enable backup for.
- Click on "Backup" under "Operations" in the left-hand menu.
- In the "Backup" blade, click on "Backup" to begin the configuration process.
- In the "Backup goal" blade, select the backup policy that you want to use or create a new one.
- In the "Backup policy" blade, configure the backup frequency, retention, and other settings as per your requirement.
- In the "Backup settings" blade, select the storage account where you want to store the backups.
- Review the backup settings, and then click on "Enable backup" to initiate the backup process.
To restore a VM from a backup using PowerShell, you need to use `Connect-AzAccount` to log in, then run `Get-AzRecoveryServicesBackupItem` to get the VM backup item. Finally, use `Start-AzRecoveryServicesBackupRestoreJob` with the appropriate parameters to start the restore process.
For your interest: Azure Vm Auto Start Stop
Choose a Recovery Point
Choosing a recovery point is a crucial step in the backup and recovery process. You'll want to use the Get-AzRecoveryServicesBackupRecoveryPoint cmdlet to list all recovery points for the backup item.
It's a good practice to choose the most recent RecoveryPointType = AppConsistent point in the list. This ensures you're restoring the most up-to-date version of your files.
To select the latest recovery point, you can use standard PowerShell array indexing to pick it. For example, if you have an array of recovery points, the latest one would be at index 0.
For instance, if you have an array of recovery points from the past seven days, it will be sorted in reverse order of time with the latest recovery point at index 0. In this case, $rp[0] selects the latest recovery point.
Secondary Region and Jobs
To restore your Azure VM from backup, you'll need to navigate the secondary region and jobs process. You can do this by going to Recovery Services vault > Backup Jobs from the portal, and then selecting Secondary Region to view the items in the secondary region.
Once you've selected the secondary region, you can monitor your restore jobs by using the Get-AzRecoveryServicesBackupJob cmdlet with the -UseSecondaryRegion parameter. This will allow you to track the status of your restore job.
Here are the steps to monitor secondary region restore jobs:
- From the portal, go to Recovery Services vault > Backup Jobs
- Select Secondary Region to view the items in the secondary region.
Secondary Region
You can view backup items in the secondary region by going to the Recovery Services vault and selecting Backup items. Only Backup Management Types supporting the CRR feature will be shown in the list.
To view the backup items in the secondary region, you'll need to select Secondary Region from the list. Currently, only Backup Management Types that support Cross Region Restore are allowed to be shown in the list.
The secondary region restore user experience is similar to the primary region restore user experience. When configuring details in the Restore Configuration pane, you'll be prompted to provide only secondary region parameters.
You can restore Azure VMs in a secondary region, which is an Azure paired region. To begin using the feature, read the Before You Begin section.
You might enjoy: Azure Subscription Types

The Cross Region Restore feature restores CMK (customer-managed keys) enabled Azure VMs as non-CMK enabled VMs in the secondary region. The Azure roles needed to restore in the secondary region are the same as those in the primary region.
To restore in the secondary region, you'll need to provide the virtual network settings in the secondary region. If VNet/Subnet is not available in the primary region or is not configured in the secondary region, Azure portal doesn't auto-populate any default values during restore operation.
You can view the status of secondary region restore jobs by going to the Recovery Services vault and selecting Backup Jobs. Select Secondary Region to view the items in the secondary region.
Here is a list of the requirements for Availability Zone when restoring a VM:
- The source VM is zone pinned and is NOT encrypted
- The recovery point is present in vault tier only (Snapshots only or snapshot and vault tier are not supported)
- The recovery option is to either create a new VM or to restore disks (replace disks option replaces source data and hence the availability zone option is not applicable)
- Creating VM/disks in the same region when vault's storage redundancy is ZRS (Doesn't work when vault's storage redundancy is GRS even though the source VM is zone pinned)
- Creating VM/disks in the paired region when vault's storage redundancy is enabled for Cross-Region-Restore AND if the paired region supports zones
Cross region restore jobs once triggered, can't be canceled.
Cross-Zonal
Cross-zonal restores are a great way to ensure business continuity in case of a disaster. To restore a VM to another zone, you need to specify the TargetZoneNumber parameter in the Restore-AzRecoveryServicesBackupItem cmdlet.
The output will be similar to the following example. Cross-zonal restore is supported only in specific scenarios.

To be specific, you can only perform a cross-zonal restore if the source VM is zone pinned and not encrypted. This is a crucial requirement to keep in mind.
Additionally, the recovery point must be present in the vault tier only, not in snapshots or a combination of both. This ensures that the restore process is reliable and efficient.
You can restore a VM or disks in the same region, but only if the vault's storage redundancy is ZRS. This is a key limitation to be aware of.
Creating VMs or disks in a paired region is also supported, but only if the paired region supports zones and the vault's storage redundancy is enabled for Cross-Region Restore.
Here are the specific requirements for cross-zonal restore in a concise table:
Managed Instances
When restoring Azure VMs from backup, you can choose to restore unmanaged VMs and disks as managed. This option is available during the vault phase, not the snapshot phase.
Restoring unmanaged disks as managed disks is a convenient feature, allowing you to take full advantage of managed storage.
However, it's essential to note that this feature is not available for unmanaged encrypted VMs.
Expand your knowledge: Azure Virtual Machine Agent Status Is Not Ready.
General Information
Azure VM backups are stored in a Recovery Services vault, which is a secure location for storing and managing backups.
You can restore an Azure VM from a backup to a new or existing VM in the same or different resource group.
You can only restore an Azure VM from a backup if the backup was created using the Azure Backup service.
Azure VM backups are stored in the same region as the VM being backed up.
You can use Azure Backup to restore an Azure VM to a point in time within the last 30 days.
Azure VMs can be restored from backups using the Azure portal, PowerShell, or Azure CLI.
The restore process for an Azure VM from a backup can take several hours to complete.
Frequently Asked Questions
How long does it take to restore a VM in Azure?
Restoring a VM in Azure typically takes 10 to 30 minutes, depending on the size of the VM. This process creates a new VM from the backed-up disk or disks.
Featured Images: pexels.com

