Objective 6.3 – Configure vSphere Replication

To round off section 3 we have Objective 6.3 – Configure vSphere Replication.

As always this article is linked to from the main VCP6.5-DCV Blueprint.

Happy Revision

Simon

 

Objective 6.3 – Configure vSphere Replication

Compare and contrast vSphere Replication compression methods

You can configure vSphere Replication to compress the data that it transfers through the network.

Compressing the replication data that is transferred through the network saves network bandwidth and might help reduce the amount of buffer memory used on the vSphere Replication server. However, compressing and decompressing data requires more CPU resources on both the source site and the server that manages the target datastore.

Data Compression Support

vSphere Replication 6.x supports end-to-end compression when the source and target ESXi hosts are version 6.0. The support of data compression for all other use cases depends on the versions of source and target ESXi hosts. The vSphere Replication servers on both the source and target sites must be 6.x.

vSphere Replication 6.0 utilizes the FastLZ compression library. This provides a nice balance of speed, minimal CPU overhead, and compression efficiency. When using vSphere 6.0 and vSphere Replication 6.0 at both the source and target locations, updates are compressed at the source and stay compressed until they are written to storage at the target. In cases where there is a mixed configuration, packets may be decompressed at some point in the replication path. For example, if a vSphere 6.0 host is connecting to a vSphere Replication 5.8 virtual appliance, packets will not be compressed over the network. Another example: vSphere 6.0 replicating to a vSphere Replication 6.0 virtual appliance, which is writing to vSphere 5.5 host storage – packets are compressed from the source to the vSphere Replication 6.0 virtual appliance, but are decompressed in the appliance before being written to the vSphere 5.5 storage at the target. Performing this decompression in the vSphere Replication virtual appliance will cause higher vCPU utilization in the appliance. As you can imagine, the most benefit from compression will be realized when running vSphere 6.0 and vSphere Replication 6.0 at both the source and target locations.

For most replication workloads, you will likely see compression ratios of approximately 1.6:1 to 1.8:1. This will result in faster sync times and lower bandwidth utilization

Configure recovery point objective (RPO) for a protected virtual machine

When you set a Recovery Point Objective (RPO) value during replication configuration, you determine the maximum data loss that you can tolerate.

The RPO value affects replication scheduling, but vSphere Replication does not adhere to a strict replication schedule. For example, when you set the RPO to 15 minutes, you instruct vSphere Replication that you can tolerate losing the data for up to 15 minutes. This does not mean that data is replicated every 15 minutes.

If you set an RPO of x minutes, and the RPO is not violated, the latest available replication instance can never reflect a state that is older than x minutes. A replication instance reflects the state of a virtual machine at the time the synchronization starts.

Assume that during replication configuration you set the RPO to 15 minutes. If the synchronization starts at 12:00 and it takes five minutes to transfer to the target site, the instance becomes available on the target site at 12:05, but it reflects the state of the virtual machine at 12:00. The next synchronization can start no later than 12:10. This replication instance is then available at 12:15 when the first replication instance that started at 12:00 expires.

If you set the RPO to 15 minutes and the replication takes 7.5 minutes to transfer an instance, vSphere Replication transfers an instance all the time. If the replication takes more than 7.5 minutes, the replication encounters periodic RPO violations. For example, if the replication starts at 12:00 and takes 10 minutes to transfer an instance, the replication finishes at 12:10. You can start another replication immediately, but it finishes at 12:20. During the time interval 12:15-12:20, an RPO violation occurs because the latest available instance started at 12:00 and is too old.

The replication scheduler tries to satisfy these constraints by overlapping replications to optimize bandwidth use and might start replications for some virtual machines earlier than expected.

To determine the replication transfer time, the replication scheduler uses the duration of the last few instances to estimate the next one.

You can use the 5 minute Recovery Point Objective (RPO) if the target and the source sites use VMFS 6.0, VMFS 5.x, NFS 4.1, NFS 3, VVOL and Virtual SAN 6.0 storage and later.

