VMware Cloud Community
ymichalak
Hot Shot
Hot Shot
Jump to solution

[INFRASTRUCTURE] - EXPORT / IMPORT from Dev to Staging environment : ERROR 404

Hi guyz,

we work actually on three vRA environment "Dev, Staging & Production".

We have a DEV environement UP & RUNNING and we want to replicate it to vRA Staging environement.

We have used :

- PowervRA script : https://paulsmithit.wordpress.com/2017/07/19/exporting-and-importing-vra-content-using-powervra/comm...

and tried also with :

- Vcloud Client : https://dailyhypervisor.com/using-the-vra-cloud-client-to-export-and-import-blueprints

but we always the same RESULT.

Our XAAS blueprint doesn't work with this error:

2017-12-28 13:29:32,698 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--45" tenant="smartcloud-dev" context="J4BY0v71" parent="J4BY0v71" token="TiaC3H6k"] com.vmware.vcac.designer.service.catalog.controller.CsFormsController.getFormBatchUpdate:246 - Error while retrieving form metadata for form Request.Submit for binding smartcloud-dev!::!39532f66-6142-41ff-ac2f-71894b6f7cec. Reason org.springframework.web.client.HttpClientErrorException: 404

2017-12-28 13:29:32,700 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--45" tenant="smartcloud-dev" context="J4BY0v71" parent="J4BY0v71" token="TiaC3H6k"] com.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleHttpStatusCodeException:673 - 404

org.springframework.web.client.HttpClientErrorException: 404

We have try lot of VMware KB without succes.

Do you have an IDEA please ?

Reply
0 Kudos
1 Solution

Accepted Solutions
ymichalak
Hot Shot
Hot Shot
Jump to solution

Yep,

sorry for the delay 🙂

We have found the reason.

When we export then import all elements from vRA the ID's of XaaS & IaaS blueprint are differents.

So when the XaaS blueprint try to call a IaaS blueprint this IaaS blueprint is not find.

We have just removed the old IaaS BP from XaaS BP and added again.

And now it's works.

bp.jpg

View solution in original post

Reply
0 Kudos
10 Replies
daphnissov
Immortal
Immortal
Jump to solution

Show the output of your vra cloud client command listing content and also the command you're using to export said content.

Reply
0 Kudos
ymichalak
Hot Shot
Hot Shot
Jump to solution

vCloud Client command :

vra content export --path C:\cloudclient\Export --id 07c92af7-d432-4a90-ae37-4f7bced89f23 --content-id "ASSET - Form request generic for server provisionning"

vra content import --path C:\VMware_vRealize_CloudClient-4.4.0-5511232\Import\92ba6b18-4055-41ab-807d-579ee9476231-xaas-blueprint.zip --resolution OVERWRITE --precheck WARN --verbose

or Power Vra Script

#written by Paul Smith paulsmithit.wordpress.com

#7/19/17

#v1

#This script will export ALL contents from a source vRA instance and import ALL into a destination vRA instance.

#This script uses the PowervRA Module. To get the module from the PowerShell gallery, run PowerShell as an administrator and un-comment the line below.

#Install-Module -Name PowerVra

$sourceVra = "smartcloud.xxx.com"

$destinationVra = "smartcloud-dev.xxxx.com"

$sourceUser = "myuser@.com"

$destUser = "myuser@.com"

$packageName = "Exportv4"

$filePath = "C:\Users\ymichal\Desktop\export"

#connect to the source vRA instance

Connect-vRAServer -Server $sourceVra -Tenant smartcloud -Username $sourceUser

#create a package containing all vRA contents

$package = Get-vRAContent | ? {$_.TenantId -ne '_internal'} | New-vRAPackage -Name $packageName -Description 'All Content'

#export the pakcage as a zip file to a local dir

Export-vRAPackage -Id $package.id -Path $filePath

#disconnect from the source vRA instance

Disconnect-vRAServer -Confirm:$false

#connect to the destination vRA instance

Connect-vRAServer -Server $destinationVra -Tenant smartcloud-dev -Username $destUser

