Install the Mobility service

Azure Site Recovery Mobility Service is installed on VMware VMs and physical servers that you want to replicate to Azure. The service captures data writes on a computer and then forwards them to the process server. Deploy Mobility Service to every computer (VMware VM or physical server) that you want to replicate to Azure. You can deploy the Mobility Service on the servers and VMware VMs you want to protect using the following methods:

Important

Beginning with version 9.7.0.0, on Windows VMs, the Mobility Service installer also installs the latest available Azure VM agent. When a computer fails over to Azure, the computer meets the agent installation prerequisite for using any VM extension.
On Linux VMs, WALinuxAgent has to be manually installed.

Prerequisites

Complete these prerequisite steps before you manually install Mobility Service on your server:

  1. Sign in to your configuration server, and then open a command prompt window as an administrator.
  2. Change the directory to the bin folder, and then create a passphrase file.

    cd %ProgramData%\ASR\home\svsystems\bin
    genpassphrase.exe -v > MobSvc.passphrase
    
  3. Store the passphrase file in a secure location. You use the file during Mobility Service installation.
  4. Mobility Service installers for all supported operating systems are in the %ProgramData%\ASR\home\svsystems\pushinstallsvc\repository folder.

Mobility Service installer-to-operating system mapping

To see a list of Operating System versions with a compatible Mobility Service package refer to the list of supported operating systems for VMware virtual machines and physical servers.

Installer file template name Operating system
Microsoft-ASR_UA*Windows*release.exe Windows Server 2008 R2 SP1 (64-bit)
Windows Server 2012 (64-bit)
Windows Server 2012 R2 (64-bit)
Windows Server 2016 (64-bit)
Microsoft-ASR_UA*RHEL6-64*release.tar.gz Red Hat Enterprise Linux (RHEL) 6.* (64-bit only)
CentOS 6.* (64-bit only)
Microsoft-ASR_UA*RHEL7-64*release.tar.gz Red Hat Enterprise Linux (RHEL) 7.* (64-bit only)
CentOS 7.* (64-bit only)
Microsoft-ASR_UA*SLES12-64*release.tar.gz SUSE Linux Enterprise Server 12 SP1,SP2,SP3 (64-bit only)
Microsoft-ASR_UA*SLES11-SP3-64*release.tar.gz SUSE Linux Enterprise Server 11 SP3 (64-bit only)
Microsoft-ASR_UA*SLES11-SP4-64*release.tar.gz SUSE Linux Enterprise Server 11 SP4 (64-bit only)
Microsoft-ASR_UA*OL6-64*release.tar.gz Oracle Enterprise Linux 6.4, 6.5 (64-bit only)
Microsoft-ASR_UA*UBUNTU-14.04-64*release.tar.gz Ubuntu Linux 14.04 (64-bit only)
Microsoft-ASR_UA*UBUNTU-16.04-64*release.tar.gz Ubuntu Linux 16.04 LTS server (64-bit only)
Microsoft-ASR_UA*DEBIAN7-64*release.tar.gz Debian 7 (64-bit only)
Microsoft-ASR_UA*DEBIAN8-64*release.tar.gz Debian 8 (64-bit only)

Install Mobility Service manually by using the GUI

Important

If you use a configuration server to replicate Azure IaaS virtual machines from one Azure subscription/region to another, use the command-line-based installation method.

  1. Copy the installation to the server, and then open the installer.
  2. On Installation Option, select Install mobility service.

    Mobility Service installation option page

  3. Select the installation location, and then select Install to start the installation procedure.

    Mobility Service installation location page

  4. Use the Installation Progress page to monitor the installer's progress.

    Mobility Service installation progress page

  5. After the installation is finished, select Proceed to Configuration to register Mobility Service with your configuration server.

    Mobility Service registration page

  6. Select Register to finish the registration.

    Mobility Service registration final page

Install Mobility Service manually at a command prompt

