<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities : Document List - vCenter Lab Manager API</title>
    <link>http://communities.vmware.com/community/developer/forums/labmanager?view=documents</link>
    <description>Latest Documents in vCenter Lab Manager API</description>
    <language>en</language>
    <pubDate>Thu, 19 Mar 2009 17:29:00 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-03-19T17:29:00Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>SOAP API: How to invoke processes on deployed machine?</title>
      <link>http://communities.vmware.com/docs/DOC-9688</link>
      <description>This document was generated from the following thread: SOAP API: How to invoke processes on deployed machine?" &lt;br /&gt;
&lt;br /&gt;
I am unable to locate any functionality in the SOAP API that permits a user to invoke a process (or script) directly from the SOAP API.  It would be nice to have some sort of "exec" facility similar to the Ant exec task:&lt;br /&gt;
&lt;br /&gt;
&lt;a class="jive-link-external" href="http://ant.apache.org/manual/CoreTasks/exec.html"&gt;http://ant.apache.org/manual/CoreTasks/exec.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Clearly it is possible to use ssh or the SysInternals PsTools package for remote execution. Doing so involves a slight paradigm switch from the webservices framework into  to some other scripting framework, and moving data between each.&lt;br /&gt;
&lt;br /&gt;
We are begriming to look at controlling LM with the web services API and I would like to hear how others have solved this issue. &lt;br /&gt;
&lt;br /&gt;
Are there other VMware API's that would help me here?&lt;br /&gt;
&lt;hr /&gt;
Thought I'd ressurect this post as I have a similar problem.&lt;br /&gt;
&lt;br /&gt;
We have just installed ESX and Lab Manager as part of our plan to use virtual machines in our automated test system. &lt;br /&gt;
&lt;br /&gt;
To give a brief example. When the test system launches the testing it will start up a configuration (or 2), install our product on to the machines and run the tests. Once the tests have finished, the results will be copied to a central repository, the VM will be shutdown &amp;#38; captured (in case anything needs to be investigated) &lt;br /&gt;
&lt;br /&gt;
The start up, shutdown and capturing off the configuration can be done using a C# pprogram to access the SOAP API. The problem I have is how do I get the VM's to carry out the product install etc... Reading the SOAP API Guide I see that there are API's for running Mercury Interactive Quality Center tests on the VM's. &lt;br /&gt;
&lt;br /&gt;
We use in house application to run our tests so I'm looking for something similar that can be used for running custom programs on the VM's?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Steve&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
Currently there are no API's that will allow you to run something similar to an exec command on a LM Configuration.  Even If there was an API you would still need a program that would act like an orchestrator of  tasks to launch on your VM.   There are many approaches to solving this problem but here is an idea that I can think of.  &lt;br /&gt;
&lt;p /&gt;
Here are the list of tasks I am assuming you will need and the technologies associated with each task (Assuming your Guest OS is windows based): &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Prerequisites for VM that will be used for testing:&lt;/b&gt;  Before capturing this configuration to the library make sure you have your In house application that you use for testing installed on this VM.  In most cases a commercial tool such as SilkTest or Quick Test Pro could be used, I have also heard of Selenium being used.  Just make sure these tools are installed on the VM before capturing to the library.    &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;b&gt;Task 1.&lt;/b&gt;  Check Out Config from the library, deploy and get the ip address of the target vm where The Application Under Test will be installed. &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Technology Used:&lt;/b&gt;  LM Soap API can be called using C#  &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Task 2.&lt;/b&gt;   Download the latest build of my software onto this VM and perform the automated installation of your product. &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Task 2a.)&lt;/b&gt;  Download your latest test source code from a share on your network to your VM that is used for testing. &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Technology Used:&lt;/b&gt;  A C# program that makes a call to psexec (sysinternals third party tool)  looks like this:   psexec &amp;lt;target_vm_ip&amp;gt;  xcopy &lt;br clear="all" /&gt;mysharetestsourcecode  C:\Automation &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Task 2b.)&lt;/b&gt;  Download the latest build of your software and run the automated install of the product&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Technology Used:&lt;/b&gt;  A C# program that makes a call to  psexec that will now launch a batch file to start the installation process:  psexec &amp;lt;target_vm_ip&amp;gt;  "cmd \c start C:\Automation\InstallBuild.bat" &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Task 3.&lt;/b&gt;    Run functional tests on your application &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Technology Used:&lt;/b&gt;  A C# program that makes a call to  psexec&lt;br /&gt;
that will now launch a batch file to start running acceptance tests: &lt;br /&gt;
psexec &amp;lt;target_vm_ip&amp;gt;  "cmd \c start&lt;br /&gt;
C:\Automation\RunAcceptanceTests.bat"&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
 &lt;b&gt;In a nutshell:&lt;/b&gt;  You can create a C# program that acts like and orchestrator of tasks  that just makes calls to psexec.   In turn psexec will either run system commands or make calls to launch the automation test tool that will &lt;br /&gt;