#test the import of the pakage on the destination vRA instance

Write-Host "Testing package import against $destinationVra"

do {

$test = Test-vRAPackage -File "$filePath\$packageName.zip"

$success = $true

foreach ($item in $test.operationResults) {

if ($item.operationStatus -eq "FAILED") {

$success = $false

Write-Host $item.contentName

Write-Host $item.operationErrors

}

}

if (!$success) {

Write-host "FIX ABOVE ERRORS"

pause

}

}

until ($success)

Write-Host "No errors were found during testing"

#import the package on the destination vRA instance

Write-Host "Importing contents to $destinationvRA"

do {

$imp = Import-vRAPackage -File "$filePath\$packageName.zip"

$success = $true

foreach ($item in $imp.operationResults) {

if ($item.operationStatus -eq "FAILED") {

$success = $false

Write-Host $item.contentName

Write-Host $item.operationErrors

}

}

if (!$success) {

Write-host "FIX ABOVE ERRORS"

pause

}

}

until ($success)

Write-Host "All contents have been successfully imported"

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Show your output of the command vra content list from your CC session.

Reply
0 Kudos
ymichalak
Hot Shot
Hot Shot
Jump to solution

This ?

CloudClient>vra content list --pageSize 100

+--------------------------------------+--------------

---------------------------------+--------------------

---------------------------+-------------------------+

| id                                   | contentId

                                 | name

                           | contentTypeId           |

+--------------------------------------+--------------

---------------------------------+--------------------

---------------------------+-------------------------+

| 58c3e812-f361-402f-8ff3-aeabba44b86e | 937b05cc-cfca

                                 | Create a snapshot

                           | xaas-resource-action    |

| 0cdfb5cb-8079-4017-96e6-254b245bb21d | ADP_Network

                                 | ADP_Network

                           | property-definition     |

| 001fb214-904a-41ad-ac1f-c7387d6f619f | AllLifecycle

                                 | All Lifecycle

                           | property-group          |

| 44379fe5-ed6e-49e1-b858-cc01f7bb2b1c | image_ValueSe

                                 | ValueSet.fz

                           | component-profile-value |

| 6095b409-d85d-4775-9e31-dc393dd80b6a | ADP_SLA

                                 | ADP_SLA

                           | property-definition     |

| 4c0ae415-679e-4336-91aa-b0879701220e | b4eb501f-bbf6

                                 | Test_luc_prov_wit_u

                           | xaas-blueprint          |

| af25cfce-722b-4db5-893d-8a232a5aae3b | size_ValueSet

                                 | ValueSet.small

                           | component-profile-value |

| fc3ae030-b3b2-4e64-bf0c-a2337ac0df5a | GET_PROPERTIE

                                 | GET_PROPERTIES_VRAt

                           | property-group          |

| 198588e6-89e5-4e0c-b0b0-763a675e90c5 | 85a968f9-cb69

                                 | ServerOrder

                           | xaas-blueprint          |

| 748c35ca-6bcd-41f2-affd-2d2f571218fb | dda3cc3f-f2da

                                 | Azure Virtual Machi

                           | xaas-resource-type      |

| fc649349-1fc5-40f4-b208-f54c587c447d | fa3e5313-1e82

                                 | Delete

                           | xaas-resource-action    |

| f922c328-28da-43f1-a608-3905c6b6adab | ADPDatadisk

                                 | ADP.Datadisk

                           | property-group          |

| 3fafcede-c4f4-4a54-a227-99888a4ab04a | VirtualMachin

                                 | Datadisk size

                           | property-definition     |

| 3c19b473-1cd7-4ac7-8ebb-ae0b8bd77278 | SLA

                                 | SLA

                           | property-definition     |

| f5b2ae6d-96e8-4deb-888b-6ab9fefbd61c | 9fb7229b-9b8b

                                 | ASSET - Suse 12 Lar

                           | xaas-blueprint          |

| 8722fb6b-f812-4735-aad8-ed051ce3c46d | 18793cf3-357e

                                 | Azure Machine

                           | xaas-blueprint          |