vSphere Replication 6.5 displays the 5 minute RPO setting when the target and the source site use VMFS 6.0, VMFS 5.x, NFS 4.1, NFS 3, VVOL and Virtual SAN 6.0 storage and later.

You can use the 5 minute RPO setting if you are using different data stores types between the source and the target site.

The 5 minute RPO can be a applied to a maximum of 100 VMs on VMFS 6.0, VMFS 5.x, NFS 4.1, NFS 3 and Virtual SAN 6.0 storage and later. The maximum for VVOL datastore is 50 VMs.

The RPO for a VM can be set during Replication configuration from the recovery settings page. On the Recovery settings page, use the RPO slider or the time spinners to set the acceptable period for which data can be lost in the case of a site failure.

The available RPO range is from 5 minutes to 24 hours for target and source sites.

Manage snapshots on recovered virtual machines

vSphere Replication does not maintain virtual machine snapshot hierarchy at the secondary site.

Writes are replicated, so vSphere Replication does not know what snapshots are. As such, snapshots are not replicated. When the virtual machine is accessed at the recovery side, it is like the snapshots have been collapsed.

Install/Configure/Upgrade vSphere Replication

Before you deploy the vSphere Replication appliance, you must prepare the environment.

  • Verify that you have vSphere and vSphere Web Client installations for the source and target sites.
  • In the vSphere Web Client, select the vCenter Server instance on which you are deploying vSphere Replication, click Configure > Settings > Advanced Settings, and verify that the VirtualCenter.FQDN value is set to a fully-qualified domain name or a literal address.

vSphere Replication is distributed as an OVF virtual appliance.

You deploy the vSphere Replication appliance by using the standard vSphere OVF deployment wizard.

Download the vSphere Replication ISO image and mount it on a system in your environment.

  • Log in to the vSphere Web Client on the source site.
  • Select vCenter > Hosts and Clusters.
  • Right-click a host and select Deploy OVF template.
  • Provide the location of the OVF file from which to deploy the vSphere Replication appliance, and click Next.

Select URL and provide the URL to deploy the appliance from an online URL.

If you downloaded and mounted the vSphere Replication ISO image on a system in your environment, select Local file > Browse and navigate to the \bin directory in the ISO image, and select the vSphere_Replication_OVF10.ovf, vSphere_Replication-system.vmdk, and vSphere_Replication-support.vmdk files.

  • Review the virtual appliance details and click Next.
  • Accept the end user license agreements (EULA) and click Next.
  • Accept the name, select or search for a destination folder or datacenter for the virtual appliance, and click Next.

You can enter a new name for the virtual appliance. The name must be unique within each vCenter Server virtual machine folder.

  • Select the number of vCPUs for the virtual appliance and click Next.
  • Select a cluster, host, or resource pool where you want to run the deployed template, and click Next.
  • Select a destination datastore and disk format for the virtual appliance and click Next.
  • Select a network from the list of available networks, set the IP protocol and IP allocation, and click Next.
  • vSphere Replication supports both DHCP and static IP addresses. You can also change network settings by using the virtual appliance management interface (VAMI) after installation.
  • Set the password for the root account for the customized template, and click Next.
  • The password must be at least eight characters long.
  • Review the binding to the vCenter Extension vService and click Next.
  • Review the settings and click Finish.
  • The vSphere Replication appliance is deployed.
  • Power on the vSphere Replication appliance. Take a note of the IP address of the appliance and log out of the vSphere Web Client.
  • Repeat the procedure to deploy vSphere Replication on the target site.

You must register the vSphere Replication Management Server with vCenter Single Sign-On on both the source and the target sites.

After you deploy the vSphere Replication appliance, you use the Virtual Appliance Management Interface (VAMI) to register the endpoint and the certificate of the vSphere Replication Management Server with the vCenter Lookup Service, and to register the vSphere Replication solution user with the vCenter Single Sign-On administration server.

If you do not register vSphere Replication with vCenter Single Sign-On on the target site, vSphere Replication cannot operate as expected. In addition, storage DRS does not detect the replicated data that vSphere Replication stores on the target site and might destroy it.

