VMware Cloud Community
ibrahimMlx
Contributor
Contributor
Jump to solution

vCloud Director - API - Create VDC - Error - Cannot find the provider VDC storage policy

I am working on an assignment to test the API’s of vCD using Postman, while testing creates an Organization VDC using Postman I am getting error message as com.vmware.vcloud.api.presentation.service.BadRequestException: Cannot find the provider VDC storage policy "urn:uuid:8acc7829-4e1a-447c-9a21-d2ee8235db5a. The Request URL is https://MyHost/api/admin/org/xxxxxxxx-ad2f-4e9d-b7d4-4832c843487c/vdcsparamsvdcsparams

Request Body:

<?xml version="1.0" encoding="UTF-8"?><CreateVdcParams name="org26vdc1" xmlns="http://www.vmware.com/vcloud/v1.5"><Description>Example vDC</Description><AllocationModel>AllocationVApp</AllocationModel><ComputeCapacity><Cpu><Units>MHz</Units><Allocated>0</Allocated><Limit>0</Limit></Cpu><Memory><Units>MB</Units><Allocated>0</Allocated><Limit>0</Limit></Memory></ComputeCapacity><NicQuota>0</NicQuota><NetworkQuota>50</NetworkQuota><VdcStorageProfile><Enabled>true</Enabled><Units>MB</Units><Limit>0</Limit><Default>true</Default><ProviderVdcStorageProfile href="https://MyHost/api/admin/pvdcStorageProfile/8acc7829-4e1a-447c-9a21-d2ee8235db5a" /></VdcStorageProfile><ResourceGuaranteedMemory>1.0</ResourceGuaranteedMemory><ResourceGuaranteedCpu>0.10</ResourceGuaranteedCpu><VCpuInMhz>2000</VCpuInMhz><IsThinProvision>true</IsThinProvision><NetworkPoolReference href="https://MyHost/api/admin/extension/networkPool/9c5d76f4-c70b-4fb6-848f-bac0dbbb0278"/><ProviderVdcReference type="application/vnd.vmware.admin.providervdc+xml" name="TestPvDC" href="https://MyHost/api/admin/providervdc/3bd02fe2-cb97-4a86-8f4e-6a79ee56842c" /><UsesFastProvisioning>false</UsesFastProvisioning></CreateVdcParams>


API Version 33.0 - Product v10.0, please assist.

1 Solution

Accepted Solutions
vkv1991
VMware Employee
VMware Employee
Jump to solution

Looks like it is unable to find the storage policy being provided (8acc7829-4e1a-447c-9a21-d2ee8235db5a) does not exist.

You can list the available storage profiles in Provider vdc using below API

fetch the provider vdc ID from

GET https://vcd_fqdn/api/admin

GET https://vcd.fqdn/api/admin/providervdc/{id}

and look for section <StorageProfiles>

(OR)

Get the storage profile IDs from database

select * from prov_vdc_logical_resource where lr_type like '%STORAGE%';

View solution in original post

2 Replies
vkv1991
VMware Employee
VMware Employee
Jump to solution

Looks like it is unable to find the storage policy being provided (8acc7829-4e1a-447c-9a21-d2ee8235db5a) does not exist.

You can list the available storage profiles in Provider vdc using below API

fetch the provider vdc ID from

GET https://vcd_fqdn/api/admin

GET https://vcd.fqdn/api/admin/providervdc/{id}

and look for section <StorageProfiles>

(OR)

Get the storage profile IDs from database

select * from prov_vdc_logical_resource where lr_type like '%STORAGE%';

ibrahimMlx
Contributor
Contributor
Jump to solution

Thanks for help, we were successful in getting the storage profile using after quering on prov_vdc_logical_resource table. However, we were quering on storage_profile_inv table to get uuid of storage policy. Moreover, the postgres tables naming convention is not easy to corelate the required objects with tables:smileyshocked:.

Is there any documentation or guide availabe that can give an overview of the postgres tables and relation with vCD objects.

Reply
0 Kudos