&lt;p /&gt;
perform your testing.&lt;br /&gt;
&lt;p /&gt;
If you dont want to create your own orchestrator of tasks commerical tools such as SilkCentral and QualityCenter are options that I have seen in use with Lab Manager.&lt;hr /&gt;
&lt;br /&gt;
As of today, LM does not have the functionality to invoke a process inside guest OS via the SOAP API:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Some thoughts: &lt;br /&gt;
&lt;p /&gt;
Several methods worth exploring are:&lt;br /&gt;
&lt;p /&gt;
1. Using the open source STAF/STAX framework. you have to install an agent in each guest and then issuing commands inside this quest is as easy as contacting the STAF SOAP API running inside the quest. ( &lt;a class="jive-link-external" href="http://staf.sourceforge.net/index.php"&gt;http://staf.sourceforge.net/index.php&lt;/a&gt; )&lt;br /&gt;
&lt;p /&gt;
2. Use SSH and PSEXEC (from SysInternals)&lt;br /&gt;
&lt;p /&gt;
3. Implement your own (bootstrap) agent that exposes a SOAP API (or other remoting mechanism) and install it inside each guest.&lt;br /&gt;
&lt;p /&gt;
4. Applications such as HP Quality Center, Borland Silk Central, ElectricCloud's ElectricCommander have remote execution integrated with Lab Manager. &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I guess it will be nice to add an execution task into ant/nant/cruisecontrol that communicates with LM API and runs a process inside a guest.&lt;hr /&gt;
Thanks for the responses, the psexec solution seems like it might be the method for me.&lt;br /&gt;
&lt;br /&gt;
I'll let you know how I get on.&lt;br /&gt;
&lt;hr /&gt;
As I had know idea how to call psexec (or any external program) from C# I put together a noddy little program to understand how it can be done.  In case it's helpful to someone else I've attached it as a text file.  &lt;br /&gt;
&lt;br /&gt;
The program connects to the config and checks if the VM is deployed.  If it's not deployed it deploys it, then uses psexec to copy across and execute a batch file on the VM.  The batch file simply does 'echo process executed at %TIME% &amp;gt; C:\EchoProc.txt', so that there was something tangible on the VM to see that the operation had been successfull.&lt;br /&gt;
&lt;br /&gt;
Using this method I'm thinking I should be able to accomplish all the tasks I need to &lt;br /&gt;
&lt;br /&gt;
Thanks for pointing me in the right direction.&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
Looks good, the psexec command has a switch that may be useful depending on what type of task you want to run.  You can try "-i" switch when running psexec if you notice any issues.   You can look up the use of the switch from the command line help system.&lt;hr /&gt;
Just a note: The WMI service must be running in the guest os in order for psexec to be able to work.&lt;br /&gt;
&lt;br /&gt;
This document was generated from the following thread:&amp;nbsp;&lt;a href="http://communities.vmware.com/thread/100853" class="jive-link-thread"&gt;SOAP API: How to invoke processes on deployed machine?&lt;/a&gt;&lt;br /&gt;
This document was generated from the following thread: SOAP API: How to invoke processes on deployed machine?"</description>
      <category domain="http://communities.vmware.com/tags?communityID=2981">lab</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">manager</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">sdk</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">invoke</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">processes</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">on</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">deployed</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">machine</category>
      <pubDate>Thu, 19 Mar 2009 01:17:21 GMT</pubDate>
      <guid>http://communities.vmware.com/docs/DOC-9688</guid>
      <dc:date>2009-03-19T01:17:21Z</dc:date>
      <clearspace:dateToText>8 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>VMware Lab Manager SDK Documentation</title>
      <link>http://communities.vmware.com/docs/DOC-9692</link>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;a class="jive-link-external" href="http://www.vmware.com/pdf/lm30_soap_api_guide.pdf"&gt;Soap API Guide for VMware Lab Manager 3.0&lt;/a&gt; - Use the Lab Manager SOAP API Guide to develop applications that use Lab Manager &lt;br clear="all" /&gt;	 	Web service data, automate tasks, or integrate VMware&amp;reg; Lab Manager with other &lt;br clear="all" /&gt;	 	software testing tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="jive-link-external" href="http://www.vmware.com/pdf/labmanager_SOAP_API_Guide.pdf"&gt;VMware Lab Manager SOAP API Guide for Lab Manager 2.4&lt;/a&gt; - Use the VMware Lab Manager SOAP API Guide to develop applications that leverage Lab &lt;br clear="all" /&gt;	 	Manager Web service data, automate tasks, or integrate Lab Manager with other &lt;br clear="all" /&gt;	 	software testing tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="jive-link-wiki" href="http://communities.vmware.com/docs/DOC-8603"&gt;Lab Manager Internal API Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2981">soap_api</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">lab_manager_sdk</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">sdk_documentation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">developer</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">sdk</category>
      <category domain="http://communities.vmware.com/tags?communityID=2981">tech</category>
      <pubDate>Thu, 12 Mar 2009 19:24:04 GMT</pubDate>
      <author>cromero@vmware.com</author>
      <guid>http://communities.vmware.com/docs/DOC-9692</guid>
      <dc:date>2009-03-12T19:24:04Z</dc:date>
      <clearspace:dateToText>8 months, 2 weeks ago</clearspace:dateToText>
    </item>
  </channel>
</rss>

