Converting to Azure from Hyper-V
When restoring a Hyper-V 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.
Conversion creates Generation 1 VMs.
Before You Begin
- Configure a Microsoft Azure hypervisor.
- 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.
- For Linux VMs, integration services should be enabled on the source VMs if they will be powered on automatically after conversion.
- 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.
- The operating system for the destination VM must be an operating system that is supported for Microsoft Azure.
- Before you convert a VM from a non-Azure hypervisor using a "restore as" operation or a Live Sync 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.
- Conversion of virtual machines to Azure is not supported from IntelliSnap snap copies, but is supported from IntelliSnap backup copies.
- If the Auto option is selected and the disk operating system type cannot be determined from the configuration file, the job will fail. The job can be resubmitted by selecting the proper OS 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.
Azure VM Considerations
Before you convert a VM from a non-Azure hypervisor using a "restore as" operation or a Live Sync 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.
- 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.
- 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 Solutions > Virtualization.
The Hypervisors tab appears.
- On the Hypervisors tab, click the Hyper-V hypervisor for the source VMs.
The hypervisor details 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.
- Specify the requested information:
- From the Restore as list, select Azure Resource Manager.
- Select an Azure hypervisor from the Azure subscription list.
- Optional: By default, the preferred VSA proxy for the hypervisor is used for the restore. You can select a different proxy from the Proxy list.
- Select Power on VMs after restore to start the VM automatically.
- To delete an existing virtual machine and replace it with the restored VM, select Overwrite VMs if they already exist.
- If you are restoring multiple VMs, click the All VMs tab on the bottom left to specify configuration values for all VMs you are restoring, or the name of each VM to specify values individually. Specify the following values:
- Optional: To change the names of destination VMs, select Enable edit destination VM name.
- Optional: When restoring multiple VMs, select Prefix or Suffix and enter a string to be appended to the original display name to create new destination VM names.
- Optional: To change the name of an individual VM, enter the new display name in the Change VM display name to box.
- Enter a name in the Resource group box to specify the Resource Group for the restored VM.
- For Storage account, select the storage account for a virtual machine or disk.
You can specify any storage account in the same region as the selected resource group.
- For VM size, select a size specification for the restored virtual machine.
- For Network interface, select a network connection for the restored VM, or leave the default value of Auto Select.
- If a public IP address is not required on restored VMs, clear the Create Public IP checkbox.
- For Security Group, specify a network security group for the restored VM or leave the default value of Auto Select.
- To create the destination VM as a managed VM in Azure, select the Restore as a managed VM check box.
When you select this option, the restore operation creates virtual machine disks in the specified storage account, and then converts them to managed disks and attaches the disks to the restored virtual machine.
- 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. As noted in Description of Disk Groups in Windows Disk Management, import the entire disk group in one operation rather than performing a partial import.
Last modified: 10/1/2019 9:13:05 PM