VMware Cloud Community
pjank
Contributor
Contributor

Access is forbidden error on Relocate Template

VCO with vCloud 1.5 plugin...

I was able to get the VclVM.relocate() call working by using this post as a guide:

http://www.virtuallyghetto.com/2012/02/performing-storage-vmotion-in-vcloud_19.html?showComment=1333...

but anytime I try to call relocate() on a vAppTemplate, I get the error, "Access is forbidden."  Same account and setup that works with the VM's, but always fails for the templates.  Anyone had any luck getting the relocate() call to work on templates?  Here is a quick example that fails for me:

var templateRef = catItem.entity;

var template = vdc.getHost().getEntityByReference(VclEntityType.VAPP_TEMPLATE, templateRef);

var datastoreRef = new VclReference();

datastoreRef.href = datastore.href;

datastoreRef.name = datastore.name;

datastoreRef.type = datastore.type;

task = template.relocate(datastoreRef);

0 Kudos
2 Replies
cdecanini_
VMware Employee
VMware Employee

Is the template in a catalog ? I know I have got the same error when it was not in the catalog and when instantiating it.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos
pjank
Contributor
Contributor

Hi Cristophe,

Yes it is.  I am browsing to it from the Catalog view and selecting it as a catalog item, then instantiating the template from the Catalog Item entity reference.

Thanks,

Peter

0 Kudos