Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

'This operation is denied' error while composing Vapp.

$
0
0

Hi,

I'm using C# SDK for vCloud Director 5.1 (with ASP.Net) and getting an error while composing Vapp (by providing VM reference from public catalog) and I've no idea why I'm getting this error. Any help is greatly appreciated.

 

vCloudClient client = vCloudClientFactory.getObject(); // fetching authenticated vCloudClient object

VcloudAdmin admin = client.GetVcloudAdmin();

AdminOrganization adminOrg = AdminOrganization.GetAdminOrgByReference(client, admin.GetAdminOrgsRefs().First(r => "query to filter record" ));

List<ReferenceType> catalogRefs = adminOrg.GetCatalogRefs();

AdminCatalog adminCatalog = AdminCatalog.GetCatalogByReference(client, list[1]); // its public catalog

ReferenceType vmRef = adminCatalog.getCatalogItemReferences().First(); // public catalog has single VM

SourcedCompositionItemParamType src = new SourcedCompositionItemParamType();

src.Source = vmRef;

src.StorageProfile = GetStorageProfile() // it returns Gold storage

ComposeVappParamsType composeVappParamType = new ComposeVappParamsType();

composeVappParamType.SourcedItem = new SourcedCompositionItemParamType[] { src };

composeVappParamType.name = "NewVapp";

Vapp vapp = GetVDC().ComposeVapp(composeVappParamType); // this statement always returns error "This operation is denied".

 

 

Username: *****@system (administrator account)

vCloud Director version: 5.1

Platform/Language: Asp.net, C#


Viewing all articles
Browse latest Browse all 176483

Trending Articles