Prerequisites

  • Verify that the vSphere Replication appliance is powered on.
  • Verify that you have administrator privileges to configure the vSphere Replication appliance.
  • Verify that the vSphere Replication management server is synchronized with the time of the Single Sign-On server.
  • Use a supported browser to log in to the vSphere Replication VAMI.

The URL for the VAMI is https://vr-appliance-address:5480.

  • Type the root user name and password for the appliance.

You configured the root password during the OVF deployment of the vSphere Replication appliance.

  • Click the Configuration tab.
  • In the LookupService Address text box, enter the IP address or domain name of the server where the lookup service runs.
  • Enter the credentials of a user with administrator privileges to vCenter Single Sign-On.

Initially, only the user administrator@vsphere.local has these privileges.

  • Click Save and Restart Service.
  • Repeat the procedure to register vSphere Replication on the target site.

If the source and target vCenter Server instances use the same SSO domain, the connection is considered local. vSphere Replication uses the SSO service on the local site to authenticate with each vCenter Server in the SSO domain.

If the source and the target vCenter Server instances use different SSO domains, the connection is considered remote. The vSphere Replication Management Server on the source site registers with the Platform Services Controller (PSC) of the remote SSO domain.

You can use vSphere Replication to replicate virtual machines between ESXi hosts that the same vCenter Server manages. In this case, you deploy only one vSphere Replication appliance and do not need to connect the source and target sites.

You can configure a connection on either site on which you have installed a vSphere Replication appliance. If you are using an untrusted certificate, certificate warnings might appear during the process.

You can also set up a connection between two sites while you configure a replication between them.

Prerequisites

If you plan to configure a remote connection, obtain the IP address or domain name of the server where the PSC runs. The address appears in the LookupService Address text box on the Configuration tab under VR in the vSphere Replication VAMI on the target site.

  • Click vSphere Replication in the Navigator tree of the vSphere Web Client.
  • Under vSphere Replication, click the Home tab.
  • Click Manage.
  • Click Target Sites, and click the Connect to target site icon.
  • Select a target site option.

Connect to a local site

Select this option to connect to a vCenter Server that uses the same SSO domain as the source vCenter Server. If the domain contains no vCenter Server systems to which you can connect, this option is disabled.

For local connections, vSphere Replication uses the SSO service on the local site to authenticate with each vCenter Server in the SSO domain. The list of vCenter Server instances to which you can connect appears at the bottom of the dialog box.

Connect to a remote site

Select this option to connect to a vCenter Server that uses a different SSO domain.

For remote connections, the vSphere Replication Management Server on the source site registers with the PSC of the remote SSO domain. Therefore, you must enter the IP address or host name of the server where the PSC runs, and provide the credentials of a user that has the VRM remote > Manage VRM privilege assigned.

  • Select the remote site to which you want to connect, and click OK.

You upgrade the vSphere Replication appliance and any additional vSphere Replication servers by using a downloaded ISO image.

The downloadable ISO image is the only means of upgrading from vSphere Replication 6.0.0.3 or 6.1.1 to vSphere Replication 6.5. You cannot upgrade vSphere Replication from version 6.0.0.3 or 6.1.1 to version 6.5 by using vSphere Update Manager or the virtual appliance management interface (VAMI) of the vSphere Replication appliance. After you have installed vSphere Replication 6.5 or upgraded to version 6.5 by using the ISO image, you can use the VAMI or Update Manager to install later 6.5.x update releases.

You cannot downgrade to an earlier version of vSphere Replication.

You use the ISO file to upgrade to a major version of vSphere Replication, for example from 6.0.0.3 or 6.1.1 to 6.5.

You use Update Manager, the VAMI, or the ISO file to install an update release of vSphere Replication, for example upgrade 5.5.0 to 5.5.1.

  • You can upgrade vSphere Replication 6.0.0.3 or 6.1.1 to 6.5 by using the ISO file for vSphere Replication 6.5.
  • You cannot upgrade vSphere Replication 6.0.0.3 or 6.1.1 to 6.5 by using Update Manager or the VAMI.
  • You can upgrade vSphere Replication 5.5.0 to 5.5.1 by using Update Manager, the VAMI, or the ISO file.

