Migrate to Innovate Summit:
Learn how migrating and modernizing to Azure can boost your business's performance, resilience, and security, enabling you to fully embrace AI.Register now
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Set up disaster recovery for Azure VMs after migration to Azure
Article
Follow this article if you've migrated on-premises machines to Azure VMs using the Site Recovery service, and you now want to get the VMs set up for disaster recovery to a secondary Azure region. The article describes how to ensure that the Azure VM agent is installed on migrated VMs, and how to remove the Site Recovery Mobility service that's no longer needed after migration.
Verify migration
Before you set up disaster recovery, make sure that migration has completed as expected. To complete a migration successfully, after the failover, you should select the Complete Migration option, for each machine you want to migrate.
Verify the Azure VM agent
Each Azure VM must have the Azure VM agent installed. To replicate Azure VMs, Site Recovery installs an extension on the agent.
If the machine is running version 9.7.0.0 or later of the Site Recovery Mobility service, the Azure VM agent is automatically installed by the Mobility service on Windows VMs. On earlier versions of the Mobility service, you'll install the agent manually.
For Linux VMs, you must install the Azure VM agent manually. You only need to install the Azure VM agent if the Mobility service installed on the migrated machine is v9.6 or earlier.
Install the agent on Windows VMs
If you're running a version of the Site Recovery mobility service earlier than 9.7.0.0, or you have some other need to install the agent manually, do the following:
Make sure you have admin permissions on the machine.
We strongly recommend that you install the Linux VM agent using an RPM or a DEB package from your distribution's package repository. All the endorsed distribution providers integrate the Azure Linux agent package into their images and repositories.
We strongly recommend that you update the agent only through a distribution repository.
We don't recommend installing the Linux VM agent directly from GitHub and updating it.
If the latest agent for your distribution is not available, contact distribution support for instructions on how to install it.
Validate the installation
Run this command: ps -e to ensure that the Azure agent is running on the Linux VM.
If the process isn't running, restart it by using the following commands:
For Ubuntu/Debian:
Bash
sudo systemctl enable --now walinuxagent.service
For other distributions:
Bash
sudo systemctl enable --now waagent.service
Uninstall the Mobility service
Manually uninstall the Mobility service from the Azure VM, using one of the following methods.
For Windows, in the Control Panel > Add/Remove Programs, uninstall Microsoft Azure Site Recovery Mobility Service/Master Target server. At an elevated command prompt, run: