Friday, 6 January 2023

How to restore Azure VM data in Azure portal

 

How to restore Azure VM data in Azure portal

This article describes how to restore Azure VM data from the recovery points stored in Azure Backup Recovery Services vaults.

Restore options

Azure Backup provides several ways to restore a VM.

Restore optionDetails
Create a new VMQuickly creates and gets a basic VM up and running from a restore point.

You can specify a name for the VM, select the resource group and virtual network (VNet) in which it will be placed, and specify a storage account for the restored VM. The new VM must be created in the same region as the source VM.

If a VM restore fails because an Azure VM SKU wasn't available in the specified region of Azure, or because of any other issues, Azure Backup still restores the disks in the specified resource group.
Restore diskRestores a VM disk, which can then be used to create a new VM.

Azure Backup provides a template to help you customize and create a VM.

The restore job generates a template that you can download and use to specify custom VM settings, and create a VM.

The disks are copied to the Resource Group you specify.

Alternatively, you can attach the disk to an existing VM, or create a new VM using PowerShell.

This option is useful if you want to customize the VM, add configuration settings that weren't there at the time of backup, or add settings that must be configured using the template or PowerShell.
Replace existingYou can restore a disk, and use it to replace a disk on the existing VM.

The current VM must exist. If it's been deleted, this option can't be used.

Azure Backup takes a snapshot of the existing VM before replacing the disk, and stores it in the staging location you specify. Existing disks connected to the VM are replaced with the selected restore point.

The snapshot is copied to the vault, and retained in accordance with the retention policy.

After the replace disk operation, the original disk is retained in the resource group. You can choose to manually delete the original disks if they aren't needed.

Replace existing is supported for unencrypted managed VMs, including VMs created using custom images. It's unsupported for classic VMs, unmanaged VMs, and generalized VMs.

If the restore point has more or less disks than the current VM, then the number of disks in the restore point will only reflect the VM configuration.

Replace existing is also supported for VMs with linked resources, like user-assigned managed-identity or Key Vault.
Cross Region (secondary region)Cross Region restore can be used to restore Azure VMs in the secondary region, which is an Azure paired region.

You can restore all the Azure VMs for the selected recovery point if the backup is done in the secondary region.

During the backup, snapshots aren't replicated to the secondary region. Only the data stored in the vault is replicated. So secondary region restores are only vault tier restores. The restore time for the secondary region will be almost the same as the vault tier restore time for the primary region.

This feature is available for the options below:

Create a VM
Restore Disks

We don't currently support the Replace existing disks option.

Permissions
The restore operation on secondary region can be performed by Backup Admins and App admins.
Cross Subscription Restore (preview)Allows you to restore Azure Virtual Machines or disks to any subscription (as per the Azure RBAC capabilities) from restore points.

You can trigger Cross Subscription Restore for managed virtual machines only.

Cross Subscription Restore is supported for Restore with Managed System Identities (MSI).

It's unsupported for snapshots and secondary region restores.

It's unsupported for unmanaged VMsEncrypted Azure VMs and Trusted Launch VMs.
Cross Zonal RestoreAllows you to restore Azure Virtual Machines or disks pinned to any zone to different available zones (as per the Azure RBAC capabilities) from restore points.

You can trigger Cross Zonal Restore for managed virtual machines only.

Cross Zonal Restore is supported for Restore with Managed System Identities (MSI).

Cross Zonal Restore supports restore of an Azure zone pinned/non-zone pinned VM from a vault with Zonal-redundant storage (ZRS) enabled. Learn how to set Storage Redundancy.

It's supported to restore an Azure zone pinned VM only from a vault with Cross Region Restore (CRR) (if the secondary region supports zones) or Zone Redundant Storage (ZRS) enabled.

Cross Zonal Restore is supported from secondary regions.

It's unsupported from snapshots restore point.

It's unsupported for Encrypted Azure VMs and Trusted Launch VMs.

 Tip

To receive alerts/notifications when a restore operation fails, use Azure Monitor alerts for Azure Backup. This helps you to monitor such failures and take necessary actions to remediate the issues.

 Note

You can also recover specific files and folders on an Azure VM. Learn more.

Storage accounts

