VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
2 Replies Last post: Jul 13, 2009 2:06 PM by Michael Ottati  

ConfigurationDeploy() posted: Jul 13, 2009 2:58 AM

Click to view CapiZikus's profile Enthusiast 112 posts since
May 21, 2009

Hi al,

i am sucessfull cloned and deployed using PowershellCTP3, but there is no option to connect to the physical network during deploy, here my comman:-

$labmanager.ConfigurationDeploy(132,0,4) , the "4" for FenceAllowInAndOut,

What i'm trying to do is clone the configuration, deploy them and export the external IP address, so user can connect any VMs from their computer.

Any suggestion?

I can see the "BeginConfigurationDeploy" and EndConfigurationDeploy but not sure how to user them (from $labManager | gm | where { $_.MemberType -eq "Method" })

Thanks

ps: I have seen a lotof potential useful funtion in LabManagerInternal Class, but not sure how to use them,is anylink I could read?


Re: ConfigurationDeploy()

1. Jul 13, 2009 12:36 PM in response to: CapiZikus
Click to view Michael Ottati's profile Hot Shot 93 posts since
Jan 6, 2006
The Documentation for the SDK can be found here, it includes documentation for the LabManagerInternal API set.

VMware Lab Manager SDK Documentation

In you other question on this subject, I attached an Ant script. I had meant to also include a small code fragment covering this exact issue. That part of the response was lost in one of my edits of the message. I will try again here.

After deploying the configuration, you need to invoke ListMachines passing in the configurationId of the configuration you are interested in. The SOAP is shown below.



====[client:request]====
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Header><AuthenticationHeader xmlns="http://vmware.com/labmanager"><username>ottatm</username><password>XXXXXXXX</password></AuthenticationHeader></S:Header>
  <S:Body><ListMachines xmlns="http://vmware.com/labmanager"><configurationId>1319</configurationId></ListMachines></S:Body>
</S:Envelope>============
====[client:response]====
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <ListMachinesResponse xmlns="http://vmware.com/labmanager">
      <ListMachinesResult>
        <Machine>
          <id>6738</id>
          <name>Config1318VM0</name>
          <description />
          <internalIP>192.168.10.20</internalIP>
          <externalIP>10.8.7.55</externalIP>
          <macAddress>00:50:56:34:00:09</macAddress>
          <memory>1024</memory>
          <status>2</status>
          <isDeployed>true</isDeployed>
          <configID>1319</configID>
          <DatastoreNameResidesOn>PlayPen_SAN</DatastoreNameResidesOn>
          <HostNameDeployedOn>pleperf607.dctmlabs.com</HostNameDeployedOn>
          <OwnerFullName>Ottati, Michael</OwnerFullName>
        </Machine>
      </ListMachinesResult>
    </ListMachinesResponse>
  </soap:Body>
</soap:Envelope>============

Re: ConfigurationDeploy()

2. Jul 13, 2009 2:06 PM in response to: CapiZikus
Click to view Michael Ottati's profile Hot Shot 93 posts since
Jan 6, 2006

Using powershell it would look something like the following. From your example above, you already know the configurationId.


PS C:\Users\ottatm\Documents\PowerShell> $labManager.GetConfigurationByName("Standalone Base")


id : 1320
name : StandAlone Base
description :
isPublic : False
isDeployed : True
fenceMode : 4
type : 1
owner : ottatm
dateCreated : 7/13/2009 12:45:46 PM

PS C:\Users\ottatm\Documents\PowerShell> $labManager.ListMachines(1320)


id : 6741
name : ContentServer
description :
internalIP : 10.8.7.61
externalIP : 10.8.7.65
**macAddress : 00:50:56:34:00:0f
memory : 3092
status : 2
isDeployed : True
configID : 1320
DatastoreNameResidesOn : PlayPen_SAN
HostNameDeployedOn : pleperf607.dctmlabs.com
OwnerFullName : Ottati, Michael


Developer Social Media

Communities