Manage the Mobility agent

You set up the mobility agent on your server when you use Azure Site Recovery for disaster recovery of VMware VMs and physical servers to Azure. The mobility agent coordinates communications between your protected machine and the configuration server or scale-out process server. It also manages data replication. This article summarizes common tasks for managing the mobility agent after you deploy it.

Tip

To download the installer for a specific OS or Linux distro, refer to the guidance here. To automatically update from the portal, you don't need to download the installer. ASR automatically fetches the installer from configuration server and updates the agent.

Note

We recommend that you use the Azure Az PowerShell module to interact with Azure. See Install Azure PowerShell to get started. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.

Update mobility service from Azure portal

  1. Before you start, ensure that the configuration server, scale-out process servers, and any master target servers that are part of your deployment are updated before you update the Mobility Service on protected machines.

    1. From version 9.36 onwards, for SUSE Linux Enterprise Server 11 SP3, ensure the latest installer is available on the configuration server and scale-out process server.
  2. In the portal open the vault > Replicated items.

  3. If the configuration server is the latest version, you see a notification that reads "New Site recovery replication agent update is available. Click to install."

    Replicated items window.

  4. Select the notification. In Agent update, select the machines on which you want to upgrade the Mobility service. Then select OK.

    Replicated items VM list.

  5. The Update Mobility Service job starts for each of the selected machines. The process updates the mobility agent to the version of the configuration server. For example, if the configuration server is on version 9.33, the process updates the mobility agent on a protected VM to version 9.33.

Update Mobility service through PowerShell script on Windows server

Before you start, make sure that the configuration server, scale-out process servers, and any master target servers that are part of your deployment are updated. Update these servers before you update the Mobility Service on protected machines.

Use the following script to upgrade the Mobility Service on a server through a PowerShell cmdlet.

Update-AzRecoveryServicesAsrMobilityService -ReplicationProtectedItem $rpi -Account $fabric.fabricSpecificDetails.RunAsAccounts[0]

Update Mobility service manually on each protected server

  1. Before you start, ensure that the configuration server, scale-out process servers, and any master target servers that are part of your deployment are updated before you update the Mobility Service on protected machines.

  2. Locate the agent installer based on the operating system of the server.

Important

If you're replicating Azure IaaS VMs from one Azure region to another, don't use this method.

  1. Copy the installation file to the protected machine, and run it to update the Mobility Service.

Update account used for push installation of Mobility service

When you deployed Site Recovery, to enable push installation of the Mobility service, you specified an account that the Site Recovery process server uses to access the machines and install the service when replication is enabled for the machine. If you want to update the credentials for this account, follow these instructions.

Uninstall Mobility service

On a Windows machine

Uninstall the service from the UI or from a command prompt.

  • From the UI: In the Control Panel of the machine, select Programs. Select Azure Site Recovery Mobility Service/Master Target server > Uninstall.
  • From a command prompt: Open a command prompt window as an administrator on the machine. Run the following command:
    MsiExec.exe /qn /x {275197FC-14FD-4560-A5EB-38217F80CBD1} /L+*V "C:\ProgramData\ASRSetupLogs\UnifiedAgentMSIUninstall.log"
    

On a Linux machine

  1. On the Linux machine, sign in as a root user.
  2. In a terminal, go to /usr/local/ASR.
  3. Run the following command:
    ./uninstall.sh -Y
    

Install Site Recovery VSS provider on source machine

You need the Azure Site Recovery VSS provider on the source machine to generate application consistency points. If the installation of the provider didn't succeed through push installation, follow the guidelines in this section to install it manually.

  1. Open an admin command prompt window.
  2. Go to the mobility service installation location. For example, C:\Program Files (x86)\Azure Site Recovery\agent.
  3. Run the script InMageVSSProvider_Uninstall.cmd. This step uninstalls the service if it already exists.
  4. Run the script InMageVSSProvider_Install.cmd to install the VSS provider manually.

Next steps