VMware Solutions Discussions

Rapid cloning works using gui but not when using tool like Soapui

BIXENTE75
5,215 Views

Hi,

I am using VSC4.1 on Vcenter 5.1. Using VMware console I can create clones without problem.

But I would like to automate cloning using a third party tool (BMC orchestrator). To simulate my soap request, I am using SopaUI.

I retrieve from wrapper.log the line just after XML dump and use it in SoapUI.

But it does not work. My task in Vcenter stay blocked at 3%.

Any ideas ?

thanks

5 REPLIES 5

brianjm
5,215 Views

Could you please provide the kamino.log from your VSC installation?

Thanks,
Brian

BIXENTE75
5,215 Views

Hello,

Here under kamino.log output :

2013-04-22 17:34:51,429 (1797237747@qtp-312759349-32) TRACE - ApiImpl: queue size is now 0

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Enter getDSVolumeName.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Enter getDSVolumeQtreeName.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName - working with /vol/BFS_VMWARINF_001/POC_001

2013-04-22 17:34:51,429 (Thread-161) TRACE - getDSVolumeQtreeName: skipping actual and ip checks because controller was null

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName - checking for qtree.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - returning (qtree) vol/BFS_VMWARINF_001

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName- vol:vol/BFS_VMWARINF_001 qtree:POC_001

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Enter getDSQtreeName.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Enter getDSVolumeQtreeName.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName - working with /vol/BFS_VMWARINF_001/POC_001

2013-04-22 17:34:51,429 (Thread-161) TRACE - getDSVolumeQtreeName: skipping actual and ip checks because controller was null

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName - checking for qtree.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - returning (qtree) vol/BFS_VMWARINF_001

2013-04-22 17:34:51,429 (Thread-161) DEBUG - getDSVolumeQtreeName- vol:vol/BFS_VMWARINF_001 qtree:POC_001

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Entering bailOut.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Adding the error message to the taskID queue.

2013-04-22 17:34:51,429 (Thread-161) DEBUG - Added the error message to the taskID queue.

2013-04-22 17:34:51,429 (Thread-161) FATAL - An unexpected exception has occurred.

java.lang.NullPointerException

at com.netapp.kamino.server.duplicator.VmCloner.getNtapController(VmCloner.java:4149)

at com.netapp.kamino.server.duplicator.VmCloner.create(VmCloner.java:1212)

at com.netapp.kamino.server.duplicator.VmCloner.createClones(VmCloner.java:343)

at com.netapp.kamino.server.ApiImpl$cloneEngineThread.run(ApiImpl.java:1166)

at java.lang.Thread.run(Unknown Source)

c975jwhfhs
5,215 Views

Hi, looks I have similar issue. Trying to replay XML from kamino.log.

It performs initial native clone to the destination database and fails.

2013-07-31 10:29:58,691 (Thread-587) DEBUG [KaminoCountDownLatch] - keepGoing: look (1) is less than maxLook (3).  Returning true (keep going).

2013-07-31 10:29:58,707 (Thread-587) INFO  [VcInventory] - Updated the task progress to 30.

2013-07-31 10:29:58,707 (Thread-587) DEBUG [KaminoCountDownLatch] - keepGoing: look (1) is less than maxLook (3).  Returning true (keep going).

2013-07-31 10:29:58,723 (Thread-587) INFO  [VcInventory] - Updated the task progress to 40.

2013-07-31 10:29:58,723 (Thread-587) DEBUG [VmCloner] - About to add work to the clone queue, so we remove the disk and controllers from the template.

2013-07-31 10:29:58,723 (Thread-587) DEBUG [KaminoCountDownLatch] - keepGoing: look (1) is less than maxLook (3).  Returning true (keep going).

2013-07-31 10:29:58,738 (Thread-587) INFO  [VcInventory] - Updated the task progress to 42.

2013-07-31 10:29:58,738 (Thread-587) DEBUG [VmCloner] - About to load filenames to use for clones.

2013-07-31 10:29:58,973 (Thread-587) DEBUG [KaminoCountDownLatch] - keepGoing: look (1) is less than maxLook (3).  Returning true (keep going).

2013-07-31 10:29:58,988 (Thread-587) INFO  [VcInventory] - Updated the task progress to 44.

2013-07-31 10:29:58,988 (Thread-587) DEBUG [VmCloner] - Entering bailOut.

2013-07-31 10:29:58,988 (Thread-587) DEBUG [VmCloner] - Adding the error message to the taskID queue.

