Migrate Hyper-V VMs to Azure Local using Azure Migrate (preview)

Applies to: Azure Local, version 23H2

This article describes how to migrate Hyper-V virtual machines (VMs) to Azure Local using Azure Migrate and includes the steps to verify the migration.

Important

This feature is currently in PREVIEW. See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.

Before you begin

Before you migrate your VMs:

Migrate VMs

  1. In the Azure portal, go to your Azure Migrate project > Servers, databases and web apps.

  2. On the Migration tools tile, select Overview.

    Screenshot Azure Migrate project > Server, databases and webapps in Azure portal.

  3. Go to Azure Local migration > Replications.

    Screenshot showing Azure Local migration > Replications in Azure portal.

  4. From the top command bar of the Replications page, select Migrate to migrate multiple VMs that are ready.

    Screenshot Azure Migrate: Migration and modernization > Replications in Azure portal with Migrate option selected.

    Alternatively, you can select Migrate from the context menu for a single VM that is ready to migrate.

    Screenshot of Migrate page in Azure portal with Migrate option selected from context menu.

  5. On the Migrate page:

    1. Review the details of the VMs that you want to migrate.
    2. Select whether or not you would like to shut down VMs before migration. We recommend that you shut down VMs as that ensures no data is lost.
    3. Select Migrate to start the migration. A notification appears that the migration has started.

    Screenshot of Migrate page with context menu in Azure portal.

  6. Refresh the page periodically to view the migration status. You can also select the migration status at any time to view the progress details.

    Screenshot of Migrate page with migration status selected in Azure portal.

    The Planned failover blade indicates the various migration tasks in progress. Screenshot of Planned failover for a VM in Azure portal.

    The migration status changes from Migration in progress to Completed when the migration is complete.

    Screenshot of Migrate page with Migration status as completed in Azure portal.

Once the migration is complete, the VMs are running on your Azure Local instance. You can view the VMs in the Azure portal.

Verify and complete migration

Important

After verifying the status of the migrated VM, be sure to complete migration as detailed below. Failing to do so may lead to unexpected behavior.

  1. In the Azure portal, go to your Azure Local resource, then select Virtual machines.

  2. In the list of VMs in the right-pane, verify that the VMs that you migrated are present.

    Screenshot of Azure Local > Virtual machines in Azure portal.

  3. Select a VM to view its details. Verify that:

    1. The VM is running. The corresponding source VM in the Hyper-V server is turned off.
    2. The VM has the disk and network configuration as configured during replication.

    Screenshot of migrated VM details in Azure portal.

  4. Sign into the VM using Hyper-V VMConnect. Verify that:

    1. The VM behaves as expected.
    2. Your applications work as expected.
  5. In the Azure portal, select the ellipses ... next to the VM and select Complete migration.

    Screenshot of Replications view with complete migration selected from the context menu in Azure portal.

    Alternatively, select the VM name.

    Screenshot of Replications view with a VM selected in Azure portal.

    From the top command bar, select Complete migration. When prompted for confirmation, select Yes to continue. Repeat this action for all the migrated VMs.

    Screenshot of confirmation to complete migration in Azure portal.

    The Complete migrate action starts the Delete protected item job that you can track from the  Jobs  page. This job will only clean up the replication by deleting the delete protected item job - this will not affect your migrated VM.

    Screenshot of Jobs page with deletion job selected in Azure portal.

    Completing the migration or deleting the protected item will automatically remove any leftover seed files, such as the seed.iso file attached to the migrated VM and seed disks used during replication. These files can occupy significant space on the target Azure Local system, so it's important to finalize the migration after verifying the VMs. If migrations are not completed, these files will continue to occupy space on the target system.

    After the migrate resource is deleted, it is also removed from the Replications view. You'll also see the migrated VM job disappear from the Replications view.

    Screenshot of Replications page with VM not showing in the list in Azure portal.

Clean up

Once you have verified that migration is complete and no more machines need to be migrated, the last step is to clean up. Cleanup requires deletion of the following resources created during migration:

  • Source VMs and the associated VM disks from the Hyper-V server and the Failover Cluster Manager.
  • Source and target appliance VMs.

Next steps