Error: "Could not compose a RT vApp for vApp replication..." when adding a VM replication to an existing vApp replication
search cancel

Error: "Could not compose a RT vApp for vApp replication..." when adding a VM replication to an existing vApp replication

book

Article ID: 369638

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Adding a VM replication to an existing vApp replication that does not yet have replication tracking configured in Cloud Director Availability (VCDA) fails, and you see a message similar to:

Could not compose a RT vApp for vApp replication with id 'C4VAPP-########-####-####-####-########996f.

  • In the /opt/vmware/h4/cloud/log/cloud.log file on the destination Cloud Director Replication Management Appliance, you see entries similar to:

2024-04-08 06:12:11.068 ERROR - [UI-########-####-####-####-########fecc-r1898-CT] [job-68] com.vmware.h4.cloud.service.RtVmService  : Failed to recompose vapp.

com.vmware.vcloud.client.exception.VcloudException: (Major code = 403, minor code = ACCESS_TO_RESOURCE_IS_FORBIDDEN) - [ UI-########-####-####-####-########fecc-r1898-CT-########-####-####-####-########f268 ] Either you need some or all of the following rights [Base] to perform operations [VAPP_VIEW] for ########-####-####-####-########6a76 or the target entity is invalid.
        at com.vmware.vcloud.client.VcloudClient.lambda$defaultErrorDeserializer$0(VcloudClient.java:297)
        at com.vmware.rest.client.AbstractRestClient.convert(AbstractRestClient.java:227)
        at com.vmware.vcloud.client.XmlRestClient.exchange(XmlRestClient.java:106)
        at com.vmware.vcloud.client.XmlRestClient.exchange(XmlRestClient.java:72)
        at com.vmware.vcloud.client.VcloudClient.exchange(VcloudClient.java:258)
        at com.vmware.vcloud.client.VcloudClient._recomposeVapp(VcloudClient.java:808)
        at com.vmware.h4.cloud.service.RtVmService.moveVmIntoVApp(RtVmService.java:355)
        ...

2024-04-08 06:12:11.068 ERROR - [UI-########-####-####-####-########fecc-r1898-CT] [job-68] com.vmware.h4.jobengine.JobExecution     : Task ########-####-####-####-########3f6f (WorkflowInfo{type='start', resourceType='vmReplication', resourceId='C4-########-####-####-####-########1b5a', isPrivate=false, resourceName='null'}) has failed

com.vmware.h4.cloud.api.exceptions.FailedToComposeRTVApp: Could not compose a RT vApp for vApp replication with id 'C4VAPP-########-####-####-####-########996f.
        at com.vmware.h4.cloud.service.RtVmService.composeRtVapp(RtVmService.java:337)
        at com.vmware.h4.cloud.job.VmReplicationJob.recomposeRtVapp(VmReplicationJob.java:984)
        at com.vmware.h4.cloud.job.VmReplicationJob.constructRtVApp(VmReplicationJob.java:975)
        ...

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

  • VMware Cloud Director Availability 4.7
  • VMware Cloud Director 10.5.1

Cause

This issue occurs when there is a stale Replication Tracking vApp (RT vApp) that is in an invalid state which prevents Replication Tracking VMs (RT VMs) from being added to it while grouping a VM replication with an existing vApp replication.

Resolution

To resolve this issue, delete the stale RT vApp from Cloud Director (VCD) and then configure the VM replication again, grouping it with the existing vApp replication.

  1. Navigate to the destination Cloud Director Availability Provider Portal and log in as a System Administrator user.
  2. In the Incoming Replications view, click the Show Columns icon at the bottom of the page.
  3. In the pop-up menu, select the RT vApp/VM ID column and close the menu.
  4. Find the impacted vApp replication and take note of the RT vApp ID.
  5. Log into the destination Cloud Director API as a System Administrator user.
  6. Verify the stale RT vApp exists by running the following API call:

    GET https://vcd.example.com/api/vApp/vapp-<RT vApp ID>

    Headers:
    Authorization:Bearer <VCD access token>
    Accept:application/*+xml;version=<VCD API version>

  7. Delete the stale RT vApp by running the following API call:

    DELETE https://vcd.example.com/api/vApp/vapp-<RT vApp ID>

    Headers:
    Authorization:Bearer <VCD access token>
    Accept:application/*+xml;version=<VCD API version>

  8. Return to the Cloud Director Availability Portal and configure the VM replication.

Additional Information

For more information about using the Cloud Director API, see the VMware Cloud Director API Programming Guide for Service Providers.