<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with Rapid Cloning VM using VSC 4.2.1  through RCU API on iSCSI Datastores in VMware Solutions Discussions</title>
    <link>https://community.netapp.com/t5/VMware-Solutions-Discussions/Issue-with-Rapid-Cloning-VM-using-VSC-4-2-1-through-RCU-API-on-iSCSI-Datastores/m-p/98227#M7988</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My use case is to Rapid clone VM from Template &amp;nbsp;through VSC 4.2.1 on iSCSI Datastore through RCU Utiliy API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;When trying to do this through RCU Utility API, the task is getting stuck at 50% not throwing any error , but for NFS datastore it is working fine.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;From vCenter if we Rapid clone the template it is working fine for iSCSI as well as NFS &amp;nbsp;Datastore.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Screen shots attached&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;1. Task status Message Stucked&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;2. Tells you List of Tasks triggered when Rapid Cloning a template thorugh vCenter.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;List of tasks are not triggered when Rapid Cloning a template through RCU Utility API.(Not all the tasks listed in screen shot 2 are triggered when rapid cloning thorugh RCU Utility API&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Following tasks are missing)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Reload Virtual machine&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Initialize powering On&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Power On Virtual Machine&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Delete file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Running this Task on the following configuration&lt;/U&gt;&lt;/P&gt;&lt;P&gt;VSC Plugin : 4.2.1&lt;/P&gt;&lt;P&gt;vCenter Server :5.5.0&lt;/P&gt;&lt;P&gt;ESXi Host : ESXi 5.1.0&lt;/P&gt;&lt;P&gt;Storage Controller : ONTAP Version&amp;nbsp;NetApp Release 8.2.2P1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help usif any thingwe are missing to set through API or any other issues to fix inorder to run this task work&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code used for this task&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RcuUtil.ignoreSSL();&lt;/P&gt;&lt;P&gt;// the create request specification&lt;BR /&gt;RequestSpec requestSpec = new RequestSpec();&lt;BR /&gt;requestSpec.setVcUser(vUsername);&lt;BR /&gt;requestSpec.setVcPassword(vPassword);&lt;BR /&gt;requestSpec.setServiceUrl(vUrl);&lt;/P&gt;&lt;P&gt;if (type.equalsIgnoreCase("datacenter"))&lt;BR /&gt;{&lt;BR /&gt;type = "Datacenter";&lt;BR /&gt;} else if (type.equalsIgnoreCase("host"))&lt;BR /&gt;{&lt;BR /&gt;type = "HostSystem";&lt;BR /&gt;} else if (type.equalsIgnoreCase("cluster"))&lt;BR /&gt;{&lt;BR /&gt;type = "ClusterComputeResource";&lt;BR /&gt;} else if (type.equalsIgnoreCase("resourcepool"))&lt;BR /&gt;{&lt;BR /&gt;type = "ResourcePool";&lt;BR /&gt;} else&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Invalid container type");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// connect&lt;BR /&gt;URL wsdlLocation;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;wsdlLocation = new URL(vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;} catch (Exception e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while creating URL " + vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;throw new Exception("Exception while creating URL " + vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;ApiImplService service = new ApiImplService(wsdlLocation);&lt;BR /&gt;Api port = service.getApiImplPort();&lt;/P&gt;&lt;P&gt;String sourceMoref = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;sourceMoref = port.getMoref(vmName, "VirtualMachine", requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting VM info to clone using VSC. Please check the log." + e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting VM info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (sourceMoref == null)&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Unable to find vm " + vmName);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;List&amp;lt;VmFileSpec&amp;gt; files = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;files = port.getVmFiles(sourceMoref, requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting VM file info to clone using VSC. Please check the log."&lt;BR /&gt;+ e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting VM file info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the NetApp controller that the destination datastore resides on&lt;BR /&gt;ControllerSpec controllerSpec = new ControllerSpec();&lt;BR /&gt;controllerSpec.setIpAddress(filerName);&lt;BR /&gt;controllerSpec.setUsername(userid);&lt;BR /&gt;controllerSpec.setPassword(pwd);&lt;BR /&gt;controllerSpec.setSsl(ssl);&lt;/P&gt;&lt;P&gt;// set each datastore spec to the controller we just defined&lt;BR /&gt;for (VmFileSpec file : files)&lt;BR /&gt;{&lt;BR /&gt;file.getDestDatastoreSpec().setController(controllerSpec);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the new VM details (an empty VmSpec causes the cloning engine to use default values)&lt;BR /&gt;Clones clones = new Clones();&lt;BR /&gt;Entry entry = new Entry();&lt;BR /&gt;// Adding list to poweron vm after clone&lt;BR /&gt;List&amp;lt;String&amp;gt; vmList = new ArrayList&amp;lt;String&amp;gt;();&lt;BR /&gt;for (int i = 0; i &amp;lt; cloneCount; i++)&lt;BR /&gt;{&lt;BR /&gt;// this one we power on...&lt;BR /&gt;String cloneName = vmCloneName /*+ i*/;&lt;BR /&gt;entry = new Entry();&lt;BR /&gt;entry.setKey(cloneName);&lt;BR /&gt;vmList.add(cloneName);&lt;BR /&gt;VmSpec vspec = new VmSpec();&lt;BR /&gt;GuestCustomizationSpec gspec = new GuestCustomizationSpec();&lt;BR /&gt;// gspec.setName(value);&lt;BR /&gt;vspec.setCustSpec(gspec);&lt;BR /&gt;vspec.setPowerOn(true);&lt;BR /&gt;entry.setValue(vspec);&lt;BR /&gt;clones.getEntry().add(entry);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the clone specification&lt;BR /&gt;CloneSpec cloneSpec = new CloneSpec();&lt;BR /&gt;// the source VM or template&lt;BR /&gt;cloneSpec.setTemplateMoref(sourceMoref);&lt;/P&gt;&lt;P&gt;// the container in which to create new clones (datacenter, cluster, host, or resource pool)&lt;BR /&gt;String containerMoref = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;containerMoref = port.getMoref(containerName, type, requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting Datacenter info to clone using VSC. Please check the log."&lt;BR /&gt;+ e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting Datacenter info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;cloneSpec.setContainerMoref(containerMoref);&lt;/P&gt;&lt;P&gt;// the file info created above&lt;BR /&gt;cloneSpec.getFiles().addAll(files);&lt;BR /&gt;// the clone info created above&lt;BR /&gt;cloneSpec.setClones(clones);&lt;/P&gt;&lt;P&gt;// the complete request specification&lt;BR /&gt;requestSpec.setCloneSpec(cloneSpec);&lt;/P&gt;&lt;P&gt;String TaskMOR = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;// submit the clone request&lt;BR /&gt;TaskMOR = port.createClones(requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while cloning using VSC. Please check the log." + e.getCause());&lt;BR /&gt;throw new Exception("Exception while cloning using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;logger.info("RCU API returned " + TaskMOR);&lt;BR /&gt;&lt;BR /&gt;TaskStatus tstat = new TaskStatus();&lt;/P&gt;&lt;P&gt;if (tstat.getTaskStatus(vUsername, vPassword, vUrl, TaskMOR))&lt;BR /&gt;{&lt;BR /&gt;if(powerOn)&lt;BR /&gt;{&lt;BR /&gt;ServiceInstance si = new ServiceInstance(new URL(vUrl), vUsername, vPassword);&lt;BR /&gt;Folder rootFolder = si.getRootFolder();&lt;BR /&gt;for(String clonedvm : vmList)&lt;BR /&gt;{&lt;BR /&gt;VirtualMachine vm = (VirtualMachine) new InventoryNavigator(rootFolder).searchManagedEntity("VirtualMachine", clonedvm);&lt;BR /&gt;if(vm != null)&lt;BR /&gt;{&lt;BR /&gt;Task task = vm.powerOnVM_Task(null);&lt;BR /&gt;TaskMOR = task.getMOR().get_value();&lt;BR /&gt;logger.info("TaskMOR: " + TaskMOR);&lt;BR /&gt;String status = task.waitForTask();&lt;BR /&gt;logger.info("task on VM " + clonedvm + " completed with status " + status);&lt;/P&gt;&lt;P&gt;if (!Task.SUCCESS.equals(status))&lt;BR /&gt;{&lt;BR /&gt;TaskInfo ti = task.getTaskInfo();&lt;/P&gt;&lt;P&gt;if (ti != null)&lt;BR /&gt;{&lt;BR /&gt;if (ti.getError() != null)&lt;BR /&gt;{&lt;BR /&gt;status = status + ": " + ti.getError().getLocalizedMessage();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;logger.error("Powering ON completed on VM " + clonedvm + " with status " + status);&lt;BR /&gt;throw new Exception(status);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;logger.error("Unable to find cloned vm:" + clonedvm);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return TaskMOR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramji&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:22:57 GMT</pubDate>
    <dc:creator>RamjiRaju</dc:creator>
    <dc:date>2025-06-05T05:22:57Z</dc:date>
    <item>
      <title>Issue with Rapid Cloning VM using VSC 4.2.1  through RCU API on iSCSI Datastores</title>
      <link>https://community.netapp.com/t5/VMware-Solutions-Discussions/Issue-with-Rapid-Cloning-VM-using-VSC-4-2-1-through-RCU-API-on-iSCSI-Datastores/m-p/98227#M7988</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My use case is to Rapid clone VM from Template &amp;nbsp;through VSC 4.2.1 on iSCSI Datastore through RCU Utiliy API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;When trying to do this through RCU Utility API, the task is getting stuck at 50% not throwing any error , but for NFS datastore it is working fine.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;From vCenter if we Rapid clone the template it is working fine for iSCSI as well as NFS &amp;nbsp;Datastore.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Screen shots attached&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;1. Task status Message Stucked&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;2. Tells you List of Tasks triggered when Rapid Cloning a template thorugh vCenter.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;List of tasks are not triggered when Rapid Cloning a template through RCU Utility API.(Not all the tasks listed in screen shot 2 are triggered when rapid cloning thorugh RCU Utility API&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Following tasks are missing)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Reload Virtual machine&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Initialize powering On&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Power On Virtual Machine&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Delete file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Running this Task on the following configuration&lt;/U&gt;&lt;/P&gt;&lt;P&gt;VSC Plugin : 4.2.1&lt;/P&gt;&lt;P&gt;vCenter Server :5.5.0&lt;/P&gt;&lt;P&gt;ESXi Host : ESXi 5.1.0&lt;/P&gt;&lt;P&gt;Storage Controller : ONTAP Version&amp;nbsp;NetApp Release 8.2.2P1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help usif any thingwe are missing to set through API or any other issues to fix inorder to run this task work&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code used for this task&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RcuUtil.ignoreSSL();&lt;/P&gt;&lt;P&gt;// the create request specification&lt;BR /&gt;RequestSpec requestSpec = new RequestSpec();&lt;BR /&gt;requestSpec.setVcUser(vUsername);&lt;BR /&gt;requestSpec.setVcPassword(vPassword);&lt;BR /&gt;requestSpec.setServiceUrl(vUrl);&lt;/P&gt;&lt;P&gt;if (type.equalsIgnoreCase("datacenter"))&lt;BR /&gt;{&lt;BR /&gt;type = "Datacenter";&lt;BR /&gt;} else if (type.equalsIgnoreCase("host"))&lt;BR /&gt;{&lt;BR /&gt;type = "HostSystem";&lt;BR /&gt;} else if (type.equalsIgnoreCase("cluster"))&lt;BR /&gt;{&lt;BR /&gt;type = "ClusterComputeResource";&lt;BR /&gt;} else if (type.equalsIgnoreCase("resourcepool"))&lt;BR /&gt;{&lt;BR /&gt;type = "ResourcePool";&lt;BR /&gt;} else&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Invalid container type");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// connect&lt;BR /&gt;URL wsdlLocation;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;wsdlLocation = new URL(vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;} catch (Exception e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while creating URL " + vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;throw new Exception("Exception while creating URL " + vsclocation + "/kamino/public/api?wsdl");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;ApiImplService service = new ApiImplService(wsdlLocation);&lt;BR /&gt;Api port = service.getApiImplPort();&lt;/P&gt;&lt;P&gt;String sourceMoref = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;sourceMoref = port.getMoref(vmName, "VirtualMachine", requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting VM info to clone using VSC. Please check the log." + e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting VM info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (sourceMoref == null)&lt;BR /&gt;{&lt;BR /&gt;throw new Exception("Unable to find vm " + vmName);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;List&amp;lt;VmFileSpec&amp;gt; files = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;files = port.getVmFiles(sourceMoref, requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting VM file info to clone using VSC. Please check the log."&lt;BR /&gt;+ e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting VM file info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the NetApp controller that the destination datastore resides on&lt;BR /&gt;ControllerSpec controllerSpec = new ControllerSpec();&lt;BR /&gt;controllerSpec.setIpAddress(filerName);&lt;BR /&gt;controllerSpec.setUsername(userid);&lt;BR /&gt;controllerSpec.setPassword(pwd);&lt;BR /&gt;controllerSpec.setSsl(ssl);&lt;/P&gt;&lt;P&gt;// set each datastore spec to the controller we just defined&lt;BR /&gt;for (VmFileSpec file : files)&lt;BR /&gt;{&lt;BR /&gt;file.getDestDatastoreSpec().setController(controllerSpec);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the new VM details (an empty VmSpec causes the cloning engine to use default values)&lt;BR /&gt;Clones clones = new Clones();&lt;BR /&gt;Entry entry = new Entry();&lt;BR /&gt;// Adding list to poweron vm after clone&lt;BR /&gt;List&amp;lt;String&amp;gt; vmList = new ArrayList&amp;lt;String&amp;gt;();&lt;BR /&gt;for (int i = 0; i &amp;lt; cloneCount; i++)&lt;BR /&gt;{&lt;BR /&gt;// this one we power on...&lt;BR /&gt;String cloneName = vmCloneName /*+ i*/;&lt;BR /&gt;entry = new Entry();&lt;BR /&gt;entry.setKey(cloneName);&lt;BR /&gt;vmList.add(cloneName);&lt;BR /&gt;VmSpec vspec = new VmSpec();&lt;BR /&gt;GuestCustomizationSpec gspec = new GuestCustomizationSpec();&lt;BR /&gt;// gspec.setName(value);&lt;BR /&gt;vspec.setCustSpec(gspec);&lt;BR /&gt;vspec.setPowerOn(true);&lt;BR /&gt;entry.setValue(vspec);&lt;BR /&gt;clones.getEntry().add(entry);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// the clone specification&lt;BR /&gt;CloneSpec cloneSpec = new CloneSpec();&lt;BR /&gt;// the source VM or template&lt;BR /&gt;cloneSpec.setTemplateMoref(sourceMoref);&lt;/P&gt;&lt;P&gt;// the container in which to create new clones (datacenter, cluster, host, or resource pool)&lt;BR /&gt;String containerMoref = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;containerMoref = port.getMoref(containerName, type, requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while getting Datacenter info to clone using VSC. Please check the log."&lt;BR /&gt;+ e.getCause());&lt;BR /&gt;throw new Exception("Exception while getting Datacenter info to clone using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;cloneSpec.setContainerMoref(containerMoref);&lt;/P&gt;&lt;P&gt;// the file info created above&lt;BR /&gt;cloneSpec.getFiles().addAll(files);&lt;BR /&gt;// the clone info created above&lt;BR /&gt;cloneSpec.setClones(clones);&lt;/P&gt;&lt;P&gt;// the complete request specification&lt;BR /&gt;requestSpec.setCloneSpec(cloneSpec);&lt;/P&gt;&lt;P&gt;String TaskMOR = null;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;// submit the clone request&lt;BR /&gt;TaskMOR = port.createClones(requestSpec);&lt;BR /&gt;} catch (SOAPFaultException e)&lt;BR /&gt;{&lt;BR /&gt;logger.error("Exception while cloning using VSC. Please check the log." + e.getCause());&lt;BR /&gt;throw new Exception("Exception while cloning using VSC " + e.getLocalizedMessage());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;logger.info("RCU API returned " + TaskMOR);&lt;BR /&gt;&lt;BR /&gt;TaskStatus tstat = new TaskStatus();&lt;/P&gt;&lt;P&gt;if (tstat.getTaskStatus(vUsername, vPassword, vUrl, TaskMOR))&lt;BR /&gt;{&lt;BR /&gt;if(powerOn)&lt;BR /&gt;{&lt;BR /&gt;ServiceInstance si = new ServiceInstance(new URL(vUrl), vUsername, vPassword);&lt;BR /&gt;Folder rootFolder = si.getRootFolder();&lt;BR /&gt;for(String clonedvm : vmList)&lt;BR /&gt;{&lt;BR /&gt;VirtualMachine vm = (VirtualMachine) new InventoryNavigator(rootFolder).searchManagedEntity("VirtualMachine", clonedvm);&lt;BR /&gt;if(vm != null)&lt;BR /&gt;{&lt;BR /&gt;Task task = vm.powerOnVM_Task(null);&lt;BR /&gt;TaskMOR = task.getMOR().get_value();&lt;BR /&gt;logger.info("TaskMOR: " + TaskMOR);&lt;BR /&gt;String status = task.waitForTask();&lt;BR /&gt;logger.info("task on VM " + clonedvm + " completed with status " + status);&lt;/P&gt;&lt;P&gt;if (!Task.SUCCESS.equals(status))&lt;BR /&gt;{&lt;BR /&gt;TaskInfo ti = task.getTaskInfo();&lt;/P&gt;&lt;P&gt;if (ti != null)&lt;BR /&gt;{&lt;BR /&gt;if (ti.getError() != null)&lt;BR /&gt;{&lt;BR /&gt;status = status + ": " + ti.getError().getLocalizedMessage();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;logger.error("Powering ON completed on VM " + clonedvm + " with status " + status);&lt;BR /&gt;throw new Exception(status);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;logger.error("Unable to find cloned vm:" + clonedvm);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return TaskMOR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramji&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:22:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/VMware-Solutions-Discussions/Issue-with-Rapid-Cloning-VM-using-VSC-4-2-1-through-RCU-API-on-iSCSI-Datastores/m-p/98227#M7988</guid>
      <dc:creator>RamjiRaju</dc:creator>
      <dc:date>2025-06-05T05:22:57Z</dc:date>
    </item>
  </channel>
</rss>