2013-07-31 10:29:58,988 (Thread-587) DEBUG [VmCloner] - Added the error message to the taskID queue.

2013-07-31 10:29:58,988 (Thread-587) FATAL [VmCloner] - An unexpected exception has occurred.

java.lang.NullPointerException

    at com.netapp.kamino.server.duplicator.VmCloner.create(VmCloner.java:2174)

    at com.netapp.kamino.server.duplicator.VmCloner.createClones(VmCloner.java:341)

    at com.netapp.kamino.server.ApiImpl$cloneEngineThread.run(ApiImpl.java:1168)

    at java.lang.Thread.run(Unknown Source)

2013-07-31 10:29:59,207 (Thread-587) DEBUG [EsxHostTaskManager] - Entering gatherThreads

2013-07-31 10:29:59,207 (host-316) DEBUG [EsxHostTaskManager] - Received an interrupt while status was 1.

2013-07-31 10:29:59,207 (host-316) INFO  [EsxHostTaskManager] - host-316 is leaving tasksAndCommands.

2013-07-31 10:29:59,207 (host-316) INFO  [EsxHostTaskManager] - host-316 has stopped.

c975jwhfhs
5,215 Views

Hi,

Finally I figured out what had happened. When you fill XML for cloning request, order of <files> elements is really important. I know it weird, and it took me around a day to troubleshoot it. XML spec do not cover it also.

NB! Configuration File <files> section should go before VMDK <files> section. If it is not, it will fail with meaningless error.

<ns2:createClonesxmlns:ns2="http://server.kamino.netapp.com/">

<arg0>

<cloneSpec>

<clones>

<entry>

<key>apiTestClone1</key>

<value>

<powerOn>false</powerOn>

</value>

</entry>

<entry>

<key>apiTestClone2</key>

<value>

<powerOn>false</powerOn>

</value>

</entry>

<entry>

<key>apiTestClone3</key>

<value>

<powerOn>false</powerOn>

</value>

</entry>

</clones>

<containerMoref>Datacenter:datacenter-2</containerMoref>

<files>

<destDatastoreSpec>

<controller>

<ipAddress>10.10.10.2</ipAddress>

<password></password>

<ssl>false</ssl>

<username>root</username>

</controller>

<mor>Datastore:datastore-17</mor>

<numDatastores>0</numDatastores>

<thinProvision>false</thinProvision>

Provisioning and Cloning programmable APIs | 43

<volAutoGrow>false</volAutoGrow>

</destDatastoreSpec>

<sourcePath>[unitTestSourceNFS]demoSource/

demoSource.vmx</sourcePath>

</files>

<files>

<destDatastoreSpec>

<controller>

<ipAddress>10.10.10.2</ipAddress>

<password></password>

<ssl>false</ssl>

<username>root</username>

</controller>

<mor>Datastore:datastore-17</mor>

<numDatastores>0</numDatastores>

<thinProvision>false</thinProvision>

<volAutoGrow>false</volAutoGrow>

</destDatastoreSpec>

<sourcePath>[unitTestSourceNFS]demoSource/

demoSource.vmdk</sourcePath>

</files>

<templateMoref>VirtualMachine:vm-255</templateMoref>

</cloneSpec>

<serviceUrl>https://10.10.10.2/sdk</serviceUrl>

<vcPassword>pass123</vcPassword>

<vcUser>Administrator</vcUser>

</arg0>

</ns2:createClones>

mbeattie
5,215 Views

Hi Vincent,

Just want to let you know i'm working on something similar but will be using powershell to invoke the soap request. In the process of trying to develop powershell functions that interact with the web services API (just need bit more information from the VSC developers). Note that the VSC methods and properties are exposed to web services, here is an example:

[String]$ipAddress  = "xx.xx.xx.xx"
[Int]$portNumber    = 8143
[String]$username   = "%domainname%\%username%"
[String]$uri        = "https://$ipAddress`:$portNumber/kamino/public/api?wsdl"
$credentials        = Get-Credential -Credential $username
$proxy              = New-WebServiceProxy -uri $uri -namespace WebServiceProxy -Credential $credentials
$proxy | gm

# Note the methods are exposed here. EG

# getMoref Method string getMoref(string arg0, string arg1, WebServiceProxy.requestSpec, ebmdvg-g, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null arg2)

*In theory one would assume you can send SOAP messages using this API to start cloning tasks

Will let you know what i come up with

Cheers Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public