Templates are groups of primary copies of virtual machines, ready for instantiating. Replicating vApp templates to a site allows the tenants there to deploy consistently configured sets of virtual machines across multiple VMware Cloud Director instances.

A vApp template represents a collection of always powered off or suspended virtual machine images loaded with an operating system, configured applications, networks, and data.

VMware Cloud Director Availability 4.6 introduces vApp templates protections with the differences to migrations being options for tracking the source for changes and also once migrated - automatic migration for creating new destination copies on each source change.

Note: The vApp templates protections do not operate with SLA profiles. To protect vApp templates activate the Custom SLA settings toggle in the replication policy assigned to the organization. For information about activating this toggle in the policy, see Edit a replication policy.

If the Custom SLA settings toggle is not activated in the policy, then the vApp template protection fails at creation with the following error message: Replication with custom SLA settings can not be configured because it violates policy 'Policy-name' configured at site 'Site-name'.

vApp Templates Replications

First, choose a replication direction for the templates:
  • Click Incoming Replications.
  • Alternatively, click Outgoing Replications.

Then, on the Direction Replications page, for the vApp templates replications click the Templates tab.

Create a New vApp Templates Migration

On the Templates tab:
  • Click the New Migration button.
  • Alternatively, click All Actions > New Migration.
The New Direction Migration wizard opens.
  1. On the Catalogs page, configure the source migration settings then click Next.
    1. Select a source catalog.

      The table shows only catalogs owned by the selected Source organization from the drop-down menu.

      The tenants also see shared catalogs between organizations. To show a shared catalog, the providers must select the source organization sharing it.

      Catalogs that are subscribed to other catalogs are excluded from the available destination catalogs only for tenants. For providers, they still appear, but attempting a migrate later shows an error.

    2. Select one or more source vApp templates for migrating.
  2. On the Destination VDC and Storage policy page, configure the destination settings then click Next.
    1. Select a virtual data center from the destination site as a replication target.
    2. Select the new destination storage policy for placing the recovered virtual machines.

      If the destination catalog has differing storage policies assigned, the selected storage policy only applies to the replica files and might differ from the storage policy of the migration catalog. Similar to vApp or virtual machine migrations, template migrations allow changing the storage policy before the recovery.

      The resulting vApp template matches the datastore catalog.

  3. On the Settings page, configure the migration settings then click Next.
    1. Optionally, to compress the replication traffic, leave the toggle active. The traffic compression lowers the network requirements at the expense of higher CPU consumption for the Replicator Appliance instances.
    2. Optionally, delay the synchronization start and set the time for the first synchronization of the templates migration.
      Note: By not scheduling the time for the initial synchronization, it must be performed later either manually or during Migrate.
  4. On the Ready to complete page, verify the selected migration settings then click Finish.

Create a New vApp Templates Protection

On the Templates tab:
  • Click the New Protection button.
  • Alternatively, click All Actions > New Protection.
The New Direction Protection wizard opens.
  1. On the Catalogs page, configure the source protection settings then click Next.
    1. Select a source catalog.

      The table shows only catalogs owned by the selected Source organization from the drop-down menu.

      The tenants also see shared catalogs between organizations. To show a shared catalog, the providers must select the source organization sharing it.

      Catalogs that are subscribed to other catalogs are excluded from the available destination catalogs only for tenants. For providers, they still appear, but attempting a migrate later shows an error.

    2. Select one or more source vApp templates for protecting.
  2. On the Destination VDC and Storage policy page, configure the destination settings then click Next.
    1. Select a virtual data center from the destination site as a replication target.
    2. Select the new destination storage policy for placing the recovered virtual machines.

      If the destination catalog has differing storage policies assigned, the selected storage policy only applies to the replica files and might differ from the storage policy of the protection catalog. Similar to vApp or virtual machine protections, template protections allow changing the storage policy before the recovery.

      The resulting vApp template matches the datastore catalog.

  3. On the Settings page, configure the protection settings then click Next.
    1. Optionally, leave the Track source for changes checkbox activated to track any changes in the source template, then start a new protection for the new version of the template. The protection for the old version automatically stops.
    2. Optionally, leave the delay and set a time interval for the ongoing automatic synchronization of the templates protection.
      Note: The synchronization could take longer than the configured time window and might finish after the interval is over.
    3. Configure the Automatic migrate behaviour:
      • Select Replace destination template to keep replicating in one and the same destination template and replace it when new source template versions are detected.
      • Leave Create a new copy of the destination template and keep the old versions selected to always replicate to new destination template copies when new source template versions are detected.
      Note: To activate the automatic migrate, first manually perform a migrate. After its initial synchronization, when in the source VMware Cloud Director you select Overwrite catalog item for the already protected template, VMware Cloud Director shortly deletes it from its catalog and re-creates it as a new template with a new ID and the same name. Then VMware Cloud Director Availability creates a new template protection, synchronizes it and deletes the old one. This either happens within 5 minutes of the change when no time interval is configured for the synchronization, or with configured time interval - only within it VMware Cloud Director Availability picks the latest source template changes.
    4. Optionally, to compress the replication traffic, leave the toggle active. The traffic compression lowers the network requirements at the expense of higher CPU consumption for the Replicator Appliance instances.
      Note:
      • If the organization has no SLA profiles assigned, the Compress replication traffic toggle shows on the Settings page and you can configure it either now when creating the protection, or later by clicking All Actions > Replication Settings.
      • If the organization has one or more SLA profiles assigned, the Compress replication traffic toggle does not show on the Settings page. Later, you can still configure it by clicking All Actions > Replication Settings.
  4. On the Ready to complete page, verify the selected protection settings then click Finish.
    Note:
    • With no SLA profiles assigned to the organization, Compress replication traffic shows the value that you configured on the Settings page.
    • With a single SLA profile assigned to the organization, Compress replication traffic shows the value according to the already assigned SLA profile.
    • With multiple SLA profiles assigned to the organization, Compress replication traffic shows the value according to the first SLA profile, counted in alphabetic order.

