

# Installing the agent with Multi-AZ support

Install the agent with the `--multi-az-enabled-volumes` parameter. With this parameter, the installation succeeds only if AWS Elastic Disaster Recovery registers the source server with Multi-AZ support. Otherwise, the installation stops with an error.

Without this parameter, AWS Elastic Disaster Recovery still adds Multi-AZ support if the instance meets the requirements. If the instance does not meet them, the installation can succeed without Multi-AZ support. Use this parameter every time that you install or reinstall the agent on these instances.

If you add servers from the AWS Elastic Disaster Recovery console, you cannot use this parameter. After the installation, [check that the source server has Multi-AZ support](ebs-multi-az-checking.md). For more information about the other installer parameters, see [Installer parameters](installer-parameters.md).

Before you install the agent, complete the following prerequisites:
+ Verify that the source instance meets the requirements in [Requirements for Amazon EBS Multi-AZ volumes](ebs-multi-az-requirements.md).
+ If your Windows instance uses EC2Launch v1, prepare it before the first failover. For instructions, see [Preparing Windows instances that use EC2Launch v1](ebs-multi-az-windows-ec2launch.md).
+ Make sure that you install the agent with the credentials of the instance profile, not with access keys. For more information, see [Using an instance profile for agent installation in AWS](agent-installations-in-aws.md).

To install the agent, use the procedure for the operating system of the source instance.

**To install the agent with Multi-AZ support (Linux)**

1. Download the installer to the source instance. For instructions, see [Installing the AWS Replication Agent on Linux](linux-agent.md).

1. Run the following installer command. Replace `{{us-east-1}}` with the AWS Region that you replicate into.

   ```bash
   sudo ./aws-replication-installer-init --region {{us-east-1}} --no-prompt --multi-az-enabled-volumes
   ```

**To install the agent with Multi-AZ support (Windows)**

1. Download the installer to the source instance. For instructions, see [Installing the AWS Replication Agent on Windows](windows-agent.md).

1. Open Windows PowerShell as an administrator.

1. Run the following installer command. Replace `{{us-east-1}}` with the AWS Region that you replicate into.

   ```powershell
   .\AwsReplicationWindowsInstaller.exe --region {{us-east-1}} --no-prompt --multi-az-enabled-volumes
   ```

A successful installation with `--multi-az-enabled-volumes` confirms that AWS Elastic Disaster Recovery registered the source server with Multi-AZ support. If the installation fails, the installer shows an error message. For most errors, it also shows an error code and a link to its resolution. For more information, see [Common agent installation errors](agent-install-common-errors.md).