Prepare on-premises machines for migration to Azure

This article describes how to prepare on-premises machines before you migrate them to Azure using the Azure Migrate:Server Migration tool.

In this article, you:

  • Review migration limitations.
  • Select a method for migrating VMware VMs
  • Check hypervisor and operating system requirements for machines you want to migrate.
  • Review URL and port access for machines you want to migrate.
  • Review changes you might need to make before you begin migration.
  • Check Azure VMs requirements for migrated machines
  • Prepare machines so you can connect to the Azure VMs after migration.

Verify migration limitations

The table summarizes discovery, assessment, and migration limits for Azure Migrate. We recommend that you assess machines before migration, but you don't have to.

Scenario Project Discovery/Assessment Migration
VMware VMs Discover and assess up to 35,000 VMs in a single Azure Migrate project. Discover up to 10,000 VMware VMs with a single Azure Migrate appliance for VMware. Agentless migration: you can simultaneously replicate a maximum of 300 VMs. For best performance, we recommend creating multiple batches of VMs if you have more than 50.

Agent-based migration: you can scale out the replication appliance to replicate large numbers of VMs.

In the portal, you can select up to 10 machines at once for replication. To replicate more machines, add in batches of 10.
Hyper-V VMs Discover and assess up to 35,000 VMs in a single Azure Migrate project. Discover up to 5,000 Hyper-V VMs with a single Azure Migrate appliance An appliance isn't used for Hyper-V migration. Instead, the Hyper-V Replication Provider runs on each Hyper-V host.

Replication capacity is influenced by performance factors such as VM churn, and upload bandwidth for replication data.

In the portal, you can select up to 10 machines at once for replication. To replicate more machines, add in batches of 10.
Physical machines Discover and assess up to 35,000 machines in a single Azure Migrate project. Discover up to 250 physical servers with a single Azure Migrate appliance for physical servers. You can scale out the replication appliance to replicate large numbers of servers.

In the portal, you can select up to 10 machines at once for replication. To replicate more machines, add in batches of 10.

Select a VMware migration method

If you're migrating VMware VMs to Azure, compare the agentless and agent-based migration methods, to decide what works for you.

Verify hypervisor requirements

Verify operating system requirements

Verify supported operating systems for migration:

Review URL and port access

Review which URLs and ports are accessed during migration.

Scenario Details URLs Ports
VMware agentless migration Uses the Azure Migrate appliance for migration. Nothing is installed on VMware VMs. Review the public cloud and government URLs needed for discovery, assessment, and migration with the appliance. Review the port requirements for agentless migration.
VMware agent-based migration Uses the replication appliance for migration. The Mobility service agent is installed on VMs. Review the public cloud and Azure Government URLs that the replication appliance needs to access. Review the ports used during agent-based migration.
Hyper-V migration Uses a Provider installed on Hyper-V hosts for migration. Nothing is installed on Hyper-V VMs. Review the public cloud and Azure Government URLs that the Replication Provider running on the hosts needs to access. The Replication Provider on the Hyper-V host uses outbound connections on HTTPS port 443 to send VM replication data.
Physical machines Uses the replication appliance for migration. The Mobility service agent is installed on the physical machines. Review the public cloud and Azure Government URLs that the replication appliance needs to access. Review the ports used during physical migration.

Verify required changes before migrating

There are some changes needed on VMs before you migrate them to Azure.

  • For some operating systems, Azure Migrate makes changes automatically during the replication/migration process.
  • For other operating systems, you need to configure settings manually.
  • It's important to configure settings manually before you begin migration. If you migrate the VM before you make the change, the VM might not boot up in Azure.

Review the tables to identify the changes you need to make.

Windows machines

Required changes are summarized in the table.

Action VMware (agentless migration) VMware (agent-based)/physical machines Windows on Hyper-V
Configure the SAN policy as Online All

This ensures that Windows volumes in Azure VM use the same drive letter assignments as the on-premises VM.
Set automatically for machines running Windows Server 2008 R2 or later.

Configure manually for earlier operating systems.
Set automatically in most cases. Configure manually.
Install Hyper-V Guest Integration Install manually on machines running Windows Server 2003. Install manually on machines running Windows Server 2003. Install manually on machines running Windows Server 2003.
Enable Azure Serial Console.

Enable the console on Azure VMs to help with troubleshooting. You don't need to reboot the VM. The Azure VM will boot by using the disk image. The disk image boot is equivalent to a reboot for the new VM.
Enable manually Enable manually Enable manually
Connect after migration

To connect after migration, there are a number of steps to take before you migrate.
Set up manually. Set up manually. Set up manually.

Configure SAN policy