Some details about storage accounts:

  • Create VM: When you create a new VM, the VM will be placed in the storage account you specify.
  • Restore disk: When you restore a disk, the disk is copied to the storage account you specify. The restore job generates a template that you can download and use to specify custom VM settings. This template is placed in the specified storage account.
  • Replace disk: When you replace a disk in an existing VM, Azure Backup takes a snapshot of the existing VM before replacing the disk. The snapshot is also copied to the Recovery Services vault through data transfer, as a background process. However, once the snapshot phase is completed, the replace disks operation is triggered. After the replace disk operation, the disks of the source Azure VM are left in the specified Resource group for your operation and the VHDs are stored in the specified storage account. You can choose to delete or retain these VHDs and disks.
  • Storage account location: The storage account must be in the same region as the vault. Only these accounts are displayed. If there are no storage accounts in the location, you need to create one.
  • Storage type: Blob storage isn't supported.
  • Storage redundancy: Zone redundant storage (ZRS) isn't supported. The replication and redundancy information for the account is shown in parentheses after the account name.
  • Premium storage:
    • When you restore non-premium VMs, premium storage accounts aren't supported.
    • When you restore managed VMs, premium storage accounts configured with network rules aren't supported.

Before you start

To restore a VM (create a new VM), make sure you have the correct Azure role-based access control (Azure RBAC) permissions for the Restore VM operation.

If you don't have permissions, you can restore a disk, and then after the disk is restored, you can use the template that was generated as part of the restore operation to create a new VM.

 Note

The functionality described in the following sections can also be accessed via Backup center. Backup center is a single unified management experience in Azure. It enables enterprises to govern, monitor, operate, and analyze backups at scale. With this solution, you can perform most of the key backup management operations without being limited to the scope of an individual vault.

Select a restore point

  1. Navigate to Backup center in the Azure portal and click Restore from the Overview tab.

    Navigate to restore

  2. Select Azure Virtual machines as the Datasource type, and then select a Backup instance.

    Selecting datasource type

  3. Select a VM and click Continue.

  4. In the next screen that appears, select a restore point to use for the recovery.

    Select restore point for a virtual machine

Choose a VM restore configuration

  1. In Restore Virtual Machine, select a restore option:

    • Create new: Use this option if you want to create a new VM. You can create a VM with simple settings, or restore a disk and create a customized VM.

    • Replace existing: Use this option if you want to replace disks on an existing VM.

      Restore Virtual machine configuration wizard

  2. Specify settings for your selected restore option.

Create a VM

As one of the restore options, you can create a VM quickly with basic settings from a restore point.

  1. In Restore Virtual Machine > Create new > Restore Type, select Create new virtual machine.

  2. In Virtual machine name, specify a VM that doesn't exist in the subscription.

  3. In Resource group, select an existing resource group for the new VM, or create a new one with a globally unique name. If you assign a name that already exists, Azure assigns the group the same name as the VM.

  4. In Virtual network, select the VNet in which the VM will be placed. All VNets associated with the subscription in the same location as the vault, which is active and not attached with any affinity group, are displayed. Select the subnet.

    The first subnet is selected by default.

  5. In Staging Location, specify the storage account for the VM. Learn more.

    Restore configuration wizard - choose restore options

  6. Choose the required subscription from the Subscription drop-down list to restore an Azure VM to a different subscription.

    Azure Backup now supports Cross Subscription Restore (CSR), you can now restore an Azure VM using a recovery point from default subscription to another. Default subscription is the subscription where recovery point is available.

    The following screenshot lists all subscriptions under the tenant where you've permissions, which enable you to restore the Azure VM to another subscription.

    Screenshot showing the list of all subscriptions under the tenant where you have permissions.

  7. Choose the required zone from the Availability Zone drop-down list to restore an Azure VM pinned to any zone to a different zone.

    Azure Backup now supports Cross Zonal Restore (CZR), you can now restore an Azure VM from the default zone to any available zones. Default zone is the zone in which Azure VM is running.

    The following screenshot lists all zones that enable you to restore Azure VM to another zone.

    Screenshot showing you how to select an available zone for VM restore.

     Note

    Azure Backup supports CZR only for vaults with ZRS or CRR redundancy.

  8. Select Restore to trigger the restore operation.

 Note