Command-line installation on a Windows computer

  1. Copy the installer to a local folder (for example, C:\Temp) on the server that you want to protect. Run the following commands as an administrator at a command prompt:

    cd C:\Temp
    ren Microsoft-ASR_UA*Windows*release.exe MobilityServiceInstaller.exe
    MobilityServiceInstaller.exe /q /x:C:\Temp\Extracted
    cd C:\Temp\Extracted.
    
  2. To install Mobility Service, run the following command:

    UnifiedAgent.exe /Role "MS" /InstallLocation "C:\Program Files (x86)\Microsoft Azure Site Recovery" /Platform "VmWare" /Silent
    
  3. Now the agent needs to be registered with the configuration server.

    cd C:\Program Files (x86)\Microsoft Azure Site Recovery\agent
    UnifiedAgentConfigurator.exe  /CSEndPoint <CSIP> /PassphraseFilePath <PassphraseFilePath>
    

Mobility Service installer command-line arguments

Usage :
UnifiedAgent.exe /Role <MS|MT> /InstallLocation <Install Location> /Platform “VmWare” /Silent
Parameter Type Description Possible values
/Role Mandatory Specifies whether Mobility Service (MS) should be installed or MasterTarget (MT) should be installed. MS
MT
/InstallLocation Optional Location where Mobility Service is installed. Any folder on the computer
/Platform Mandatory Specifies the platform on which Mobility Service is installed.

- VMware: Use this value if you install Mobility Service on a VM running on VMware vSphere ESXi hosts, Hyper-V hosts, and physical servers.
- Azure: Use this value if you install an agent on an Azure IaaS VM.
VMware
Azure
/Silent Optional Specifies to run the installer in silent mode. N/A

Tip

The setup logs can be found under %ProgramData%\ASRSetupLogs\ASRUnifiedAgentInstaller.log.

Mobility Service registration command-line arguments

Usage :
UnifiedAgentConfigurator.exe  /CSEndPoint <CSIP> /PassphraseFilePath <PassphraseFilePath>
Parameter Type Description Possible values
/CSEndPoint Mandatory IP address of the configuration server Any valid IP address
/PassphraseFilePath Mandatory Location of the pass phrase Any valid UNC or local file path

Tip

The Agent Configuration logs can be found under %ProgramData%\ASRSetupLogs\ASRUnifiedAgentConfigurator.log.

Command-line installation on a Linux computer

  1. Copy the installer to a local folder (for example, /tmp) on the server that you want to protect. In a terminal, run the following commands:

    cd /tmp ;
    
    tar -xvzf Microsoft-ASR_UA*release.tar.gz
    
  2. To install Mobility Service, run the following command:

    sudo ./install -d <Install Location> -r MS -v VmWare -q
    
  3. After installation is finished, Mobility Service must be registered to the configuration server. Run the following command to register Mobility Service with the configuration server:

    /usr/local/ASR/Vx/bin/UnifiedAgentConfigurator.sh -i <CSIP> -P /var/passphrase.txt
    

Mobility Service installer command line

Usage:
./install -d <Install Location> -r <MS|MT> -v VmWare -q
Parameter Type Description Possible values
-r Mandatory Specifies whether Mobility Service (MS) should be installed or MasterTarget (MT) should be installed. MS
MT
-d Optional Location where Mobility Service is installed. /usr/local/ASR
-v Mandatory Specifies the platform on which Mobility Service is installed.

- VMware: Use this value if you install Mobility Service on a VM running on VMware vSphere ESXi hosts, Hyper-V hosts, and physical servers.
- Azure: Use this value if you install an agent on an Azure IaaS VM.
VMware
Azure
-q Optional Specifies to run the installer in silent mode. N/A

Mobility Service configuration command line

Usage:
cd /usr/local/ASR/Vx/bin
UnifiedAgentConfigurator.sh -i <CSIP> -P <PassphraseFilePath>
Parameter Type Description Possible values
-i Mandatory IP of the configuration server Any valid IP Address
-P Mandatory Full file path for the file where the connection pass phrase is saved Any valid folder

Install Mobility Service by push installation from Azure Site Recovery

You can do a push installation of Mobility Service by using Site Recovery. All target computers must meet the following prerequisites.