To upgrade vSphere Replication, you must upgrade certain components of your vSphere environment in the correct order.

Upgrade the components on the protected site before you upgrade the components on the recovery site. If you encounter problems that prevent you from using the protected site when you upgrade the protected site, you can use the recovery site to perform a recovery. The ESXi hosts can be upgraded at any time.

  • Upgrade all components of vCenter Server on the protected site.
  • Upgrade the vSphere Replication appliance on the protected site.
  • Upgrade any additional vSphere Replication server deployments on the protected site.
  • Upgrade all components of vCenter Server on the recovery site.
  • Upgrade the vSphere Replication appliance on the recovery site.
  • Upgrade any additional vSphere Replication server deployments on the recovery site.
  • Upgrade the ESXi host on the recovery site.
  • Upgrade the ESXi host on the protected site.
  • Upgrade VMware Tools for the replicated VMs

Configure VMware Certificate Authority (VMCA) integration with vSphere Replication

You can change the SSL certificate, for example if your company’s security policy requires that you use trust by validity and thumbprint or a certificate signed by a certification authority. You change the certificate by using the virtual appliance management interface (VAMI) of the vSphere Replication appliance

Configure vSphere Replication for Single/Multiple VMs

This procedure is for configuring replications to a target vCenter Server. To configure a replication to a cloud provider, see vSphere Replication for Disaster Recovery to the Cloud.

When you configure replication, you set a recovery point objective (RPO) to determine the maximum data loss that you can tolerate. For example, an RPO of 1 hour seeks to ensure that a virtual machine loses the data for no more than 1 hour during the recovery. For smaller RPO values, less data is lost in a recovery, but more network bandwidth is consumed keeping the replica up to date. The RPO value affects replication scheduling, but vSphere Replication does not adhere to a strict replication schedule.

Every time that a virtual machine reaches its RPO target, vSphere Replication records approximately 3800 bytes of data in the vCenter Server events database. If you set a low RPO period, this can quickly create a large volume of data in the database. To reduce the volume of data that is kept in the vCenter Server events database, limit the number of days that vCenter Server retains event data.

Sphere Replication guarantees crash consistency amongst all the disks that belong to a virtual machine. If you use quiescing, you might obtain a higher level of consistency. The available quiescing types are determined by the operating system of the virtual machine.

Configure Replication for a Single Virtual Machine to vCenter Server

Prerequisites

  • Verify that the vSphere Replication appliance is deployed at the source and the target sites.
  • To enable the quiescing of virtual machines that run Linux guest OS, install the latest version of VMware Tools on each Linux machine that you plan to replicate.

 

  • On the vSphere Web Client Home page, click vSphere Replication.
  • Select a vCenter Server and click the VMs tab.

The Virtual Machines tab lists the virtual machines.

  • Right-click the virtual machine and select All vSphere Replication Actions > Configure replication.
  • Select Replicate to a vCenter Server.
  • Select the target site.
    1. If you want to configure a replication to a local target site, select the target site from the list and click Next.

If the source and target sites are not connected, the connection between the sites is configured when you click Next.

    1. If you want to configure a replication to a remote target site, and the source and target sites are connected, select the target site from the list and click Next.
    2. If you want to configure a replication to a remote target site, and the source and target sites are not connected, click Add Remote Site), enter the IP address or host name of the server where the target PSC runs, and provide the credentials of a user that has the VRM remote > Manage VRM privilege assigned. When the user is authenticated with the target site, all vCenter Server instances on which the vSphere Replication Management Server is registered with the Lookup Service appear in the list of target sites. Select the target site from the list and click OK and Next.
  • Accept the automatic assignment of a vSphere Replication server or select a particular server on the target site and click Next.
  • On the Target Location page, click Edit to select or change the target location datastore.

