Install Mobility Service (VMware or physical to Azure)

Azure Site Recovery Mobility 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 Mobility Service to the servers that you want to protect by using the following methods:

Important

Beginning with version 9.7.0.0, on Windows virtual machines (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.

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 the 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

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.4, 6.5, 6.6, 6.7, 6.8, 6.9 (64-bit only)
CentOS 6.4, 6.5, 6.6, 6.7, 6.8, 6.9 (64-bit only)
Microsoft-ASR_UA*RHEL7-64*release.tar.gz Red Hat Enterprise Linux (RHEL) 7.1, 7.2, 7.3 (64-bit only)
CentOS 7.0, 7.1, 7.2, 7.3 (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 are using a Configuration Server to replicate Azure IaaS virtual machines from one Azure Subscription/Region to another then use the Command-line-based installation method

  1. Copy the installation to the server, and then open the installer.
  2. On the Installation Option blade, select Install Mobility Service.

    Mobility Service Install Option Page

  3. Select the install location and click Install to being the installation procedure.

    Mobility Service Install Location Page

  4. You can use Installation Progress page to monitor the installer's progress. Mobility Service Install Progress

  5. Once installation is complete, click the Proceed to Configuration button to register the Mobility Service with your Configuration server. Mobility service Register Page

  6. Click on the Register button to complete the registration. Mobility service Register 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 the Mobility Service is getting installed

- VMware : use this value if you are installing mobility service on a VM running on VMware vSphere ESXi Hosts, Hyper-V Hosts and Phsyical Servers
- Azure : use this value if you are installing agent on a Azure IaaS VM
VMware
Azure
/Silent Optional Specifies to run the installer in silent mode NA

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 passphrase Any valid UNC or local file path

Tip

The AgentConfiguration 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. Once installation is complete, the Mobility Service needs to get registered to the configuration server. Run the following command to register the Mobility Service with 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 will be installed /usr/local/ASR
-v Mandatory Specifies the platform on which the Mobility Service is getting installed

- VMware : use this value if you are installing mobility service on a VM running on VMware vSphere ESXi Hosts, Hyper-V Hosts and Phsyical Servers
- Azure : use this value if you are installing agent on a Azure IaaS VM
VMware
Azure
-q Optional Specifies to run 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 the file where the connection passphrase is saved Any valid folder

Install Mobility Service by push installation from Azure Site Recovery

To 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 (local or domain). (Use this account only for the push installation and for agent updates.)

    Note

    If you're not using a domain account, disable Remote User Access control on the local computer. To disable Remote User Access control, under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System registry key, add a new DWORD: LocalAccountTokenFilterPolicy. Set the value to 1. To do this 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.

    1. Sign in to your configuration server.
    2. Open cspsconfigtool.exe. (It's available as a shortcut on the desktop and in the %ProgramData%\home\svsystems\bin folder.)
    3. On the Manage Accounts tab, select Add Account.
    4. Add the account you created.
    5. 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:

    1. Sign in as root.
    2. In the file /etc/ssh/sshd_config file, find the line that begins with PasswordAuthentication.
    3. Uncomment the line and change the value to yes.
    4. Find the line that begins with Subsystem and uncomment the line.

      Linux

    5. Restart the sshd service.
  7. Add the account that you created in CSPSConfigtool.

    1. Sign in to your configuration server.
    2. Open cspsconfigtool.exe. (It's available as a shortcut on the desktop and in the %ProgramData%\home\svsystems\bin folder.)
    3. On the Manage Accounts tab, click Add Account.
    4. Add the account you created.
    5. Enter the credentials you use when you enable replication for a computer.

Note

After Mobility Service is installed, in the Azure portal, select the +Replicate button 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 is updated before you start updating the Mobility Service on the protected servers. Read more on How to update your Configuration Server and How to update your Scale-out Process servers

  1. On the Azure portal browse to -> Replicated Items view.
  2. If the Configuration server has already been updated to the latest version, then you should see a notification that reads New Site recovery replication agent update is available. Click to install

    ReplicatedItems

  3. Click on the notification to open up the virtual machine selection page.
  4. Select the virtual machines you want to upgrade mobility service on & click OK button.

    ReplicatedItemsVMList

  5. This starts the Update Mobility Service job 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