By default, Azure VMs are assigned drive D to use as temporary storage.

  • This drive assignment causes all other attached storage drive assignments to increment by one letter.
  • For example, if your on-premises installation uses a data disk that is assigned to drive D for application installations, the assignment for this drive increments to drive E after you migrate the VM to Azure.
  • To prevent this automatic assignment, and to ensure that Azure assigns the next free drive letter to its temporary volume, set the storage area network (SAN) policy to OnlineAll:

Configure this setting manually as follows:

  1. On the on-premises machine (not the host server), open an elevated command prompt.
  2. Enter diskpart.
  3. Enter SAN. If the drive letter of the guest operating system isn't maintained, Offline All or Offline Shared is returned.
  4. At the DISKPART prompt, enter SAN Policy=OnlineAll. This setting ensures that disks are brought online, and it ensures that you can read and write to both disks.
  5. During the test migration, you can verify that the drive letters are preserved.

Linux machines

Azure Migrate completes these actions automatically for these versions

  • Red Hat Enterprise Linux 7.0+, 6.5+
  • CentOS 7.0+, 6.5+
  • SUSE Linux Enterprise Server 12 SP1+
  • Ubuntu 18.04LTS, 16.04LTS, 14.04LTS
  • Debian 8, 7

For other versions, prepare machines as summarized in the table.

Action Details Linux version
Install Hyper-V Linux Integration Services Rebuild the Linux init image so it contains the necessary Hyper-V drivers. Rebuilding the init image ensures that the VM will boot in Azure. Most new versions of Linux distributions have this included by default.

If not included, install manually for all versions except those called out above.
Enable Azure Serial Console logging Enabling console logging helps you troubleshoot. You don't need to reboot the VM. The Azure VM will boot by using the disk image. The disk image boot is equivalent to a reboot for the new VM.

Follow these instructions to enable.
Update device map file Update the device map file with the device name-to-volume associations, so you use persistent device identifiers. Install manually for all versions except those called out above.
Update fstab entries Update entries to use persistent volume identifiers. Update manually for all versions except those called out above.
Remove udev rule Remove any udev rules that reserves interface names based on mac address etc. Remove manually for all versions except those called out above.
Update network interfaces Update network interfaces to receive IP address based on DHCP.nst Update manually for all versions except those called out above.
Enable ssh Ensure ssh is enabled and the sshd service is set to start automatically on reboot.

Ensure that incoming ssh connection requests are not blocked by the OS firewall or scriptable rules.
Enable manually for all versions except those called out above.

Learn more about steps for running a Linux VM on Azure, and get instructions for some of the popular Linux distributions.

Check Azure VM requirements

On-premises machines that you replicate to Azure must comply with Azure VM requirements for the operating system and architecture, the disks, network settings, and VM naming.

Before migrating, review the Azure VMs requirements for VMware, Hyper-V, and physical server migration.

Prepare to connect after migration

Azure VMs are created during migration to Azure. After migration, you must be able to connect to the new Azure VMs. Multiple steps are required to connect successfully.

Prepare to connect to Azure Windows VMs

On on-premises Windows machines:

  1. Configure Windows settings. Settings include removing any static persistent routes or WinHTTP proxy.
  2. Make sure required services are running.
  3. Enable remote desktop (RDP) to allow remote connections to the on-premises machine. Learn how to use PowerShell to enable RDP.
  4. To access an Azure VM over the internet after migration, in Windows Firewall on the on-premises machine, allow TCP and UDP in the Public profile, and set RDP as an allowed app for all profiles.
  5. If you want to access an Azure VM over a site-to-site VPN after migration, in Windows Firewall on the on-premises machine, allow RDP for the Domain and Private profiles. Learn how to allow RDP traffic.
  6. Make sure there are no Windows updates pending on the on-premises VM when you migrate. If there are, updates might start installing on the Azure VM after migration, and you won't be able to sign into the VM until updates finish.

Prepare to connect with Linux Azure VMs

On on-premises Linux machines:

  1. Check that the Secure Shell service is set to start automatically on system boot.
  2. Check that firewall rules allow an SSH connection.

Configure Azure VMs after migration

After migration, complete these steps on the Azure VMs that are created:

  1. To connect to the VM over the internet, assign a public IP address to the VM. You must use a different public IP address for the Azure VM than you used for your on-premises machine. Learn more.
  2. Check that network security group (NSG) rules on the VM allow incoming connections to the RDP or SSH port.
  3. Check boot diagnostics to view the VM.

Next steps

Decide which method you want to use to migrate VMware VMs to Azure, or begin migrating Hyper-V VMs or physical servers or virtualized or cloud VMs.

See what's supported

For VMware VMs, Server Migration supports agentless or agent-based migration.