Prepare for a push installation on a Windows computer

  1. Ensure that there's network connectivity between the Windows computer and the process server.
  2. Create an account that the process server can use to access the computer. The account should have administrator rights, either local or domain. Use this account only for the push installation and for agent updates.

    Note

    If you don't use a domain account, disable Remote User Access control on the local computer. To disable Remote User Access control, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System registry key, add a new DWORD: LocalAccountTokenFilterPolicy. Set the value to 1. To do this task at a command prompt, run the following command:
    REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1

  3. In Windows Firewall on the computer you want to protect, select Allow an app or feature through Firewall. Enable File and Printer Sharing and Windows Management Instrumentation (WMI). For computers that belong to a domain, you can configure the firewall settings by using a Group Policy object (GPO).

    Firewall settings

  4. Add the account that you created in CSPSConfigtool. Follow these steps:

    a. Sign in to your configuration server.

    b. Open cspsconfigtool.exe. It's available as a shortcut on the desktop and in the %ProgramData%\home\svsystems\bin folder.

    c. On the Manage Accounts tab, select Add Account.

    d. Add the account you created.

    e. Enter the credentials you use when you enable replication for a computer.

Prepare for a push installation on a Linux server

  1. Ensure that there's network connectivity between the Linux computer and the process server.
  2. Create an account that the process server can use to access the computer. The account should be a root user on the source Linux server. Use this account only for the push installation and for updates.
  3. Check that the /etc/hosts file on the source Linux server has entries that map the local hostname to IP addresses associated with all network adapters.
  4. Install the latest openssh, openssh-server, and openssl packages on the computer that you want to replicate.
  5. Ensure that Secure Shell (SSH) is enabled and running on port 22.
  6. Enable SFTP subsystem and password authentication in the sshd_config file. Follow these steps:

    a. Sign in as root.

    b. In the /etc/ssh/sshd_config file, find the line that begins with PasswordAuthentication.

    c. Uncomment the line, and change the value to yes.

    d. Find the line that begins with Subsystem, and uncomment the line.

    Linux

    e. Restart the sshd service.

  7. Add the account that you created in CSPSConfigtool. Follow these steps:

    a. Sign in to your configuration server.

    b. Open cspsconfigtool.exe. It's available as a shortcut on the desktop and in the %ProgramData%\home\svsystems\bin folder.

    c. On the Manage Accounts tab, select Add Account.

    d. Add the account you created.

    d. Enter the credentials you use when you enable replication for a computer.

Note

After Mobility Service is installed, in the Azure portal, select + Replicate to start protecting these VMs.

Update Mobility Service

Warning

Ensure that the configuration server, scale-out process servers, and any master target servers that are a part of your deployment are updated before you start updating Mobility Service on the protected servers.

  1. On the Azure portal, browse to the name of your vault > Replicated items view.
  2. If the configuration server was already updated to the latest version, you see a notification that reads "New Site recovery replication agent update is available. Click to install."

    Replicated items window

  3. Select the notification to open the virtual machine selection page.
  4. Select the virtual machines you want to upgrade mobility service on, and select OK.

    Replicated items VM list

The Update Mobility Service job starts for each of the selected virtual machines.

Note

Read more on how to update the password for the account used to install Mobility Service.

Uninstall Mobility Service on a Windows Server computer

Use one of the following methods to uninstall Mobility Service on a Windows Server computer.

Uninstall by using the GUI

  1. In Control Panel, select Programs.
  2. Select Microsoft Azure Site Recovery Mobility Service/Master Target server, and then select Uninstall.

Uninstall at a command prompt

  1. Open a command prompt window as an administrator.
  2. To uninstall Mobility Service, run the following command:

    MsiExec.exe /qn /x {275197FC-14FD-4560-A5EB-38217F80CBD1} /L+*V "C:\ProgramData\ASRSetupLogs\UnifiedAgentMSIUninstall.log"
    

Uninstall Mobility Service on a Linux computer

  1. On your Linux server, sign in as a root user.
  2. In a terminal, go to /user/local/ASR.
  3. To uninstall Mobility Service, run the following command:

    uninstall.sh -Y