Before you modify any NSG settings, ensure the VM restore operation is complete. Learn about tracking the restore operation.

Restore disks

As one of the restore options, you can create a disk from a restore point. Then with the disk, you can do one of the following actions:

  • Use the template that's generated during the restore operation to customize settings, and trigger VM deployment. You edit the default template settings, and submit the template for VM deployment.
  • Attach restored disks to an existing VM.
  • Create a new VM from the restored disks using PowerShell.
  1. In Restore configuration > Create new > Restore Type, select Restore disks.

  2. In Resource group, select an existing resource group for the restored disks, or create a new one with a globally unique name.

  3. In Staging location, specify the storage account to which to copy the VHDs. Learn more.

    Screenshot showing to select Resource disks.

  4. Choose the required subscription from the Subscription drop-down list to restore the VM disks to a different subscription.

    Azure Backup now supports Cross Subscription Restore (CSR). Like Azure VM, you can now restore Azure VM disks using a recovery point from default subscription to another. Default subscription is the subscription where recovery point is available.

  5. Choose the required zone from the Availability Zone drop-down list to restore the VM disks to a different zone.

    Azure Backup now supports Cross Zonal Restore (CZR). Like Azure VM, you can now restore Azure VM disks from the default zone to any available zones. Default zone is the zone in which the VM disks reside.

     Note

    Azure Backup supports CZR only for vaults with ZRS or CRR redundancy.

  6. Select Restore to trigger the restore operation.

When your virtual machine uses managed disks and you select the Create virtual machine option, Azure Backup doesn't use the specified storage account. In the case of Restore disks and Instant Restore, the storage account is used only for storing the template. Managed disks are created in the specified resource group. When your virtual machine uses unmanaged disks, they're restored as blobs to the storage account.

While you restore disks for a Managed VM from a Vault-Standard recovery point, it restores the Managed disk and Azure Resource Manager (ARM) templates, along with the VHD files of the disks in staging location. If you restore disks from an Instant recovery point, it restores the Managed disks and ARM templates only.

 Note

  • For restoring disk from a Vault-Standard recovery point that is/was greater than 4 TB, Azure Backup doesn't restore the VHD files.
  • For information on managed/premium disk performance after restored via Azure Backup, see the Latency section.

Use templates to customize a restored VM

After the disk is restored, use the template that was generated as part of the restore operation to customize and create a new VM:

  1. In Backup Jobs, select the relevant restore job.

  2. In Restore, select Deploy Template to initiate template deployment.

    Restore job drill-down

     Note

    For a shared access signature (SAS) that has Allow storage account key access set to disabled, the template won't deploy when you select Deploy Template.

  3. To customize the VM setting provided in the template, select Edit template. If you want to add more customizations, select Edit parameters.

    Load template deployment

  4. Enter the custom values for the VM, accept the Terms and Conditions and select Purchase.

    Submit template deployment

Replace existing disks

As one of the restore options, you can replace an existing VM disk with the selected restore point. Review all restore options.

  1. In Restore configuration, select Replace existing.

  2. In Restore Type, select Replace disk/s. This is the restore point that will be used replace existing VM disks.

  3. In Staging Location, specify where snapshots of the current managed disks should be saved during the restore process. Learn more.

    Restore configuration wizard Replace Existing

Cross Region Restore

As one of the restore options, Cross Region Restore (CRR) allows you to restore Azure VMs in a secondary region, which is an Azure paired region.

To begin using the feature, read the Before You Begin section.

To see if CRR is enabled, follow the instructions in Configure Cross Region Restore.

View backup items in secondary region

If CRR is enabled, you can view the backup items in the secondary region.

  1. From the portal, go to Recovery Services vault > Backup items.
  2. Select Secondary Region to view the items in the secondary region.

 Note

Only Backup Management Types supporting the CRR feature will be shown in the list. Currently, only support for restoring secondary region data to a secondary region is allowed.

CRR for Azure VMs is supported for Azure Managed VMs (including encrypted Azure VMs). See the management types that support Cross Region Restore.

Virtual machines in secondary region

Select Secondary Region

Restore in secondary region