Optionally, you can select the virtual machine storage policy.

  • To configure the replication of individual disks, click the name of the source virtual machine.

The list of disks on the source virtual machine expands.

For each disk, you can select the virtual format, storage policy, and a datastore where it is replicated. You can disable the replication of a disk by clicking Disable in its Replication Enabled row.

  • On the Replication options page, select the quiescing method for the guest operating system of the source virtual machine.
  • Select Enable network compression for VR data.

Compressing the replication data that is transferred through the network saves network bandwidth and might help reduce the amount of buffer memory used on the vSphere Replicationserver. However, compressing and decompressing data requires more CPU resources on both the source site and the server that manages the target datastore.

  • On the Recovery settings page, use the RPO slider or the time spinners to set the acceptable period for which data can be lost in the case of a site failure.

The available RPO range is from 5 minutes to 24 hours for target and source sites.

  • To save multiple replication instances that can be converted to snapshots of the source virtual machine during recovery, select Enable in the Point in time instances pane, and adjust the number of instances to keep.

The number of replication instances that vSphere Replication keeps depends on the configured retention policy, but also requires that the RPO period is short enough for these instances to be created. Because vSphere Replication does not check whether the RPO settings will create enough instances to keep, and does not display a warning message if the instances are not enough, you must ensure that you set vSphere Replication to create the instances that you want to keep. For example, if you set vSphere Replication to keep 6 replication instances per day, the RPO period should not exceed 4 hours, so that vSphere Replication can create 6 instances in 24 hours.

  • Click Next.
  • On the Ready to complete page, review the replication settings, and click Finish.

Configure Replication for Multiple Virtual Machines to vCenter Server

Prerequisites

  • Verify that the vSphere Replication appliance is deployed at the source and the target sites.
  • To enable the quiescing of virtual machines that run Linux guest OS, install the latest version of VMware Tools on each Linux machine that you plan to replicate.
  • On the vSphere Web Client Home page, click vSphere Replication.
  • Select a vCenter Server and click the VMs tab.

The Virtual Machines tab lists the virtual machines.

  • Right-click the virtual machine and select All vSphere Replication Actions > Configure replication.
  • Select Replicate to a vCenter Server.
  • Select the target site.

If you want to configure a replication to a local target site, select the target site from the list and click Next.

If the source and target sites are not connected, the connection between the sites is configured when you click Next.

If you want to configure a replication to a remote target site, and the source and target sites are connected, select the target site from the list and click Next.

If you want to configure a replication to a remote target site, and the source and target sites are not connected, click Add Remote Site), enter the IP address or host name of the server where the target PSC runs, and provide the credentials of a user that has the VRM remote > Manage VRM privilege assigned. When the user is authenticated with the target site, all vCenter Server instances on which the vSphere Replication Management Server is registered with the Lookup Service appear in the list of target sites. Select the target site from the list and click OK and Next.

  • Accept the automatic assignment of a vSphere Replication server or select a particular server on the target site and click Next.
  • On the Target Location page, click Edit to select or change the target location datastore.

Optionally, you can select the virtual machine storage policy.

  • To configure the replication of individual disks, click the name of the source virtual machine.

The list of disks on the source virtual machine expands.

For each disk, you can select the virtual format, storage policy, and a datastore where it is replicated. You can disable the replication of a disk by clicking Disable in its Replication Enabled row.

  • On the Replication options page, select the quiescing method for the guest operating system of the source virtual machine.
  • Select Enable network compression for VR data.

Compressing the replication data that is transferred through the network saves network bandwidth and might help reduce the amount of buffer memory used on the vSphere Replicationserver. However, compressing and decompressing data requires more CPU resources on both the source site and the server that manages the target datastore.

  • On the Recovery settings page, use the RPO slider or the time spinners to set the acceptable period for which data can be lost in the case of a site failure.

The available RPO range is from 5 minutes to 24 hours for target and source sites.

  • To save multiple replication instances that can be converted to snapshots of the source virtual machine during recovery, select Enable in the Point in time instances pane, and adjust the number of instances to keep.

