When restoring a virtual machine from backup, you can choose to restore the VM as a Hyper-V virtual machine.
Using this option, you can duplicate a virtual machine to the Hyper-V environment, or migrate a VM to Hyper-V.
Conversion creates Hyper-V Generation 1 VMs.
You can convert VMs to Hyper-V from the following hypervisors:
VMware streaming backups or IntelliSnap backup copies
Azure Resource Manager streaming backups or IntelliSnap backup copies
Conversion is not supported from IntelliSnap snap copies.
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.
Before You Begin
VMs that are encrypted using Azure AD Base encryption (that is, using BitLocker inside the guest VM) cannot be converted, but VMs encrypted using Azure Storage Server side Encryption at Rest (that is, using Disk Encryption Sets and Customer-Managed Keys) can be restored.
When restoring an Azure virtual machine, do the following:
For Windows computers: enable the pagefile on the C: drive of the source VM. This will prevent you from receiving an error message when you reboot the destination VM.
For Linux computers : Ensure that the fstab entry of the source disk should be based on disk UUID and not disk name. If it is not based on disk UUID, then the restored VM will not boot up.
Before performing backups that you use for conversions, configure source VMs to use DHCP instead of using static IP addresses. The conversion process does not restore static IP addresses.
To get the most up-to-date instance of a virtual machine, power off the source VM and perform a backup before initiating the conversion.
The destination client must be a Hyper-V server, Windows Server 2012 R2 or later, that has the Virtual Server Agent installed.
Add a hypervisor for Hyper-V.
For information about the restore options for the Hyper-V destination, see Options for Conversion to Hyper-V.
The Hyper-V VM name can only contain alphanumeric characters or the '-' character; the name cannot contain any Unicode Transformation Format (UTF) characters.
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.
Enter the restore options for the Hyper-V VMs.
In the Restore options dialog box, provide the requested information:
From the Restore as list, select Microsoft Hyper-V.
Select a Hyper-V hypervisor from the Virtualization Client list.
Select the target host from the Destination Client list.
All Hyper-V nodes are displayed.
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.
Select Register virtual machine with failover cluster to enable the restored VM to migrate to another node in the cluster.
For Restore location, leave the default (Original folder), choose Select a folder, or select Hyper-V default folder.
Type a new virtual machine name in the Change VM display name to box.
This option does not display if you are restoring multiple VMs. If an existing VM with the same name exists on the destination host and you do not select Overwrite VMs if they already exist, the restore job fails.
For Destination folder, click Browse to select a new folder from the list. (Only enabled if you chose Select a folder.)
Click Submit to run the restore job.