The secondary region restore user experience will be similar to the primary region restore user experience. When configuring details in the Restore Configuration pane to configure your restore, you'll be prompted to provide only secondary region parameters.

Currently, secondary region RPO is 36 hours. This is because the RPO in the primary region is 24 hours and can take up to 12 hours to replicate the backup data from the primary to the secondary region.

Choose VM to restore

Select restore point

 Note

  • You can cancel the restore job till the data transfer phase. Once it enters VM creation phase, you can't cancel the restore job.
  • The Cross Region Restore feature restores CMK (customer-managed keys) enabled Azure VMs, which aren't backed-up in a CMK enabled Recovery Services vault, 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.
  • While restoring an Azure VM, Azure Backup configures the virtual network settings in the secondary region automatically. If you are restoring disks while deploying the template, ensure to provide the virtual network settings, corresponding to 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.
  • For Cross Region Restores, the Staging Location (that is the storage account location) must be in the region that the Recovery Services vault treats as the secondary region. For example, a Recovery Services vault is located in East US 2 region (with Geo-Redundancy and Cross Region Restore enabled). This means that the secondary region would be Central US. Therefore, you need to create a storage account in Central US to perform a Cross Region Restore of the VM.
    Learn more about Azure cross-region replication pairings for all geographies.

Azure zone pinned VMs can be restored in any availability zones of the same region.

In the restore process, you'll see the option Availability Zone. You'll see your default zone first. To choose a different zone, choose the number of the zone of your choice. If the pinned zone is unavailable, you won't be able to restore the data to another zone because the backed-up data isn't zonally replicated. The restore in availability zones is possible from recovery points in vault tier only.

In summary, the Availability Zone will only appear when

  • 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

Choose availability zone

 Note

Cross-region restore jobs can't be canceled.

Monitoring secondary region restore jobs

  1. From the portal, go to Recovery Services vault > Backup Jobs

  2. Select Secondary Region to view the items in the secondary region.

    Backup jobs filtered

Restoring unmanaged VMs and disks as managed

You're provided with an option to restore unmanaged disks as managed disks during restore. By default, the unmanaged VMs / disks are restored as unmanaged VMs / disks. However, if you choose to restore as managed VMs / disks, it's now possible to do so. These restore operations aren't triggered from the snapshot phase but only from the vault phase. This feature isn't available for unmanaged encrypted VMs.

Restore as managed disks

Restore VMs with special configurations

There are many common scenarios in which you might need to restore VMs.

ScenarioGuidance
Restore VMs using Hybrid Use BenefitIf a Windows VM uses Hybrid Use Benefit (HUB) licensing, restore the disks, and create a new VM using the provided template (with License Type set to Windows_Server), or PowerShell. This setting can also be applied after creating the VM.
Restore VMs during an Azure datacenter disasterIf the vault uses GRS and the primary datacenter for the VM goes down, Azure Backup supports restoring backed-up VMs to the paired datacenter. You select a storage account in the paired datacenter, and restore as normal. Azure Backup uses the compute service in the paired region to create the restored VM. Learn more about datacenter resiliency.

If the vault uses GRS, you can choose the new feature, Cross Region Restore. This lets you restore to a second region in either full or partial outage scenarios, or even if there's no outage at all.
Bare-metal restoreThe major difference between Azure VMs and on-premises hypervisors is that there's no VM console available in Azure. A console is required for certain scenarios, such as recovering by using a bare-metal recovery (BMR)-type backup. However, VM restore from the vault is a full replacement for BMR.
Restore VMs with special network configurationsSpecial network configurations include VMs using internal or external load balancing, using multiple NICS, or multiple reserved IP addresses. You restore these VMs by using the restore disk option. This option makes a copy of the VHDs into the specified storage account, and you can then create a VM with an internal or external load balancer, multiple NICS, or multiple reserved IP addresses, in accordance with your configuration.
Network Security Group (NSG) on NIC/SubnetAzure VM backup supports Backup and Restore of NSG information at vnet, subnet, and NIC level.
Zone Pinned VMsIf you back up an Azure VM that's pinned to a zone (with Azure Backup), then you can restore it in the same zone where it was pinned. Learn more
Restore VM in any availability setWhen you restore a VM from the portal, there's no option to choose an availability set. A restored VM doesn't have an availability set. If you use the restore disk option, then you can specify an availability set when you create a VM from the disk using the provided template or PowerShell.
Restore special VMs such as SQL VMsIf you're backing up a SQL VM using Azure VM backup and then use the restore VM option or create a VM after restoring disks, then the newly created VM must be registered with the SQL provider as mentioned here. This will convert the restored VM into a SQL VM.

