VMware {code} Community
johndemic
Contributor
Contributor
Jump to solution

CloneVM_Task and ResourcePools

Hey All,

I was wondering if its possible to submit a CloneVM_Task without specifying a resource pool. When I leave the pool specification out of the SOAP request I see an error in Virtual Center that reads "A specified parameter was not correct. spec.location.pool" I missing why I need to have a resource pool explicitly configured just to clone a VM from the API. I can provide the full SOAP payload if this is useful.

Any help would be greatly appreciated,

-jd

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

If you look at the requirements for the relocationSpec: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.RelocateSpec.html It requires you to provide a resource pool if you're clone from a template or another VM this is required. What you can do if you don't want to specify a specific resource pool, you can point it to the root resource pool which always exists and it should be called resourcePool so you would say:

pool => 'resourcePool'

This should allow you to clone the VM w/o specifying a specific RP

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
1 Reply
lamw
Community Manager
Community Manager
Jump to solution

If you look at the requirements for the relocationSpec: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.RelocateSpec.html It requires you to provide a resource pool if you're clone from a template or another VM this is required. What you can do if you don't want to specify a specific resource pool, you can point it to the root resource pool which always exists and it should be called resourcePool so you would say:

pool => 'resourcePool'

This should allow you to clone the VM w/o specifying a specific RP

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos