The storage policy drives the encryption for virtual machines. Enable the encryption in the storage policy then assign it to the virtual machine configuration files and its disks. The replication follows the encryption status. First encrypt the virtual machines before adding them in the replication.

Important: Cannot replicate a vApp containing both encrypted and non-encrypted virtual machines.
If the replicated virtual machine changes from encrypted to unencrypted, reestablish the replication by stopping it then starting it.

Prerequisites

Prerequisites for the versions in the source and in the destination sites:
  • For vSphere DR and migration, use vCenter Server 7.0 U2 or later and VMware Cloud Director Availability 4.5 or later in both the source and the destination site.
  • Alternatively, for cloud sites backed by VMware Cloud Director, use vCenter Server 6.7 U3 or later, any supported version of VMware Cloud Director Availability, and VMware Cloud Director 10.1 or later.
Prerequisites for the ESXi hosts in both the source and in the destination sites:
Install the HBR agent VIB in all the ESXi hosts. To download the HBR agent VIB file directly from the appliance:
  • Depending on the appliance type and deployment, from the following URL on the appliance download the:
    • https://vCenter_Replication_Management_Appliance_Address:8043/hbr-agent.vib file.
    • https://Replicator_Appliance_Address/hbr-agent.vib file.
  • Alternatively, from the appliance filesystem, download the /opt/vmware/hbr/vib/vmware-hbr-agent-build_number.i386.vib file.
After installing the HBR agent, it encrypts the traffic originating from the source ESXi host, providing end-to-end encryption. Installing the HBR agent in the destination ESXi host allows reversing the replications and the reverse replications traffic is also encrypted end-to-end.

For more information about VIBs and how to install them, see VIBs, Image Profiles, and Software Depots in the VMware ESXi Upgrade Guide.

Prerequisites for the vCenter Server instances in both the source and in the destination sites:
  • Configure a key provider in vSphere. For more information, see Virtual Machine Encryption in the vSphere Security Guide:
    • For vSphere 7.0 and later, configure a VMware vSphere® Native Key Provider™ which does not require an external key server. For more information, see Configuring and Managing vSphere Native Key Provider in the vSphere Security Guide.
    • Alternatively, for vSphere 6.x or 7.x and cloud sites backed by VMware Cloud Director, configure an external key server, previously known as Key Management Server cluster and ensure that the cluster names match. For information about configuring a standard key provider, see Set up the Key Management Server Cluster in the vSphere Security Guide.
  • Use the same key provider for both the source and the destination vCenter Server instances. For more information, see vSphere Native Key Provider Overview in the vSphere Security Guide.

    To ensure that both sites use the same vSphere key provider, for example, backup the key provider from site A then restore it and set it as default in site B.

Prerequisites for cloud sites backed by VMware Cloud Director:

Procedure

  1. In the left pane, choose a replication direction.
    • For a replication between cloud sites backed by VMware Cloud Director, choose either an incoming replication from a cloud site, or an outgoing replication to a cloud site.
    • For vSphere DR and migration, encrypted replications support all replication directions and you can choose any replication direction.
  2. To create a replication for encrypted virtual machines, select either new protection or new migration.
    • Click All Actions > New Protection.
    • Click All Actions > New Migration.
  3. Complete the New Replication wizard.
    1. In the Cloud vApps and VMs page, select only virtual machines that show status Yes in the Encrypted column, and click Next.
      Note: In a replication for encrypted virtual machines, select only encrypted virtual machines.
    2. In the Destination VDC and Storage policy page under Storage policy, select a storage policy that shows Encrypted in the Encryption capability column and click Next.
      After selecting an encrypted virtual machine, you can only select an encrypted storage policy.
    3. In the Settings page, configure the replication settings and click Next.
    4. If in the Settings page you selected Configure Seed VMs, in the Seed VM page select the seed and click Next.
    5. In the Ready to Complete page, verify that the replication settings are correct and click Finish.
    The initial synchronization of a replication containing an encrypted virtual machine takes longer to complete than a replication with the same settings that contains a non-encrypted virtual machine with the same hardware.

Results

The new replication that contains only encrypted virtual machines uses encryption for the replication data communication.