Templates Replication and Recovery Settings

Note: Both the network settings and the guest customization settings persist between auto-created template protections only while the names of the virtual machines remain the same between the template versions. By changing the virtual machines names in the source results in copying the network settings from the source template, with no guest customization settings applied in the destination for the next template version.
On the Templates tab, select one or more already existing templates replications, then click:
  • All Actions > Replication Settings and in the Edit Replication Settings window configure the available replication settings depending on both the type of the selected replications and whether already migrated, then click Apply.
    Table 1. Edit Replication Settings
    Protection Migration
    Track source for changes - by leaving this checkbox active tracks any changes in the source template, and starts a new protection for the new version of the template. Then the protection for the old version automatically stops. Not available for migrations.
    Set a time interval that is convenient for the automatic synchronization.
    Note: The synchronization can take longer than the configured time window and can finish after the interval is over.
    Automatic migrate behaviour:
    • Select Replace destination template to keep replicating in one and the same destination template and replace it when new source template versions are detected.
    • Leave Create a new copy of the destination template and keep the old versions selected to always replicate to new destination template copies when new source template versions are detected.
    Note: To activate the automatic migrate, first manually perform a migrate. After its initial synchronization, when in the source VMware Cloud Director you select Overwrite catalog item for the already protected template, VMware Cloud Director shortly deletes it from its catalog and re-creates it as a new template with a new ID and the same name. Then VMware Cloud Director Availability creates a new template protection, synchronizes it and deletes the old one. This either happens within 5 minutes of the change when no time interval is configured for the synchronization, or with configured time interval - only within it VMware Cloud Director Availability picks the latest source template changes.
    Compress replication traffic - The traffic compression lowers the network requirements at the expense of higher CPU consumption for the Replicator Appliance instances.
    Note: After performing migrate, for both protections and migrations the compression can no longer be modified.
  • All Actions > Recovery settings then in the Recovery settings window click Networks and for the vApps and virtual machines configure the source vApp template networks connectivity with the target networks after migrate, then click Apply.
    Note: After performing migrate, for both protections and migrations the network settings can no longer be modified.
  • All Actions > Change owner and in the Change Replication Owner window, choose a new owner organization, then click Apply:
    • System organization
    • Tenant organization
  • All Actions > Change storage policy in the Edit storage policy window, select the new storage policy placement, then click Apply.

Migrate vApp Templates

On the Templates tab, select one or more existing templates protections and migrations, then:
  • Click Migrate.
  • Alternatively, click All Actions > Migrate.

The Migrate vApp Templates wizard opens.

  1. On the Destination Catalog page, select a destination catalog owned by the destination organization.
  2. On the Network Settings page, choose the destination network settings.
    • Apply preconfigured network settings on migrate keeps the source vApp networks with their connectivity.
    • Connect all VMs to network, then select the destination-network.
  3. On the Ready to Complete page, verify the selected migration settings and click Finish.

In the destination site, during the migration process, VMware Cloud Director Availability creates a temporary vApp that is an instantiated source template. After completing the migration, VMware Cloud Director Availability captures this temporary vApp in a template in the destination catalog. After a successful capture, it deletes the temporary vApp, leaving only the template. There is a point in time during the template migration when VMware Cloud Director contains both the temporary vApp and the vApp template and vSphere shows both the virtual machines and their temp copies.

Synchronize the vApp Templates Replications

On the Templates tab, select one or more existing templates migrations, then click:
  • All Actions > Sync performs an offline synchronization after clicking Sync. The disks of the virtual machines are locked and the source template is not usable until the synchronization operation completes.
  • All Actions > Pause pauses the selected replications and does not send data to the destination site after clicking Pause.
  • All Actions > Resume resumes the selected paused replications and starts sending data again at the configured time after clicking Resume.
Performing migrate, performing synchronization, or scheduling a delayed initial synchronization, each performs an offline synchronization that cannot be interrupted. This synchronization locks the source virtual machines disks. As a result, until this synchronization completes:
  • Cannot use the source virtual machines included in the template.
  • Cannot instantiate the source template.
Note: VMware Cloud Director Availability cannot replicate templates with one or more encrypted virtual machines. Also, tenants without the vApp: View VM and VM's Disks Encryption Status right see the template tagged with encryption set to N/A as all the virtual machines in the template have an encrypted value 'null'. For more information, see Create a replication for encrypted virtual machines.