To avoid replication problems when the protected VMs fail over to hosts in Availability Zone 2 if there is Availability Zone 1 failure, add a third adapter to the vSphere Replication appliance in Region A.

You configure replication traffic for Availability Zone 2 by adding static routes on both vSphere Replication appliances and ESXi hosts in Availability Zone 2 and Region B.

Setting

Values for the Management Cluster in Region A

Values for the Management Cluster in Region B

vCenter Server URL

https://sfo01m01vc01.sfo01.rainpole.local/vsphere-client/

https://lax01m01vc01.lax01.rainpole.local/vsphere-client/

Host profile

sfo02-m01hp-mgmt01

lax01-m01hp-mgmt01

Template ESXi host

sfo02m01esx01.sfo01.rainpole.local

lax01m01esx01.lax01.rainpole.local

Filter value

172.16.26.253

172.17.16.253

IP Next Hop

172.16.26.253

172.17.16.253

Destination network address

172.17.16.0

172.16.26.0

Device name

vmk2

vmk2

Host/Cluster

sfo02-m01-mgmt01

lax01-m01-mgmt01

Procedure

  1. Log in to vCenter Server by using the vSphere Web Client.
    1. Open a Web browser and go to https://sfo01m01vc01.sfo01.rainpole.local/vsphere-client.
    2. Log in using the following credentials.

      Setting

      Value

      User name

      administrator@vsphere.local

      Password

      vsphere_admin_password

  2. Shut down the vSphere Replication virtual appliance to allow for changes in the hardware configuration.
    1. From the Home menu, select Hosts and Clusters.
    2. In the Navigator pane, expand the entire sfo01m01vc01.sfo01.rainpole.local tree.
    3. Right-click the sfo01m01vrms01 virtual appliance and select Power > Shut Down Guest OS.
    4. In the Confirm Guest Shut Down dialog box, click Yes.
  3. Add a VM network adapter to the vSphere Replication virtual appliance for replication traffic.
    1. Right-click the sfo01m01vrms01 virtual appliance and select Edit Settings.
    2. In the sfo01m01vrms01 - Edit Settings dialog box, from the New device drop-down menu, select Network, and clickAdd.
    3. From the New Network drop-down menu, select sfo02-m01-vds01-replication and click OK.
    4. Right-click the sfo01m01vrms01 virtual appliance and select Power > Power On.
    5. In the Confirm Power On dialog box, click Yes and wait until the appliance is up and running.
  4. Log in to the Virtual Appliance Management Interface of the vSphere Replication appliance.
    1. Open a Web browser and go to https://sfo01m01vrms01.sfo01.rainpole.local:5480.
    2. Log in using the following credentials.

      Settings

      Value

      User name

      root

      Password

      vr_sfo_root_password

  5. Configure the network settings of the new network adapter eth2.
    1. Click the Network tab and click Address.
    2. Under the eth2 info section, enter the following settings and click Save Settings.

      Setting

      Value

      IPv4 Address Type

      Static

      IPv4 Address

      172.16.26.71

      Netmask

      255.255.255.0

      IPv6 Address Type

      Auto

  6. Log in to vCenter Server by using the vSphere Web Client.
    1. Open a Web browser and go to https://sfo01m01vc01.sfo01.rainpole.local/vsphere-client.
    2. Log in using the following credentials.

      Setting

      Value

      User name

      administrator@vsphere.local

      Password

      vsphere_admin_password

  7. On the vSphere Replication appliances, add static network routes to the hosts in the other region.

    VM Name

    Appliance Host Name

    Source Gateway

    Target Network

    sfo01m01vrms01

    sfo01m01vrms01.sfo01.rainpole.local

    172.16.26.253

    172.17.16.0/24

    lax01m01vrms01

    lax01m01vrms01.lax01.rainpole.local

    172.17.16.253

    172.16.26.0/24

    1. From the Home menu, select Hosts and Clusters.
    2. In the Navigator, expand the entire sfo01m01vc01.sfo01.rainpole.local tree.
    3. Right-click the sfo01m01vrms01 virtual appliance and select Open Console to open the console to the appliance.
    4. To switch to the command prompt press ALT+F2.
    5. Log in using the following credentials.

      Setting

      Value

      User name

      root

      Password

      vr_root_password

    6. Open the/etc/sysconfig/network/routes file using vi editor.

      vi /etc/sysconfig/network/routes

    7. To create a route to the recovery region for the hosts in Region A or to the protected region for the hosts in Region B, add the following line after the default gateway, and save the file.

      Region of the vSphere Replication Appliance

      Value

      Region A

      172.17.16.0/24 172.16.26.253 dev eth2

      Region B

      172.16.26.0/24 172.17.16.253 dev eth1

    8. Run the service network restart command.
    9. To verify the routing table, run the route -n command.
    10. Repeat the step on the lax01m01vrms01 vSphere Replication appliance in the lax01-m01-mgmt01 cluster in Region B.
  8. Add static network routes on the ESXi hosts in the management clusters in all regions.

    Region

    Host Name

    Source Gateway

    Target Network

    Region A

    sfo02m01esx01.sfo01.rainpole.local

    172.16.26.253

    172.17.16.0/24

    Region B

    lax01m01esx01.lax01.rainpole.local

    172.17.16.253

    172.16.26.0/24

    1. For each management host, open an SSH connection to the ESXi Shell and log in using the following credentials.

      Setting

      Value

      User name

      root

      Password

      esxi_root_user_password

    2. To create a route to the recovery region for the hosts in Region A or to the protected region for the hosts in Region B, run the following commands.

      Region of the ESXi Host

      Command

      Region A

      esxcli network ip route ipv4 add --gateway 172.16.26.253 --network 172.17.16.0/24

      Region B

      esxcli network ip route ipv4 add --gateway 172.17.16.253 --network 172.16.26.0/24

    3. Verify the routing table by running the following command.

      esxcli network ip route ipv4 list

    4. Repeat the step on the lax01m01esx01.lax01.rainpole.local host in the lax01-m01-mgmt01 cluster in Region B.
  9. Log in to vCenter Server by using the vSphere Web Client.
    1. Open a Web browser and go to https://sfo01m01vc01.sfo01.rainpole.local/vsphere-client.
    2. Log in using the following credentials.

      Setting

      Value

      User name

      administrator@vsphere.local

      Password

      vsphere_admin_password

  10. Update the host profile of the management cluster.
    1. From the Home menu, select Policies and Profiles.
    2. In the Navigator pane, click Host Profiles.
    3. Right-click sfo02-m01hp-mgmt01 and select Copy Settings from Host.
    4. Select sfo02m01esx01.sfo01.rainpole.local and click OK.
  11. Verify that the static route settings have been updated in the host profile.
    1. On the Host Profiles page, double-click sfo02-m01hp-mgmt01 and click the Configure tab.
    2. In the Filter search box, enter 172.16.26.253.

      Under Networking configuration > NetStack Instance > defaultTcpipStack > IP route configuration > IP route config, locate the profile property.

    3. Select the IP route config entry from the list and verify the following values.

      Settings

      Value

      IP Next Hop

      172.16.26.253

      Destination Network address

      172.17.16.0

      Device name

      vmk2

  12. Check compliance and remediate the remaining management hosts in Region A.
    1. From the Home menu, select Policies and Profiles.
    2. In the Navigator pane, click Host Profiles
    3. Double-click the sfo02-m01hp-mgmt01 host profile, click the Monitor tab, and click Compliance.
    4. Select the sfo02m01esx01.sfo01.rainpole.local host and click the Check Host Profile Compliance icon.
    5. Repeat this step for all remaining ESXi hosts in Availability Zone 2.

      Setting

      Value

      Host 2

      sfo02m01esx02.sfo01.rainpole.local

      Host 3

      sfo02m01esx03.sfo01.rainpole.local

      Host 4

      sfo02m01esx04.sfo01.rainpole.local

      This compliance test shows that sfo02m01esx01.sfo01.rainpole.local is Compliant, but the remaining hosts are Not Compliant.

    6. Select each of the non-compliant hosts and click the Remediate host based on its host profile icon.
    7. In the Remediate Hosts Based on its Host Profile wizard, click Next, and click Finish on the Ready to complete page.

    All hosts have Compliant status in the Host Compliance column.

  13. Repeat steps 9-12 for the management cluster in Region B.