| 8d148807-f035-4125-a09c-f31e0f2e610c | 749dd1d9-bb53

                                 | Stop

                           | xaas-resource-action    |

| d274a016-517a-43de-bb92-f29413bf8182 | 93f997e9-0b7f

                                 | ASSET - Suse 12 Med

                           | xaas-blueprint          |

| d30ed7f5-bfb4-4d5c-a1d0-9f33f728785b | 39532f66-6142

                                 | ASSET - Windows 201

                           | xaas-blueprint          |

| 07c92af7-d432-4a90-ae37-4f7bced89f23 | 92ba6b18-4055

                                 | ASSET - Form reques

sionning                   | xaas-blueprint          |

| 5126b42b-4935-44df-8b53-b1d51effb4fc | ASSET_ADD_to_

indows                           | ASSET_ADD_to_BladeL

s_V2                       | property-group          |

| 1849976b-df8c-4699-ba0a-c971e55ff273 | fd29bd8f-ea9e

                                 | IaaS vCD VM

                           | xaas-resource-mapping   |

| 527666ba-b953-4aa5-8e3b-d54d4aaa555f | a23ff0b7-c861

                                 | Deployment

                           | xaas-resource-mapping   |

| b70e1d8e-129a-4cba-a323-e8192be8e0a7 | a84272d1-513e

                                 | ASSET - Suse 12 Sma

                           | xaas-blueprint          |

| 0809771d-8e52-44e8-a962-ffd66738a08d | size_ValueSet

                                 | ValueSet.assetSmall

                           | component-profile-value |

| 5716cefc-6544-4eb2-98fa-b38e6ecb76ea | size_ValueSet

                                 | ValueSet.assetMediu

                           | component-profile-value |

| c013eef3-6d00-448c-bcb6-33f9deb6a2f2 | 9da0dafb-ad29

                                 | Reboot guest OS

                           | xaas-resource-action    |

| 09af38b7-a610-4d01-985f-0a111a8fe638 | adp.size.ram

                                 | adp.size.ram

                           | property-definition     |

| e96df833-830a-46dc-ab62-b43a7d6526ac | adp.size.disk

                                 | adp.size.disk.syste

                           | property-definition     |

| cbaf7e22-4bc5-4f74-afaf-b56ef480fb24 | adp.size.disk

                                 | adp.size.disk.data

                           | property-definition     |

| a459c938-b6ff-42c3-a9f4-a5cb74fb308d | adp.suse12.si

                                 | adp.suse12.size.dis

                           | property-definition     |

| 68e70cb2-1560-4b9c-89e0-1e89575b2870 | 445db505-f547

                                 | Z - form request DO

                           | xaas-blueprint          |

| 3c56d67e-70c5-4253-b0f2-883c9e1ffc21 | adpsuse12size

                                 | adp.suse12.size.sma

                           | property-group          |

| 56c3bee0-9821-4338-8859-516fe6bc5db0 | adpsuse12size

                                 | adp.suse12.size.lar

                           | property-group          |

| 01dc92c6-4d75-42b8-b87c-fee2c5e5cf81 | adp.suse12.si

                                 | adp.suse12.size

                           | property-definition     |

| 0867ab3e-830d-4895-b11a-2198b4cef304 | MetaBlueprint

                                 | MetaBlueprintIAAS

                           | composite-blueprint     |

| 909bfb63-7e7a-4acf-8901-32b8ca35a213 | a1e36bf7-846c

                                 | Z - MetaFormXAAS-Li

                           | xaas-blueprint          |

| 929ce1e5-267c-41b5-8dec-9c0ea46ff0f7 | Large

                                 | Large

                           | property-group          |

| 25972ed3-8933-4bc1-a234-34d54f3250a6 | size

                                 | size

                           | property-definition     |

| 5ffedcf9-bb40-4c58-bef0-4b221a12b6e2 | Small

                                 | Small

                           | property-group          |

