Error: "Error while importing content hub App" while importing Virtual Machine from VMware Marketplace
search cancel

Error: "Error while importing content hub App" while importing Virtual Machine from VMware Marketplace

book

Article ID: 425854

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When you try adding any Virtual Machine(VM) from VMware marketplace in VMware Cloud Director(VCD), the importing task fails with the error:

    [ ########-####-####-####-########0521 ] Error while importing content hub App Bitnami Virtual Appliance for Apache Tomcat(com.vmware.vcloud.entity.appTemplate:########-####-####-####-########ab49)

  • From the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log in VCD cell you can see the below error:

    400 Bad Request: "{"response":{"message":"Failed to subscribe products: User is not authorized to perform this action","statuscode":400}}<EOL>"
            at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:101)
            at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168)
            at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)
            ...
    Caused by: com.vmware.vcloud.api.presentation.service.InternalServerErrorException: Error while importing content hub App Bitnami Virtual Appliance for Apache Airflow(com.vmware.vcloud.entity.appTemplate:########-####-####-####-########ab49)
            at com.vmware.cl.activities.CreateAppTemplateActivity$CreateAppTemplateBackingsPhase.invoke(CreateAppTemplateActivity.java:131)
            at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)
            at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)

Environment

VMware Cloud Director 10.6.1.1

Cause

The issue occurs because the user that generated the API token does not have access or permission for Marketplace. If you want to see for access or permission in Marketplace please go the link:
https://console.cloud.broadcom.com/services

Resolution

To resolve the issue please contact your Broadcom, account teams for granting of access to the marketplace to achieve this feature.

After getting the adequate permissions in Marketplace please generate the API token using the Marketplace User scope for using Marketplace to import VMs. To generate API Token use the below steps:

  1. Open the web browser and go to the link: https://console.cloud.broadcom.com/services
  2. After you log in click on the username of the account on the top right corner.
  3. Click on My Account.
  4. Click on API Tokens and then click on Generate New API Token.
  5. Fill in the Token Name and the Token TTL.
  6. Enter VMware Marketplace for Service Role Name.
  7. Click the drop down for Select Roles and select the role Marketplace User.
  8. Click on OpenID if you want to check it depending upon your enviornment.
  9. Finally click on Generate New Token on the top right of the screen to generate the token to be used in VCD.