The number of replication instances that vSphere Replication keeps depends on the configured retention policy, but also requires that the RPO period is short enough for these instances to be created. Because vSphere Replication does not check whether the RPO settings will create enough instances to keep, and does not display a warning message if the instances are not enough, you must ensure that you set vSphere Replication to create the instances that you want to keep. For example, if you set vSphere Replication to keep 6 replication instances per day, the RPO period should not exceed 4 hours, so that vSphere Replication can create 6 instances in 24 hours.

  1. Click Next.
  2. On the Ready to complete page, review the replication settings, and click Finish.

Recover a VM using vSphere Replication

With vSphere Replication, you can recover virtual machines that were successfully replicated at the target site. You can recover one virtual machine at a time.

Prerequisites

Verify that the virtual machine at the source site is powered off. If the virtual machine is powered on, an error message reminds you to power it off.

  • Log in to the target site by using the vSphere Web Client.
  • On the Incoming Replications tab, right-click the virtual machine to recover and select Recovery.
  • Select whether to recover the virtual machine with all the latest data, or to recover the virtual machine with the most recent data available on the target site.

Synchronize recent changes

Performs a full synchronization of the virtual machine from the source site to the target site before recovering the virtual machine. Selecting this option avoids data loss, but it is only available if the data of the source virtual machine is accessible. You can only select this option if the virtual machine is powered off.

Use latest available data

Recovers the virtual machine by using the data from the most recent replication on the target site, without performing synchronization. Selecting this option results in the loss of any data that has changed since the most recent replication. Select this option if the source virtual machine is inaccessible or if its disks are corrupted.

  • Select the recovery folder and click Next.
  • Select the target compute resource and click Next.
  • If the virtual machine contains hard disks for which you have not enabled replication, select a target destination to attach an existing disk or detach the disk, and click Next.

This page only appears if the virtual machine contains hard disks for which you have not enabled replication.

To select a target destination, click Browse and navigate to a folder on a datastore in which disk file is placed.

To detach the disk and exclude disk files from the recovery, click Detach.

  • Select Power on after recovery.
  • Click Finish.

Perform a failback operation using vSphere Replication

Failback of virtual machines between vCenter Server sites is a manual task in vSphere Replication. Automated failback is not available.

After performing a successful recovery on the target vCenter Server site, you can perform failback. You log in to the target site and manually configure a new replication in the reverse direction, from the target site to the source site. The disks on the source site are used as replication seeds, so that vSphere Replication only synchronizes the changes made to the disk files on the target site. For more information on replication seeds.

Before you configure a reverse replication, you must unregister the virtual machine from the inventory on the source site.

Deploy a pair of vSphere Replication virtual appliances

The vSphere Replication appliance includes a vSphere Replication server. However, you might need to deploy multiple vSphere Replication servers to meet your load balancing needs.

You can deploy multiple vSphere Replication servers to route traffic from source hosts to target datastores without traveling between different sites managed by the same vCenter Server.

Prerequisites

  • Deploy vSphere Replication appliances on the source and target sites.
  • Deploy vSphere Replication servers on a network that allows them to communicate with the vSphere Replication appliances on the source and target sites.
  • Verify that the vSphere Replication servers can communicate with the ESXi Server instances on the source site that hosts the replicated virtual machines.
  • In the vSphere Web Client, start the OVF deployment wizard from Configure > vSphere Replication > Replication Servers.
  • Browse for the vSphere_Replication_AddOn_OVF10.ovf, vSphere_Replication-system.vmdk, and vSphere_Replication-support.vmdk files, select them, and click Next.
  • Review the virtual appliance details and click Next.
  • Follow the prompts to select a destination host, datastore, and disk format for the virtual appliance.
  • Enter a password for the appliance that is at least eight characters long.
  • Set the network properties. Select DHCP or set a static IP address.

You can change network settings after deployment in the VAMI.

  • Review your settings and click Finish.
  • Power on the vSphere Replication appliance.