| f5befdd2-dee1-45ba-8a08-c3a40d409f6d | VirtualMachin

                                 | VirtualMachine.Netw

                           | property-definition     |

| 48936a49-45dd-4bca-a62c-b86bd218b16f | PROVLinux

                                 | PROV Linux

                           | composite-blueprint     |

| 596df3e1-cb60-4b92-ab17-e2d08c44a593 | Monitoring

                                 | Monitoring

                           | property-definition     |

| 91c14821-3430-4161-a7cb-2a7e20ed9cef | size_ValueSet

                                 | ValueSet.assetLarge

                           | component-profile-value |

| 344dd89e-19f6-4425-abfe-5fdea0f53cf1 | Extensibility

MasterWorkflow32.BuildingMachine | Extensibility.Lifec

Workflow32.BuildingMachine | property-definition     |

| b489033b-1ecd-4885-a188-3c2af27646ea | image_ValueSe

                                 | ValueSet.W2K16

                           | component-profile-value |

| 4eecfe9b-6dcd-42e3-b821-7029013158f6 | image_ValueSe

                                 | ValueSet.SLES12

                           | component-profile-value |

| d25420ff-ba8c-44b7-b832-5be119142643 | Windows_Serve

                                 | Windows_Server_2016

                           | composite-blueprint     |

| bacfce42-ce54-4a04-88f3-6e51e88b0e91 | 5afab854-d38d

                                 | Set Nagios Downtime

                           | xaas-blueprint          |

| c7376622-4eda-473e-9285-8e31a269d77b | b7e5bccd-7d2a

                                 | Z - Form Request Ge

                           | xaas-blueprint          |

| efb73cbb-f443-43b0-86e1-0eb0f72008b5 | 6c4b3b0b-9685

                                 | Restart

                           | xaas-resource-action    |

| 478d6710-241f-4b95-a0a2-3770f4c671be | df62d6c6-ca8a

                                 | Windows 2016 Large

                           | xaas-blueprint          |

| c53ad544-a904-4149-aa91-6ab686fea23b | adpsuse12size

                                 | adp.suse12.size.med

                           | property-group          |

| 1a6dd82c-b629-4b9b-b114-b38784ebad4e | Suse_12_gener

                                 | Suse_12_generic

                           | composite-blueprint     |

| fc0ca297-c633-487b-b762-c88cad40b961 | adp.size.cpu

                                 | adp.size.cpu

                           | property-definition     |

| 8936ab23-e396-4c28-84ff-6f8a7a10f657 | BladeLogic_Sp

                                 | ASSET_ADD_to_BladeL

                           | property-group          |

| a4d278eb-a488-487e-9d76-67a243670dee | ADP_CPU

                                 | ADP_CPU

                           | property-definition     |

| 815a58c0-10b9-4680-96d1-935d622c9968 | adp.suse12.si

                                 | adp.suse12.size.cpu

                           | property-definition     |

| e882e76f-2fc0-4b68-a347-ff20e01eaadf | adp.suse12.si

                                 | adp.suse12.size.dis

                           | property-definition     |

| 360b43b4-789b-41e2-a7e4-0e07689c46b9 | c37a25e7-cd01

                                 | Z - MetaFormXAAS DO

                           | xaas-blueprint          |

| c5bdf4a8-0f6b-429d-ae6c-0169e853555a | linuxsmall

                                 | linux.small

                           | property-group          |

| 644e7d00-f84c-4d8f-858c-164496e4fab5 | adp.suse12.si

                                 | Memory (GB)

                           | property-definition     |

| 86914a42-8fd7-43b8-9d85-fe9abb528299 | Medium

                                 | Medium

                           | property-group          |

| 2b6539cd-f651-4682-941e-cc3ea2d47166 | 315b9abc-3a10

                                 | IaaS VC VirtualMach

                           | xaas-resource-mapping   |

| f20d688f-5cef-4982-a175-61e6eb7d700c | 064b0b04-8bfd

                                 | Suse 12 Small old

                           | xaas-blueprint          |