Restore domain controller VMs

ScenarioGuidance
Restore a single domain controller VM in a single domainRestore the VM like any other VM. Note that:

From an Active Directory perspective, the Azure VM is like any other VM.

Directory Services Restore Mode (DSRM) is also available, so all Active Directory recovery scenarios are viable. Learn more about backup and restore considerations for virtualized domain controllers.
Restore multiple domain controller VMs in a single domainIf other domain controllers in the same domain can be reached over the network, the domain controller can be restored like any VM. If it's the last remaining domain controller in the domain, or a recovery in an isolated network is performed, use a forest recovery.
Restore a single domain controller VM in a multiple domain configurationRestore the disks and create a VM by using PowerShell
Restore multiple domains in one forestWe recommend a forest recovery.

For more information, see Back up and restore Active Directory domain controllers.

Restore VMs with managed identities

Managed identities eliminate the need for the user to maintain the credentials. Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory (Azure AD) authentication.

Azure Backup offers the flexibility to restore the managed Azure VM with managed identities. You can choose to select system-managed identities or user-managed identities as shown in the figure below. This is introduced as one of the input parameters in the Restore configuration blade of Azure VM. Managed identities used as one of the input parameters is only used for accessing the storage accounts, which are used as staging location during restore and not for any other Azure resource controlling. These managed identities have to be associated to the vault.

Screenshot for choice to select system-managed identities or user-managed identities.

If you choose to select system-assigned or user-assigned managed identities, check for the below actions for managed identity on the target staging Storage Account.

