When restoring a virtual machine from backup, you can choose to restore the VM as an Azure Resource Manager VM.
You can use this feature to migrate virtual machines to the Azure cloud.
You can convert VMs to Azure Resource Manager from the following hypervisors:
Amazon streaming backups or IntelliSnap backup copies
Azure Stack Hub streaming backups or IntelliSnap backup copies
Hyper-V streaming backups or IntelliSnap backup copies
Nutanix AHV streaming backups or IntelliSnap backup copies
Oracle VM streaming backups
VMware streaming backups or IntelliSnap backup copies
Conversion is not supported from IntelliSnap snap copies.
Before You Begin
Azure Standard or Premium general-purpose storage accounts are required for VM conversion to Azure.
To enable deployment in Azure Resource Manager, define one or more resource groups for the application associated with the Azure virtualization client.
Before performing backups of source VMs:
Remote Desktop Protocol (RDP) must be enabled on the source VM and the user performing the conversion should be able to log in to the VM.
If a Nutanix AHV source VM has a firewall configured, disable the firewall before performing the backup that is used for conversion.
For Linux VMs, integration services should be enabled on the source VMs if they will be powered on automatically after conversion.
For Windows VMs, to enable disks to be brought online as part of the conversion, enable SAN policy for the source VM. You can use this workaround for disks that are not shared.
Open a command line or PowerShell session locally on the VM.
Open the disk partition tool:
Verify that the SAN policy is set to Offline Shared:
SAN Policy : Offline Shared
Change the policy to OnlineAll:
DISKPART> SAN POLICY=OnlineAll
The operating system for the destination VM must be an operating system that is supported for Microsoft Azure.
For information about the restore options for the Azure destination, see Options for Conversion to Azure.
Before you replicate or convert Red Hat Linux VMs to Azure, add required Hyper-V drivers to the VMs and perform a new backup of the VMs. For more information, see Linux VMs do not boot or are unreachable after conversion or replication to Azure.
If the Auto option is selected and the disk operating system type cannot be determined from the configuration file, the job fails. Resubmit the job and select the required operating system during the restore.
The Power on VMs after restore option is selected by default. If this option is not selected when the VM is restored, only the operating system disk is registered, and any remaining disks are uploaded to the Azure storage account. In this case, VHDs must be created manually through the Azure management portal, using the Create VHD option on the Disk tab:
For each disk, browse to the storage location and open the disk from which the VHD is to be created. Opening the disk registers it as a VHD, so that it can be attached to a new or existing VM.
Select the VM to which the VHD is to be attached, and attach one or more registered VHDs from the storage location.
If a Nutanix AHV source VM has multiple disks, and the operating system disk is not marked, the conversion marks the first disk as the operating system disk. The first disk is identified based on the disk type in the following order of preference: 1) IDE, 2) SCSI, 3) SATA.
In this situation, the conversion succeeds, and you can change the operating system disk as needed for the converted VM.
Azure VM Considerations
Before you convert a VM from a non-Azure hypervisor using a "restore as" operation or a replication operation, verify that the source VM meets the requirements for non-endorsed distributions. This verification is important because Linux VMs that are based on an endorsed distribution of Microsoft Azure have the prerequisites that enable them to run on Azure, but VMs that originate from other hypervisors might not. For more information, see Information for Non-Endorsed Distributions.
Azure Stack Hub to Azure conversion is not supported for bring your own subscription (BYOS) images.
The VM name can only contain alphanumeric characters or the '-' character; the name cannot contain any Unicode Transformation Format (UTF) characters.
The RAM and disk specification for the source VM should match the format of the Azure destination VM. For example, if the source VM RAM is less than 1.75 GB, only two disks will be uploaded to Azure if Auto is selected as the VM size for the conversion, because of Azure restrictions.
To manage storage and associated costs, for Azure managed disks, you can specify a disk type (Standard HDD, Standard SSD, or Premium SSD) for the Azure destination VM.
Note: If the size of the destination VM does not support the Premium SSD disk type, the VM is deployed with the Standard HDD disk type.
Virtual machines with a VM size of A8 or A9 can only be created in new Azure cloud services without any instances. You cannot create A8 or A9 VMs in existing cloud services.
Before you perform a backup for a Linux source VM that runs CentOS or Red Hat, verify that required Hyper-V drivers are installed on the source VM. Those drivers must be present on the source VM backup in order to boot the VM after conversion.
Enable Changed Block Tracking (CBT) for the source VM.
Take a snapshot of the source VM.
Run the following command to modify the boot image:
sudo dracut -f -v -N
Run the following command to verify that Hyper-V drivers are present in the boot image:
lsinitrd | grep hv
Verify that no dracut conf files (for example, /usr/lib/dracut/dracut.conf.d/01-dist.conf) contain the following line:
Run a new backup to use for the conversion.
For more information, see Prepare a CentOS-based virtual machine for Azure.
From the navigation pane, go to Protect > Virtualization.
The Virtual machines page appears.
On the Hypervisors tab, click the hypervisor.
The hypervisor page appears. The VM groups area displays summary information for any existing VM groups.
In the VM groups area, click Restore for the VM group that contains the virtual machine.
In the Select restore type page, select Full virtual machine to restore one or more full virtual machines.
In the Restore page, expand the tree on the left and select the objects to be restored on the right. Select an item or click on an entry in the Name column to browse within an item.
In the top right corner of the page, a "Showing" message indicates what backup data is being displayed. You can click the down arrow beside this message and select any of the following options:
Show latest backups: Only display data for the most recent backups.
Show backups as of a specific date: Only display data up to the date you specify.
Show backups for a date range: Only display data within the data range you specify.
The Restore options dialog box appears.
Enter the restore options for the Azure VM.
Click Submit to run the restore job.
If the source VM had dynamic disks that use simple disk spanning, RAID, striped, or mirrored layouts, after VM conversion, the disks in the converted VM might be marked as Failed in Disk Management. You must bring these disks online manually using Disk Management. To bring the disks back online, perform an Import Foreign Disks operation on the guest VM for the disk group that contains failed disks. Import the entire disk group in one operation rather than performing a partial import.