| 6c90db5e-7c5a-43e9-bb35-b325fbba59e3 | adp.operating

                                 | adp.operating.syste

                           | property-definition     |

| f4e139bc-89c6-4103-8225-b242be89a267 | 69bca851-140f

                                 | Suse 12 Medium old

                           | xaas-blueprint          |

| 84480c37-00b5-4d39-8405-8ff5cdd5a3a1 | fb97fb3d-c079

                                 | Suse 12 Large old

                           | xaas-blueprint          |

| dc8b915d-9c4e-4f81-a1f7-2f60e58ed9fd | ADP_Guest_con

                                 | ADP_Guest_config

                           | property-group          |

| 10026e18-610c-4d94-844d-eed2bfd7a66d | f4633e30-dcf6

                                 | Windows 2016 Small

                           | xaas-blueprint          |

| 8283a7b9-417c-43b6-826e-40ad55be5cf9 | ADP_operating

                                 | ADP_operating_syste

                           | property-definition     |

| 6f35b8fd-a7f5-4b44-a3e7-d4c2a5dc2540 | f90efbe4-e84d

                                 | Windows 2016 Medium

                           | xaas-blueprint          |

| 71757560-2197-41ca-87e9-d7eb3abbbc62 | b244dd55-789f

                                 | ASSET - Windows 201

                           | xaas-blueprint          |

| fcb397d0-1777-4b0f-a184-631d98beb9e2 | 6379a166-b84e

                                 | Manage Public IP Ad

                           | xaas-resource-action    |

| 06598767-e77f-467d-a0cb-bb36c7a820d9 | 6972a767-1698

                                 | ASSET - Windows 201

                           | xaas-blueprint          |

| 7dae66c0-1859-48c6-a939-688d3e950e7d | ASSET_DEPLOY_

                                 | ASSET_ADD_to_BladeL

s                          | property-group          |

| 7ac14c49-7086-48c5-880a-32a273b16fd9 | d45ff428-3a90

                                 | Start

                           | xaas-resource-action    |

+--------------------------------------+--------------

---------------------------------+--------------------

---------------------------+-------------------------+

Showing results for [page=1 of 1] [pageSize=100].

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Your export command is wrong. Try like this:

vra content export --path C:\path\to\dir\blah.zip --id 07c92af7-d432-4a90-ae37-4f7bced89f23

In the path parameter, the argument needs to be a fully-qualified path to a ZIP file. You only need the --id parameter and its argument, not anything else.

Reply
0 Kudos
ymichalak
Hot Shot
Hot Shot
Jump to solution

Ok .... We has tried 🙂

EXPORT :

vra content export --path C:\cloudclient\Export\FormRequestGeneric.zip --id 07c92af7-d432-4a90-ae37-4f7bced89f23

IMPORT :

vra content import --path C:\Users\VMware_vRealize_CloudClient-4.4.0-5511232\Import\FormRequestGeneric.zip --resolution OVERWRITE --precheck WARN --verbose

Same ERROR.....:smileydevil:

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Error where? On the export or import?

Reply
0 Kudos
ymichalak
Hot Shot
Hot Shot
Jump to solution

Nop...no error for the EXPORT :

CloudClient>vra content export --path C:\cloudclient\Export\FormRequestGeneric.z

ip --id 07c92af7-d432-4a90-ae37-4f7bced89f23

+------------+

|Notification|

+------------+

* Secure values such as passwords are not exported by default because of securi

ty risk.

* To include passwords in the exported plain text output, you can use the '--se

cure false' parameter.

* Performing export precheck for 92ba6b18-4055-41ab-807d-579ee9476231. This ope

ration checks the validity of the requested content and reports errors.

+----------------------+

|Export Precheck Result|

+----------------------+

SUCCESS : Export precheck finished Success..

* 1 content(s) were prechecked for export successfully and exported.

+-------------+

|Export Result|

+-------------+

SUCCESS : The exported content is at this C:\cloudclient\Export\FormRequestGener

ic.zip path.

and no error for the IMPORT :