JSON
"permissions": [
            {
                "actions": [
                    "Microsoft.Authorization/*/read",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/delete",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/read",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/write"
                ],
                "notActions": [],
                "dataActions": [
                    "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write",
                    "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action"
                ],
                "notDataActions": []
            }

Or, add 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.

Screenshot for adding the role assignment on the staging location.

You can also select the user-managed identity by providing the input as their MSI Resource ID as provided in the figure below.

Screenshot for selecting the user-managed identity by providing the input as their MSI Resource ID.

 Note

The support is available for only managed VMs, and not supported for classic VMs and unmanaged VMs. For the storage accounts that are restricted with firewalls, system MSI is only supported.

Cross Region Restore isn't supported with managed identities.

Currently, this is available in all Azure public and national cloud regions.

Track the restore operation

After you trigger the restore operation, the backup service creates a job for tracking. Azure Backup displays notifications about the job in the portal. If they aren't visible, select the Notifications symbol, and then select More events in the activity log to see the Restore Process Status.

Restore triggered

Track restore as follows:

  1. To view operations for the job, select the notifications hyperlink. Alternatively, in the vault, select Backup jobs, and then select the relevant VM.

    List of VMs in a vault

  2. To monitor restore progress, select any restore job with a status of In-progress. This displays the progress bar, which displays information about the restore progress:

    • Estimated time of restore: Initially provides the time taken to complete the restore operation. As the operation progresses, the time taken reduces and reaches zero when the restore operation finishes.
    • Percentage of restore. Shows the percentage of restore operation that's done.
    • Number of bytes transferred: If you're restoring by creating a new VM, it shows the bytes that were transferred against the total number of bytes to be transferred.

Post-restore steps

There are a few things to note after restoring a VM:

  • Extensions present during the backup configuration are installed, but not enabled. If you see an issue, reinstall the extensions.

  • If the backed-up VM had a static IP address, the restored VM will have a dynamic IP address to avoid conflict. You can add a static IP address to the restored VM.

  • A restored VM doesn't have an availability set. If you use the restore disk option, then you can specify an availability set when you create a VM from the disk using the provided template or PowerShell.

  • If you use 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. We recommend using SSH keys on these distributions, so you don't need to reset the password after the restore.

  • If you're unable to access a VM once restored because the VM has a broken relationship with the domain controller, then follow the steps below to bring up the VM:

    • Attach OS disk as a data disk to a recovered VM.
    • Manually install VM agent if Azure Agent is found to be unresponsive by following this link.
    • Enable Serial Console access on VM to allow command-line access to VM
    cmd
      bcdedit /store <drive letter>:\boot\bcd /enum
      bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /set {bootmgr} displaybootmenu yes
      bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /set {bootmgr} timeout 5
      bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /set {bootmgr} bootems yes
      bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /ems {<<BOOT LOADER IDENTIFIER>>} ON
      bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /emssettings EMSPORT:1 EMSBAUDRATE:115200
    
    • When the VM is rebuilt use Azure portal to reset local administrator account and password

    • Use Serial console access and CMD to disjoin VM from domain

      cmd
      cmd /c "netdom remove <<MachineName>> /domain:<<DomainName>> /userD:<<DomainAdminhere>> /passwordD:<<PasswordHere>> /reboot:10 /Force"
      
  • Once the VM is disjoined and restarted, you'll be able to successfully RDP to the VM with local admin credentials and rejoin VM back to domain successfully.

Backing up restored VMs

  • If you restored a VM to the same resource group with the same name as the originally backed-up VM, backup continues on the VM after restore.
  • If you restored the VM to a different resource group or you specified a different name for the restored VM, you need to set up backup for the restored VM.

Thursday, 5 January 2023

Azure Migrate

 Azure Migrate provides a centralized hub to assess and migrate to Azure on-premises servers, infrastructure, applications, and data. This service:

  • Assesses whether on-premises servers are ready for migration to Azure.
  • Estimates the size of Azure virtual machines (VMs), Azure SQL configuration, or number of Azure VMware Solution nodes after migration.
  • Estimates costs for running on-premises servers in Azure.
  • Identifies cross-server dependencies and optimization strategies for moving interdependent servers to Azure.

If you're considering a lift-and-shift approach or are in the early assessment stages of migration, this service is for you. After completing the assessment, use Azure Migrate to execute the migration.

Azure Migrate overview

Create a new project

Begin server discovery, assessment, and migration by using the following steps for Azure Migrate:

  1. Select Azure Migrate.
  2. In Overview, select Discover, assess and migrate.
  3. Select Add tools.
  4. In Project, select your Azure subscription, then create a resource group if you don't have one.
  5. In Project Details, specify the project name and geography where you want to create the project, then select Create.
  6. After creating the project, tools are visible in project and user can start with Discovery.

Dependency analysis

Dependency analysis identifies dependencies between discovered on-premises servers. It provides the following advantages:

  • Gather servers into groups for a better assessment.
  • Identify servers to migrate together. This step is useful if you're unsure which servers are part of an app deployment that you want to migrate.
  • Identify whether servers are in use and which servers you can decommission instead of migrate.
  • Analyze dependencies to ensure that nothing is left behind and avoid surprise outages after migration.

Azure Migrate

Azure Migrate is a one-stop, extensible migration experience. Use Azure Migrate to track your Azure migration journey from assessment to migration. You can choose your migration tools, and track your migration progress in the tools.

Azure Migrate is a centralized hub where you can assess and then migrate on-premises servers, infrastructure, applications, and data to Azure. Azure Migrate offers these features:

  • Unified platform, with assessment, migration, and progress tracking.
  • Enhanced assessment and migration capabilities:
    • Assess on-premises servers, including SQL Server instances, and migrate them to Azure Virtual Machines or Azure VMware Solution.
    • Agentless migration of VMware virtual machines to Azure.
    • Assess on-premises databases and migrate them to Azure SQL Database or Azure SQL Managed Instance.
    • Assess on-premises web applications and migrate them to Azure App Service by using Azure App Service Migration Assistant.
    • Assess your on-premises virtual desktop infrastructure and migrate it to Azure Virtual Desktop.
    • Migrate large amounts of data to Azure quickly and cost-effectively using Azure Data Box products.
  • Extensible approach with ISV integration (such as Cloudamize).

To perform a migration using Azure Migrate, follow these steps:

  1. Search for Azure Migrate under All services. Select Azure Migrate to continue.
  2. In Get started, select Discover, assess and migrate.
  3. Select Add tools.
  4. In Project, select your Azure subscription, then create a resource group if you don't have one.
  5. In Project Details, specify the project name and geography where you want to create the project, then select Create.
  6. After you create the project, tools are visible in the project, and the user can start with discovery.

 Note

For guidance specific to your scenario, see the tutorials and Azure Migrate documentation.

Learn more

Azure Database Migration Service

Azure Database Migration Service is a fully managed service that enables seamless migrations from multiple database sources to Azure data platforms, with minimal downtime (online migrations). Database Migration Service performs all of the required steps. You can initiate your migration projects assured that the process takes advantage of best practices recommended by Microsoft.

Create an Azure Database Migration Service instance

The first time you use Azure Database Migration Service, you must register the resource provider for your Azure subscription:

  1. Select All services. Under General, select Subscriptions, and choose the subscription to use.
  2. Select Resource providers.
  3. Search for migration. In the search results, to the right of Microsoft.DataMigration, select Register.

After you register the resource provider, create an instance of Azure Database Migration Service.

  1. Select + Create a resource and search Marketplace for Azure Database Migration Service.
  2. Complete the Create Migration Service wizard, then select Create.

The service is now ready to migrate the supported source databases to target platforms such as SQL Server, MySQL, PostgreSQL, or MongoDB.

Azure App Service Migration Assistant

The Azure App Service Migration Assistant is part of a larger suite of applications that help organizations with their transition to the cloud. The Migration Assistant provides a guided, wizard-like experience that performs two tasks.

  1. Azure App Service Migration Assistant assesses a specific web app that's installed on a computer running Windows Server. Migration Assistant runs pre-migration compatibility checks on the web app to see whether it can migrate to Azure App Service without modification.
  2. If the assessment shows that the web app can be migrated without being modified, Migration Assistant migrates the app. You'll need to give Migration Assistant access to your Azure account. You also select the resource group to use and enter a name for the web app, among other details.

Alternatively, the Migration Assistant generates an Azure Resource Manager template that you can use to migrate the web application in a more automated and repeatable way.

Migrate a web app to Azure App Service

The Migration Assistant begins the migration process by collecting key details from you about your Azure account and then does the migration.

First, you'll sign in to your Azure account and associate your Migration Assistant session with your account by using a unique code. Next, you'll choose the subscription, the resource group, and the website's domain name. You can choose to create a new Azure App Service plan to host the web app or select an existing plan. The choice you make affects the geographical region from which your web app is hosted. You'll also have a chance to associate this migration effort with an existing Azure Migrate project. Finally, you can either choose to skip database setup or choose to set up a hybrid connection to enable a database connection.

After the Migration Assistant collects and verifies your selections, it creates required Azure App Service resources in the selected region and resource group. It zips the web app's source files and uses the Azure App Service deployment API to deploy the files. It completes final, optional migration steps, like helping you set up a hybrid connection.

After a successful migration, some post-migration tasks might include:

  • Manually move application settings and connection strings in your web.config file to Azure App Service.
  • Migrate data from an on-premises SQL Server instance to an Azure SQL Database instance.
  • Set up an SSL certificate.
  • Set up custom domain names.
  • Set up permissions in Azure Active Directory.

You might also decide to change the Azure App Service hosting plan and other settings like autoscaling and deployment slots.

For more information, see Migrate ASP.NET applications to Azure.

Data Migration Assistant

Data Migration Assistant helps you upgrade to a modern data platform. It detects compatibility issues that can affect database functionality in your new version of SQL Server or Azure SQL Database. Data Migration Assistant recommends performance and reliability improvements for your target environment. You can use Data Migration Assistant to move your schema, data, and uncontained objects from your source server to your target server.

Data Migration Assistant is integrated with Azure Migrate, so you can track assessment progress in the Azure Migrate dashboard. Open Data Migration Assistant in Azure Migrate by adding the Azure Migrate database assessment tool. Add your database assessment to Azure Migrate by selecting Upload to Azure Migrate in Data Migration Assistant.

 Note

For large migrations (in terms of number and size of databases), we recommend that you use Azure Database Migration Service, which can migrate databases at scale.

To begin using Data Migration Assistant:

  1. Download and install Data Migration Assistant from the Microsoft download center.
  2. Create an assessment by selecting the New (+) icon, then select the Assessment project type.
  3. Set the source and target server type, then select Create.
  4. Configure the assessment options as required (recommend all defaults).
  5. Add the databases to assess.
  6. Select Next to start the assessment.
  7. View results in Data Migration Assistant.

For an enterprise, we recommend following the approach outlined in Assess an enterprise and consolidate assessment reports with DMA. You assess multiple servers, combine the reports, and then use provided Power BI reports to analyze the results.

For more information, including detailed usage steps, see these resources:

SQL Server Migration Assistant

Microsoft SQL Server Migration Assistant (SSMA) automates database migration to SQL Server from Microsoft access, DB2, MySQL, Oracle, and SAP ASE. The general concept is to collect, assess, and then review with these tools. But due to the variances in the process for each of the source systems, review the detailed SQL Server Migration Assistant documentation.

For more information, see SQL Server Migration Assistant overview.

Database Experimentation Assistant

Database Experimentation Assistant is an A/B testing solution for SQL Server upgrades. Database Experimentation Assistant helps you evaluate a targeted version of SQL for a specific workload. If you're upgrading from an earlier version of SQL Server (SQL Server 2005 and later) to any current version of SQL Server, you can use these analysis metrics.

The Database Experimentation Assistant contains the following workflow activities:

  • Capture: The first step of SQL Server A/B testing is to capture a trace on your source server. Usually, the source server is the production server.
  • Replay: The second step of SQL Server A/B testing is to replay the trace file that was captured to your target servers. Then, collect extensive traces from the replays for analysis.
  • Analysis: The final step is to generate an analysis report by using the replay traces. The analysis report can help you gain insight about the performance implications of the proposed change.


Azure Cosmos DB data migration tool

Azure Cosmos DB data migration imports data from various sources into Azure Cosmos DB collections and tables. You can import from JSON files, CSV files, SQL, MongoDB, Azure Table Storage, Amazon DynamoDB, and even Azure Cosmos DB for NoSQL collections. You can also use the data migration tool when migrating from a single partition collection to a multipartition collection in Azure Cosmos DB for NoSQL.



The tools in this article include:

  • Azure Migrate
  • Azure pricing calculator
  • Azure TCO calculator
  • Azure Cost Management + Billing
  • Azure Advisor

The processes described in this article may also require a partnership with IT managers, finance, or line-of-business application owners.

Prior to migration of any asset (infrastructure, app, or data), there is an opportunity to estimate costs and refine sizing based on observed performance criteria for those assets. Estimating costs serves two purposes: it allows for cost control, and it provides a checkpoint to ensure that current budgets account for necessary performance requirements.

Cost calculators

For manual cost calculations, there are two handy calculators that can provide a quick cost estimate based on the architecture of the workload to be migrated.

These manual cost calculators can be used on their own to forecast potential spend and savings. They can also be used in conjunction with the cost forecasting tools of Azure Migrate to adjust the cost expectations to fit alternative architectures or performance constraints.

Azure Migrate calculations

Prerequisites: The remainder of this tab assumes the reader has already populated Azure Migrate with a collection of assets (infrastructure, apps, and data) to be migrated. The prior article on assessments provides instructions on collecting the initial data. Once the data is populated, follow the next few steps to estimate monthly costs based on the data collected.

Azure Migrate calculates monthly cost estimates based on data captured by the collector and Service Map. The following steps will load the cost estimates:

  1. Navigate to Azure Migrate assessment in the portal.
  2. In the project Overview page, select + Create assessment.
  3. Select View all to review the assessment properties.
  4. Create the group, and specify a group name.
  5. Select the machines that you want to add to the group.
  6. Select Create assessment, to create the group and the assessment.
  7. After the assessment is created, view it in Overview > Dashboard.
  8. In the Assessment details section of the portal navigation, select Cost details.

The resulting estimate, pictured below, identifies the monthly costs of compute and storage, which often represent the largest portion of cloud costs.

Cost details view

Figure 1: Diagram of the cost details view of an assessment in Azure Migrate.