Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

CloneVM_Task throws error "The request refers to an unexpected or unknown type."

$
0
0

Hi,

 

I trying to Clone a VM, It works perfect when i specify host managed object Reference(MOR) in VirtualMachineRelocateSpec.

 

http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.RelocateSpec.html

 

When i try with Cluster managed object Reference (MOR) I'm getting this error "The request refers to an unexpected or unknown type."

 

   // Get clone specifications

  VirtualMachineRelocateSpec relocSpec = new VirtualMachineRelocateSpec();

     relocSpec.datastore = targetDataStore;

 

     relocSpec.pool = resourcePoolRootRef;

 

// assgining cluster compute resource pool...

 

relocSpec.host = hostParentCompResRef;

 

If i change it to Host it works fine...

relocSpec.host = hostRef;

 

I don't want to specify particular host, the Cluster is DRS enabled ....

 

Still I get this error can anyone help...

 

Anand.

 

 

 

 

 


Viewing all articles
Browse latest Browse all 1860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>