CloudClient>vra content import --path C:\Users\VMware_vRealize_CloudClient-4.4.0-5511232\Import\FormRequestGeneric.zip --resolution OVERWRITE --precheck WARN --verbose

+------------+

|Notification|

+------------+

* Performing import precheck for [C:\Users\VMware_vRealize_CloudClient-4.4.0-5511232\Import\FormRequestGeneric.zip]. Note this operation does not import any content.

+--------------+

|Result Details|

+--------------+

[ {

  "contentId" : "92ba6b18-4055-41ab-807d-579ee9476231",

  "contentName" : "ASSET - Form request generic for server provisionning",

  "contentTypeId" : "xaas-blueprint",

  "operationStatus" : "WARNING",

  "messages" : [ "Found matching content, import will overwrite this content." ],

  "operationErrors" : [ ]

} ]

+----------------------+

|Import Precheck Result|

+----------------------+

WARNING : Import precheck finished with warnings.

* 1 content(s) were validated with warnings.

* Nothing was imported.

+------------+

|Notification|

+------------+

* Importing [C:\Users\VMware_vRealize_CloudClient-4.4.0-5511232\Import\FormRequestGeneric.zip]. Note this operation will import the given content unless it encounters failures.

+--------------+

|Result Details|

+--------------+

[ {

  "contentId" : "92ba6b18-4055-41ab-807d-579ee9476231",

  "contentName" : "ASSET - Form request generic for server provisionning",

  "contentTypeId" : "xaas-blueprint",

  "operationStatus" : "WARNING",

  "messages" : [ "Found matching content, import will overwrite this content." ],

  "operationErrors" : [ ]

} ]

+-------------+

|Import Result|

+-------------+

WARNING : Import finished with warnings.

* 1 content(s) were imported successfully.

But when I try to use this XaaS we have this error :

Capture-8.jpg

and this LOG in a CATALINA.OUT :

2017-12-28 14:47:20,578 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--40" tenant="smartcloud-dev" context="NrnjJpp2" parent="NrnjJpp2" token="QGA4n6Vj"] com.vmware.vcac.designer.service.catalog.controller.CsFormsController.getFormBatchUpdate:246 - Error while retrieving form metadata for form Request.Submit for binding smartcloud-dev!::!92ba6b18-4055-41ab-807d-579ee9476231. Reason org.springframework.web.client.HttpClientErrorException: 404

2017-12-28 14:47:20,579 vcac: [component="cafe:advanced-designer" priority="ERROR" thread="tomcat-http--40" tenant="smartcloud-dev" context="NrnjJpp2" parent="NrnjJpp2" token="QGA4n6Vj"] com.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleHttpStatusCodeException:673 - 404

org.springframework.web.client.HttpClientErrorException: 404

2017-12-28 14:47:20,591 vcac: [component="cafe:catalog" priority="ERROR" thread="tomcat-http--6" tenant="smartcloud-dev" context="NrnjJpp2" parent="" token="NrnjJpp2"] com.vmware.vcac.platform.service.rest.resolver.ApplicationExceptionHandler.handleServiceException:201 - [Error code: 20128 ] - [Error Msg: Failed to retrieve form from provider for e0ced309-c05c-4501-8a4f-96de2208c03f.]

com.vmware.vcac.platform.service.exception.ServiceException: Failed to retrieve form from provider for e0ced309-c05c-4501-8a4f-96de2208c03f.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Ok, then the export and import are successful, you're just having problems with the XaaS item after it's imported. So the process works, it's just this particular blueprint. Are you able to attach it here, or at least show the blueprint config?

Reply
0 Kudos
ymichalak
Hot Shot
Hot Shot
Jump to solution

Yep,

sorry for the delay 🙂

We have found the reason.

When we export then import all elements from vRA the ID's of XaaS & IaaS blueprint are differents.

So when the XaaS blueprint try to call a IaaS blueprint this IaaS blueprint is not find.

We have just removed the old IaaS BP from XaaS BP and added again.

And now it's works.

bp.jpg

Reply
0 Kudos