<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vElemental</title>
	<atom:link href="http://velemental.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://velemental.com</link>
	<description>Deconstructing elements of cloud</description>
	<lastBuildDate>Sun, 06 May 2012 23:27:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Unofficial VMware vCD Cmdlets</title>
		<link>http://velemental.com/2012/05/05/unofficial-vmware-vcd-cmdlets/</link>
		<comments>http://velemental.com/2012/05/05/unofficial-vmware-vcd-cmdlets/#comments</comments>
		<pubDate>Sat, 05 May 2012 08:13:38 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[vcd fencing vapp stats cmdlets vcloud filechain]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/05/05/unofficial-vmware-vcd-cmdlets/</guid>
		<description><![CDATA[Isn’t it awesome when you need something, know it will eventually arrive, but need it now anyways?&#160; That’s a bit of what the information in the post is all about, but here goes anyhow. First the apology =) Unfortunately I wrote way too many cmdlets recently for vCD, so I really don’t have enough chapters [...]]]></description>
			<content:encoded><![CDATA[<p>Isn’t it awesome when you need something, know it will eventually arrive, but need it now anyways?&#160; That’s a bit of what the information in the post is all about, but here goes anyhow. </p>
<p>First the apology =) Unfortunately I wrote way too many cmdlets recently for vCD, so I really don’t have enough chapters or cycles to get into the details around each cmdlet.&#160; I tried to include examples and descriptions for the cmdlets, but didn’t quite make it through all of them.&#160; It should be very self explanatory when looking at the name and the run-time example. </p>
<p>The goal of the cmdlets was to build the framework necessary to complete a whole bunch of automation with vCD, satisfying a primary use case for labs (actual lab cmdlets not here). </p>
<p>There is a lot of pretty cool stuff in here, some of the highlights are as follows. </p>
<p>&#160;</p>
<h3>Network</h3>
<p>There are a handful of network related cmdlets.&#160; An important one for any VApp deployment is to be able to specify the External Network correctly (Update-CIVAppParentNetwork).&#160; In addition when a VApp is deployed you probably want to see the accessible remote IP (Get-CIRouterInfo).&#160; A new twist on the VApp networking has to do with the fencing that can take place.&#160; There is a cmdlet to view the fencing information (Get-CIFencing) for CIVMs to show their inside and outside mac addresses.&#160; Another useful one is (Get-CIVAppNetworkingFirewallRules) which displays the firewall rules associated to a VApp.</p>
<h3>Disk</h3>
<p>One of the great things about vCD is the use of thin and linked clones (fast provisioning).&#160; However, the reporting on a per object basis isn’t quite there.&#160; For this we leverage the Get-CIVCVM to cross-link the CIVMs to their respective VC VM’s to get details per virtual disk (Get-CIVAppDiskGroupings, Get-CIVAppDiskUsage).&#160; This is all fine and great, but I wanted to take a step even further than this and describe the relationship among VMs in the fast provisioning world (Get-CIVMDiskFileChain,Get-CIVMDiskFiles).&#160; These commands will list out the relevant virtual disks and show the amount of VM’s sharing those virtual disks and the chain length.</p>
<h3>VApp/VAppTemplates and Catalogs</h3>
<p>Note that due to the complexity of deployment the Instantiate-VApp cmdlet has been changed.&#160; In a previous post I demonstrated how you might be able to specify all of the relevant details (NAT, Firewall, etc) on the fly.&#160; This however is a bit tough to get going correctly and for most not necessary.&#160; So instead I opted to go for the “Clone” route which takes an existing configuration contained in a VAppTemplate and duplicates as much of it as possible versus specifying these things manually.&#160; I have also included another goodie (DeployLab-FromOrgCatalogToAnotherOrgCatalog) which demonstrates the VC to VC scalability of vCD without using the OVF export routine (future post to explain).&#160; Another good one is the ability to add VApps to catalogs and duplicate VAppTemplates among catalogs (Add-CIVAppTemplateToCatalog).&#160; Last but not least, in order to leverage VC to VC transfers correctly we have included the ability to consolidate VAppTemplates in the catalog (Consolidate-CIVAppTemplate).&#160; A new concept for vCD are shadow VMs.&#160; These are used to track back to original VApp Templates and can be difficult to track down at times so there is a cmdlet for this as well (Get-CIVMShadow).</p>
<p>WARNING: The VApp/VAppTemplate cmdlets allow you to do things that might bring you outside of your “workspace” which could cause OVF related activities (not good for most cases, lose VM identities, etc).&#160; Watch VC to see what is happening during these processes to ensure this is not the case.</p>
<h3></h3>
<h3></h3>
<h3></h3>
<h3></h3>
<h3>VC Related</h3>
<p>When running large scale environments there are always key things that need to be aligned.&#160; I created a couple of easy ones (Get-VMHostDateTime and Get-VMHostSoftwareList) to help out with ensuring the hosts are aligned from a time perspective, and verifying all hosts were running the same vcloud agent version.&#160; You will notice that there are a handful of cmdlets that leverage a VC connection (Connect-VIServer) in order to work correctly.&#160; These are where I lookup the underlying VI information for an object to give a more complete view of something.&#160; These hybrid views have turned out to be very powerful.</p>
<p>&#160;</p>
<p>Anyways, have fun with the 43 cmdlets!&#160; The following is unsupported and probably soon to be replaced =)</p>
<p>&#160;</p>
<ul>
<li>Install PowerCLI 5.0.1, with Cloud </li>
<li>Download the Cmdlet module <a href="http://velemental.com/wp-content/uploads/2012/05/custom_vcd_cmdlets_050612.zip">here</a>. </li>
<li>Import-Module .\custom_vcd_cmdlets.psm1 </li>
<li>Connect-CIServer </li>
<li>Connect-VIServer on some cmdlets </li>
</ul>
<p>&#160;</p>
<h3>Remove-Catalog</h3>
<p>Get-Catalog -name Catalog01 -org myOrg | Remove-Catalog -Confirm:$False</p>
<h3>New-Catalog</h3>
<p>New-Catalog -name Catalog01 -Org myOrg -isPublished:$true</p>
<h3>Remove-CICustomProperties</h3>
<p>Get-CIVApp Google* | Get-CIVM name | Remove-CICustomProperties</p>
<h3>Get-CIDatastore</h3>
<p>Get-ProviderVdc Google* | Get-CIDatastore</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/05/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb.png" width="580" height="232" /></a></p>
<h3>Get-CIMetadata</h3>
<p>Get-CIVApp Google* | Get-CIMetadata</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb1.png" width="578" height="78" /></a></h3>
<h3>New-CIMetadata</h3>
<p>Get-CIVApp Google* | Set-CIMetadata -key &quot;test&quot; -value &quot;testvalue&quot;</p>
<h3>Remove-CIMetadata</h3>
<p>Get-CIVApp Google* | where{$_.key -eq &quot;test&quot;} | Remove-CIMetadata</p>
<h3>Update-CIMetadata</h3>
<p>Get-CIVApp Google* | where{$_.key -eq &quot;test&quot;} | Update-CIMetadata -value &quot;updated&quot;</p>
<h3>Get-CIRouterInfo</h3>
<p>Get-CIVApp Google* | Get-CIRouterInfo</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb2.png" width="640" height="54" /></a></h3>
<h3>Update-CIUser</h3>
<p>Get-CIUser labsorg | Update-CIUser -description 1</p>
<h3>Remove-CIVApp</h3>
<p>Get-Org Labs | Get-CIVApp Base-ePod-Basic-v8 | Remove-CIVApp</p>
<h3>Start-CIVApp</h3>
<p>Get-CIVApp Google* | Start-CIVApp</p>
<h3>Get-CIVAppDiskGroupings</h3>
<p>Get-CIVApp VApptest* | Get-CIVAppDiskGroupings</p>
<h3>Get-CIVAppDiskUsage</h3>
<p>Get-CIVApp test* | Get-CIVAppDiskUsage</p>
<h3>Update-CIVAppParentNetwork</h3>
<p>Get-CIVApp Google* | Update-CIVAppParentNetwork -parentnetwork (Get-Org (Get-OrgVdc ovdc_labs_c03).org | Get-OrgNetwork orgnetwork_external01_c03)</p>
<h3>Get-CIVAppResourceUsage</h3>
<p>Get-CIVApp test* | Get-CIVAppResourceUsage</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb3.png" width="665" height="219" /></a></h3>
<h3>Consolidate-CIVAppTemplate</h3>
<p>Get-CIVAppTemplate Base-ePod-Basic-v8 -Catalog (Get-Org HOLDEV | Get-Catalog HOL_BASE_CAT01) | Consolidate-CIVAppTemplate</p>
<h3>Remove-CIVAppTemplate</h3>
<p>Get-CIVAppTemplate Base-ePod-Basic-v8 -Catalog (Get-Org HOLDEV | Get-Catalog HOL_BASE_CAT01) | Remove-CIVAppTemplate</p>
<h3>Update-CIUser</h3>
<p>Get-CIUser labsorg | Update-CIUser -description 1</p>
<h3>Get-CIVAppTemplateDiskUsage</h3>
<p>Get-CIVAppTemplate test* | Get-CIVAppTemplateDiskUsage</p>
<h3>Get-CIVAppTemplateResourceUsage</h3>
<p>Get-CIVAppTemplate test* | Get-CIVAppTemplateResourceUsage</p>
<h3>Add-CIVAppTemplateToCatalog</h3>
<p>Get-CIVAppTemplate Google* | Add-CIVAppTemplateToCatalog -VAppTemplateName test1 -Catalog (Get-Org labs | Get-Catalog test) -ToOrgVdc (Get-OrgVdc test)</p>
<h3>Get-CIVAppTemplateTotalUsage</h3>
<p>Get-CIVAppTemplate test* | Get-CIVAppTemplateTotalUsage</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb4.png" width="622" height="120" /></a></h3>
<h3>Get-CIVAppTemplateVM</h3>
<p>Get-CIVAppTemplate Google* | Get-CIVAppTempalteVM</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb5.png" width="610" height="289" /></a></h3>
<h3>Add-CIVAppToCatalog</h3>
<p>Get-CIVApp Google* | Add-CIVAppToCatalog -VAppTemplateName test13 -Catalog (Get-Org labs | Get-Catalog test) -OrgVdc (Get-OrgVdc OvDC_LABS_C03)</p>
<h3></h3>
<h3>Get-CIVAppNetworkingFirewallRules</h3>
<p>Get-CIVApp Base-ePod-Basic-v8 | Get-CIVAppNetworkingFirewallRules</p>
<h3>Get-CIVAppTotalUsage</h3>
<p>Get-CIVApp test* | Get-CIVAppTotalUsage</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb6.png" width="578" height="258" /></a></h3>
<h3>Get-CIVCVM</h3>
<p>Get-CIVM test* | Get-CIVCVM | Get-VMDiskFiles</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb7.png" width="769" height="418" /></a></h3>
<h3>Get-CIVMDiskFileChain</h3>
<p>Get-CIVM &quot;vpodrouter v3&quot; | Get-CIVMDiskFileChain</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb8.png" width="919" height="186" /></a></h3>
<h3>Get-CIVMFencing</h3>
<p>Get-CIVApp | Get-CIVM | Get-CIVMFencing</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image9.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb9.png" width="983" height="212" /></a></h3>
<h3>Get-CIVMHardDisk</h3>
<p>Get-ProviderVdc Google* | Get-CIDatastore</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image10.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb10.png" width="959" height="206" /></a></h3>
<h3></h3>
<h3>Get-CIVMShadow</h3>
<p>Get-CIVMShadow</p>
<h3>DeployLab-FromOrgCatalogToAnotherOrgCatalog</h3>
<p>Get-CIVAppTemplate HOL12-HyperV-SPwithAvamar-v9-Clint -Catalog (Get-Catalog HOLDEV_HOL12_CAT01) | DeployLab-FromOrgCatalogToAnotherOrgCatalog -ToOrgVdc @(&quot;OvDC_LABS_C01&quot;,&quot;OvDC_LABS_C02&quot;,&quot;OvDC_LABS_C03&quot;,&quot;OvDC_LABS_C04&quot;) -ToOrgVdcMC OvDC_HOLDEV_HOL12_C01_MC01 -prefix &quot;MC_&quot; -fromCatalog &quot;HOLDEV_HOL12_CAT01&quot; -ToOrg &quot;Labs&quot; -verbose</p>
<h3>New-Org</h3>
<p>New-Org -Name name -FullName fullname -Enabled:$true -PublishCatalogs:$true</p>
<h3>New-OrgGroup</h3>
<p>New-OrgGroup -Name name -GroupName GroupName -RoleName RoleName</p>
<h3>Set-OrgLDAP</h3>
<p>Set-OrgLDAP -name&#160; orgName –orgLDAPSystem:$true</p>
<h3>New-OrgVdc2</h3>
<p>New-OrgVdc2 –name fromOrg –FromOrgVdcName fromOrgVdc –orgVdcName newOrgVdc</p>
<h3>Instantiate-VApp</h3>
<p>Instantiate-VApp -name &quot;test&quot; -catalogname HOLDEV_HOL22_CAT01 -VAppTemplateName HOL22-Test-v1 -orgvdcname OvDC_HOLDEV_HOL22_C01 -mode Clone -poweron:$false -deploy:$false</p>
<h3>Get-VMDiskFiles</h3>
<p>Get-CIVM test* | Get-CIVCVM | Get-VMDiskFiles</p>
<h3><a href="http://velemental.com/wp-content/uploads/2012/05/image11.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb11.png" width="828" height="350" /></a></h3>
<h3>Get-VMDiskUsage</h3>
<p>Get-CIVM test* | Get-CIVCVM | Get-VMDiskUsage</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/05/image12.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/05/image_thumb12.png" width="957" height="235" /></a></p>
<h3>Get-VMHostSoftware List</h3>
<p>Get-VMHost | Get-VMHostSoftwareList | where {$_.name -match &quot;vcloud&quot;}</p>
<h3>Get-VMHostDateTime</h3>
<p>Get-VMHost -server vc01 | Get-VMHostDateTime</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/05/05/unofficial-vmware-vcd-cmdlets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial: Building Custom Dashboards in vCOps</title>
		<link>http://velemental.com/2012/04/12/tutorial-building-custom-dashboards-in-vcops/</link>
		<comments>http://velemental.com/2012/04/12/tutorial-building-custom-dashboards-in-vcops/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:39:27 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[vcops vcenter operations heatmap health tree relationships scoreboard]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/04/12/tutorial-building-custom-dashboards-in-vcops/</guid>
		<description><![CDATA[This post is a semi-detailed tutorial on building your own dashboard using out-of-the-box widgets in VMware vCenter Operations Enterprise.&#160; The information presented is based on how I’ve been using vCOps over the past year which should be a good starting point for anyone that is looking to go beyond the standard dashboards, dashboard templates, or [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a semi-detailed tutorial on building your own dashboard using out-of-the-box widgets in VMware vCenter Operations Enterprise.&#160; The information presented is based on how I’ve been using vCOps over the past year which should be a good starting point for anyone that is looking to go beyond the standard dashboards, dashboard templates, or analysis views.&#160; I explain some of the basics and also some of the gotchas that you can run into when building these dashboards.&#160; Some of the views presented are specific to storage, but overall it should be useful for any metrics and resources available within vCOps.</p>
<p>It is very important to mention that this configuration is done using the custom portal and <u>NOT</u> the <u><strong>vSphere portal</strong></u> in vCOps.&#160; The vSphere portal is statically configured in a way that allows you to get very useful data and switch contexts for that data in an <strong><u>out-of-the-box way</u></strong>.&#160; The custom portal is where you can go (Enterprise/+ only in v1+v5) and create your own complete dashboards.&#160; The custom portal is also the location where you access the 3rd party metrics that may have been brought in through 3rd party adapters (Java RMI) or the vCOps open adapter (HTTP Post).</p>
<p>Requirements</p>
<ul>
<li>vCOps Enterprise </li>
<li><a href="https://vcops/vcops-custom/">https://vcops/vcops-custom/</a> </li>
</ul>
<p>&#160;</p>
<h3><a name="_Toc321952407">New Dashboard</a></h3>
<p>The first thing that I want to do is walk through how to create a new dashboard. There are default templates that come with vCOps which are those that include a set of configured/unconfigured widgets. We could leverage these templates since they contain widgets and dimensional styles that may be desired, or we could use the template and remove the widgets once they get added. Instead of either of these&#160; approaches, I will demonstrate how to create a dashboard from individual widgets without a template.</p>
<p>Login to vCOps through the custom URL as listed above and press the “+” button on the dashboard row.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image001.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://velemental.com/wp-content/uploads/2012/04/clip_image001_thumb.png" width="342" height="108" /></a></p>
<p>You will see the template screen load, go ahead and press the icon in the top left corner as shown below. This will bring up the screen that allows us to simply choose widgets.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image002.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://velemental.com/wp-content/uploads/2012/04/clip_image002_thumb.png" width="337" height="209" /></a></p>
<p>Now we get to choose the style and name of the widget that we are creating. On the left side you can see the drop down where we decide how many columns that will be presented in this vCOps dashboard.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image004.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://velemental.com/wp-content/uploads/2012/04/clip_image004_thumb.jpg" width="539" height="111" /></a></p>
<p>We have selected three columns and you can see on the right side that our page setup has changed to three vertical columns. Our next option is to actually slide the two columns in the middle left and right which creates custom dimensions for the width of my widgets.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image006.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://velemental.com/wp-content/uploads/2012/04/clip_image006_thumb.jpg" width="540" height="87" /></a></p>
<p>In the following screenshot we are now showing the list of available widgets on the left and the subscribed widgets for this dashboard on the right. I can simply drag and drop any widget from the left to the right. The order does not matter on the right side and has no permanent effect of how widgets will be displayed on the dashboard, so simply drag and drop any widget that you would like.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image008.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://velemental.com/wp-content/uploads/2012/04/clip_image008_thumb.jpg" width="608" height="349" /></a></p>
<p>I have dragged over a handful of widgets that I will now demonstrate how to configure. You can see the health-workload widget, generic scoreboard, heat maps, and a metric graph. This by no means indicates the usefulness of any of the widgets, they all have value and I encourage you to play and test them out! </p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image009.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image009" border="0" alt="clip_image009" src="http://velemental.com/wp-content/uploads/2012/04/clip_image009_thumb.png" width="322" height="435" /></a></p>
<h3>&#160;</h3>
<h3><a name="_Toc321952408">Gadgets with VNX Data – Performance Metrics</a></h3>
<p>This section will demonstrate some of the common ways that you can visualize important VNX storage array information with the scoreboard, heatmap, metric graph widget. We showed you how to create a dashboard above, go ahead and drag the widgets listed to a new dashboard. Once you&#160; have done this click the configuration button from the Generic Scoreboard.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image011.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image011" border="0" alt="clip_image011" src="http://velemental.com/wp-content/uploads/2012/04/clip_image011_thumb.jpg" width="520" height="23" /></a></p>
<p>You will notice that the following widget configuration window arises. The information here should be pretty self explanatory. However, I wanted to take a quick second to describe some of the buttons on the interface that are common to vCOps.</p>
<p>The following shows up under the configuration of the widget. On the bottom left of the red box it has an icon marked with an “x”. This icon refers to “clear selections” and removes any rows that you may have selected in the list. This is important to remember as vCOps is filled with selectable boxes and filters. It can be very easy to not get the results that you were expecting because you have an existing selection that may be hidden from you. The button to the right with the green arrow has to do with multiple selects. In this case we are selecting a resource and on the right side vCOps, it is populating metrics for this object. What if we had a case where we had multiple objects (SPA &amp; SP B) which are the same Resource Kind with the same metrics. Wouldn’t it be easier just to select both SP’s and then have the common metrics be displayed on the right? And then when I select a metric and hit the multi-select above those metrics that both SP’s metrics populate in the list at the bottom? This is exactly how it works.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image012.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://velemental.com/wp-content/uploads/2012/04/clip_image012_thumb.png" width="126" height="95" /></a></p>
<p>Ok, time to move on. The following window shows the configuration of the Scoreboard widget. We have populated metrics into the selected metrics box as described. We have also assigned “Box Labels” and “Measurement Units”. You can see from the screenshot below the widget configuration where we display the widget itself that those items show up above the metric and to the right of the metric. The other important thing has to do with the range.</p>
<p>Note: See the User’s Guide (v1.0.2) for more examples and detailed information <a href="http://www.vmware.com/pdf/vcops-enterprise10-users-guide.pdf">here</a>.</p>
<p>The range is a tough one to get correct without an example. The “green range” refers to anything up to the green maximum, so in our case we enter “40” for SP utilization. The “yellow range” refers to an amount between the minimum and maximum of that range, so for this we enter “40-60”. We repeat the same in orange as a range of “60-80”. The “red range” is then configured with the minimum of that range, in this case “80” which covers anything between 80 and up. We also configure throughput as IO/s in the scoreboard, but feel free to choose any metric.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image014.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://velemental.com/wp-content/uploads/2012/04/clip_image014_thumb.jpg" width="743" height="536" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image016.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://velemental.com/wp-content/uploads/2012/04/clip_image016_thumb.jpg" width="505" height="121" /></a></p>
<p>The next examples will be leveraging the “Heat Maps” widget. We will be repeating the usage of this widget across many different types of objects, so the explanation of how to configure it in general will only be done once.</p>
<p>The heatmap is an awesome way to visualize data. When looking at the widget generated, there are two main options for displaying metrics. The first is the “Size By” and the second is “Color By”. This allows us to specify two separate metrics for a single resource. The heatmap is used in the Analysis -&gt; VC Analysis tab where VMware has packed in some great generic views. You can refer there for other examples of how you might format information. In terms of storage I would point you to the heatmaps that refer to Datastore, there are some really good ones there.</p>
<p>Getting back to visualizing the data. The heatmap allows us size the boxes displayed by a quantity and color them possibly by a health indicator. For example, if I want to see the hot datastores then I can create a heatmap that looks at the IOs as the size of the box and the response time for that datastore as the color. This is a very powerful view of exactly how my storage is performing out of the box for vCOps. You can even take this to a more VM specific heatmap where you see virtual disk IO and response times. The other bonus for heatmaps has to do with how we group the information being presented. It would be one thing just to show say VMs on a heatmap and size as discussed. It is another thing to actually group those VMs into possibly the ESX host first, and then display the VMs after that. This way we would have another metric displayed which would be the ESX host’s aggregate IO being generated for those VMs along with the previous view of simply VMs.</p>
<p>We leverage this grouping in many different cases. For the examples below we are actually pulling data from 5 different VNX’s. In order to properly segregate out the resources we needed to create a “tier” ahead of time where we could properly define what those resources were. Unfortunately, identifiers (uniqueness of resources) aren’t possible to group by. So we use tiers instead and this generates what you see in the widget screenshot below the configuration where you see the array name itself, and the objects inside of the major group box pertaining to that tier or array.&#160; Don’t worry about tiers if you’re just starting out!</p>
<p>The next thing to point out is the “Resource Kinds” drop down. This drop down is where we specify which resource we want to pull metrics for. By populating this drop down with a resource kind, the lists below it for size and color are populated. The section below the “Size By” and “Color By” lists refers to how we filter the data being returned. This would be a case where we wanted to possibly display the resource kind of Virutal Machine, but there were specific VMs we wanted filtered or not filtered. We could create custom tiers, applications, or any of the listed tags to filter appropriately.&#160; The combinations in this area are essentially limitless.</p>
<p>The next section to highlight is in the top right on the color spectrum. You can see that there are two squares which allow us to customize the colors that show up during a range of values that are returned from the “Color by” metric selection. If these are left blank then the widget will take the maximum and populate the color manually. For percentages that are predictable for their health (utilization is a good candidate), it is always a good idea to fill in 0 and 70 for the range of green to red. However, keep in mind that some metrics may be reversed where being higher might not represent being worse and could be the opposite. In these cases you can press the box below the color spectrum to reverse the colors. You can even use a small trick to choose black for one of the left or right color boxes which (if you have dark set for user preferences) will make the box empty until you hit a certain point in the range. The black would reference no activity value instead of a good or bad value. </p>
<p>One last important thing to mention for heatmaps is around saving your configuration. Use the green plus button at the top right to create a new profile for each heatmap widget and configuration. When you have changed anything for this widget, either press the save button (disk below green plus icon) or press the green plus icon (for a new config).</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image018.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://velemental.com/wp-content/uploads/2012/04/clip_image018_thumb.jpg" width="683" height="545" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image020.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image020" border="0" alt="clip_image020" src="http://velemental.com/wp-content/uploads/2012/04/clip_image020_thumb.jpg" width="565" height="196" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image022.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image022" border="0" alt="clip_image022" src="http://velemental.com/wp-content/uploads/2012/04/clip_image022_thumb.jpg" width="654" height="521" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image024.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image024" border="0" alt="clip_image024" src="http://velemental.com/wp-content/uploads/2012/04/clip_image024_thumb.jpg" width="643" height="204" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image026.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image026" border="0" alt="clip_image026" src="http://velemental.com/wp-content/uploads/2012/04/clip_image026_thumb.jpg" width="652" height="522" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image027.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image027" border="0" alt="clip_image027" src="http://velemental.com/wp-content/uploads/2012/04/clip_image027_thumb.png" width="629" height="264" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image029.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image029" border="0" alt="clip_image029" src="http://velemental.com/wp-content/uploads/2012/04/clip_image029_thumb.jpg" width="630" height="502" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image030.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image030" border="0" alt="clip_image030" src="http://velemental.com/wp-content/uploads/2012/04/clip_image030_thumb.png" width="640" height="245" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image032.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image032" border="0" alt="clip_image032" src="http://velemental.com/wp-content/uploads/2012/04/clip_image032_thumb.jpg" width="632" height="506" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image033.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image033" border="0" alt="clip_image033" src="http://velemental.com/wp-content/uploads/2012/04/clip_image033_thumb.png" width="624" height="213" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image035.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image035" border="0" alt="clip_image035" src="http://velemental.com/wp-content/uploads/2012/04/clip_image035_thumb.jpg" width="622" height="496" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image036.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image036" border="0" alt="clip_image036" src="http://velemental.com/wp-content/uploads/2012/04/clip_image036_thumb.png" width="616" height="221" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image038.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image038" border="0" alt="clip_image038" src="http://velemental.com/wp-content/uploads/2012/04/clip_image038_thumb.jpg" width="620" height="496" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image039.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image039" border="0" alt="clip_image039" src="http://velemental.com/wp-content/uploads/2012/04/clip_image039_thumb.png" width="624" height="311" /></a></p>
<p>The next widget that we will run through configuring is the metric graph widget. You can see here that there isn’t much to this one. You simply select a single or many resources from the list in the middle and then using the drag and drop method or the multi-select icon to bring the resource metrics up on the right. This is then followed by the same action, or the multi-select again to get the resources to the bottom list. You can then drag and drop those resources in the “Selected Metrics” window in the desired order.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image041.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image041" border="0" alt="clip_image041" src="http://velemental.com/wp-content/uploads/2012/04/clip_image041_thumb.jpg" width="633" height="445" /></a></p>
<p>You can see in the following screenshot that the legend at the bottom lists the values that we selected in the configuration. Defaulty, this widget may display the graphs individually in a list. However, we wanted to see everything overlayed together so we hit the button on the top left with the green and red lines which toggles between many and single metrics per graph.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image043.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image043" border="0" alt="clip_image043" src="http://velemental.com/wp-content/uploads/2012/04/clip_image043_thumb.jpg" width="552" height="569" /></a></p>
<p>An important thing to note with the graphing is the calendar portion of configuring the widget. There is a line and an arrow in the middle of the line above the graph. You can press this which will reveal the calendar portion to properly set the desired timeframe. We selected last hour in this example, but this can be whatever you want. Simply press the line with the arrow (divider) to hide the date selection.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image044.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image044" border="0" alt="clip_image044" src="http://velemental.com/wp-content/uploads/2012/04/clip_image044_thumb.png" width="547" height="318" /></a></p>
<h3>&#160;</h3>
<h3><a name="_Toc321952409">Health</a></h3>
<p>Health is an very important and useful feature within vCOps. Health relies on a lot of different metrics, their anomalies, and ties this together with context sensitive information about how relevant those metrics are to the overall health of the resource and its dependencies. The longer you analyze the metrics the better that vCOps can make good decisions about proper dynamic thresholds (DT) for that metric. All of the EMC metrics can contribute to the health of that resource over time. Let’s take a look at some different views that might help us dig through the health of resources.</p>
<p>For the following examples we will be leveraging the Health Status and Resources widget. These two widgets actually interact together so that we can at any time change the context of what we are viewing by clicking on the Resource List widget and have that change the view in the Health Tree.</p>
<p>We start by simply dragging the widgets over into the dashboard as described previously and configuring the health status widget. The only selection that we changed has to do with the Mode, where we set “parent”. This simply means that when this widget receives a request to change views that it looks at what was selected and then displayed the parents of that resource. It is important to make sure that “Self Provider” is not enabled here.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image046.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image046" border="0" alt="clip_image046" src="http://velemental.com/wp-content/uploads/2012/04/clip_image046_thumb.jpg" width="656" height="491" /></a></p>
<p>The next thing is to click the “interactions” button on the top right of the dashboard view.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image048.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image048" border="0" alt="clip_image048" src="http://velemental.com/wp-content/uploads/2012/04/clip_image048_thumb.jpg" width="648" height="135" /></a></p>
<p>This is where we can setup the relationship that determines where the actionable selection as mentioned previously gets displayed. In this case we are selecting the “resources” widget as the provider which means the health status widget will change context whenever we click a new resource in the list of the resource widget.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image050.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image050" border="0" alt="clip_image050" src="http://velemental.com/wp-content/uploads/2012/04/clip_image050_thumb.jpg" width="664" height="172" /></a></p>
<p>Go ahead and test this out once you save the configuration. You should be able to click through the resource list and have the information populated to the health tree widget. </p>
<p>Now the resource list that we are viewing may not need to be for all resources that vCOps has access to. If we want to limit the list this is a perfect situation to leverage a filter. The following is a list of proper filters for this example “Datastore,DISK,LUN_*,RAIDGROUP,SP,VIRTUAL MACHINE”. Remember the selection and de-selection process above the tag list. It never hurts to just use the de-select button (not red slash, that is reverse). We have also leveraged the order capabilities below the filter to make the list a bit neater for viewing.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image052.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image052" border="0" alt="clip_image052" src="http://velemental.com/wp-content/uploads/2012/04/clip_image052_thumb.jpg" width="665" height="514" /></a></p>
<p>With that complete you can now see the more friendly listing of resources and their health.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image054.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image054" border="0" alt="clip_image054" src="http://velemental.com/wp-content/uploads/2012/04/clip_image054_thumb.jpg" width="672" height="307" /></a></p>
<p>Now let’s take this to the next level. There are plenty of other widgets that can be added to this dashboard and viewed at the same time that might be useful. I added the Metric Selector widget which you can now see listed under the Interactions section of the dashboard. I am going to populate the metric selector with the resources as a provider. This will allow us to select a specific metric for a resource once it is selected.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image056.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image056" border="0" alt="clip_image056" src="http://velemental.com/wp-content/uploads/2012/04/clip_image056_thumb.jpg" width="696" height="183" /></a></p>
<p>You’ll also notice that we added a Metric Graph widget. We can select the resources provider in the top drop down, followed by the metric provider in the bottom drop down. This will give the metric graph everything that it needs to generate graphs on the fly as we click through our resources and metrics.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image058.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image058" border="0" alt="clip_image058" src="http://velemental.com/wp-content/uploads/2012/04/clip_image058_thumb.jpg" width="709" height="201" /></a></p>
<p>There you go, you can now see this dashboard coming to shape all properly related and interacting. Here we have chosen a resource. This resource has populated the parents above it. We then can choose a metric for the resource (double click) which then displays the graph below it.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image060.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image060" border="0" alt="clip_image060" src="http://velemental.com/wp-content/uploads/2012/04/clip_image060_thumb.jpg" width="613" height="405" /></a></p>
<p>&#160;</p>
<h3><a name="_Toc321952410">Relationships</a></h3>
<p>Another very cool thing that was slightly highlighted in the previous examples is around relationships. We demonstrated this capability by setting a “parent” for the health status widget. Let’s add a couple of more useful widgets to the dashboard that should better demonstrate what the relationships. We have added another Health Tree and a Root Cause Ranking widget. The interactions have then been set to be populated by the resources widget.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image062.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image062" border="0" alt="clip_image062" src="http://velemental.com/wp-content/uploads/2012/04/clip_image062_thumb.jpg" width="637" height="273" /></a></p>
<p>Here are the new widgets stacked on top of each other. We have selected the management datastore which would show us the immediate parents and children. If you have the EMC relationships or relationships with the resource you are viewing properly configured here (as I don’t) you would see the EMC LUN or NFS export listed below the VMware datastore (management). Below this health tree widget you can see that we are calling out the root causes for any health deterioration of the resource in question.    <br /><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image064.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image064" border="0" alt="clip_image064" src="http://velemental.com/wp-content/uploads/2012/04/clip_image064_thumb.jpg" width="635" height="414" /></a></p>
<p>We are going to add one more health tree widget that allows us to take some pretty interesting views of the relationships. Where we previously were showing relationships based on the resources widget, we now can show relationships based on the actual health tree itself. This allows us to simple click a resource in the health tree which then populates the parent/child relationships in the new health tree.    <br /><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image066.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image066" border="0" alt="clip_image066" src="http://velemental.com/wp-content/uploads/2012/04/clip_image066_thumb.jpg" width="631" height="391" /></a></p>
<p>Here is a view of that if it didn’t make sense when I described it. Here we are looking at the templates resource on the top. We then selected the “win7-basevm” resource which populated its direct parents and children. This would be a view that we would typically get if we double clicked the resource since the health tree itself will drill into whichever object we specify. By adding another health tree we can keep the top view stationary and explore relationships of any resource.    <br /><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image068.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image068" border="0" alt="clip_image068" src="http://velemental.com/wp-content/uploads/2012/04/clip_image068_thumb.jpg" width="656" height="455" /></a></p>
<p>Here is a complete picture of the dashboard that we have created. You can see all of the widgets listed that we configured along with their dimension that was defined vertically per widget and horizontally per dashboard.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image070.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image070" border="0" alt="clip_image070" src="http://velemental.com/wp-content/uploads/2012/04/clip_image070_thumb.jpg" width="664" height="260" /></a></p>
<p>&#160;</p>
<p>Hopefully this information is useful. I wouldn’t expect anyone to specifically use these examples exactly as is. The information presented is more for educational purposes so that you can go off and create your own dashboards!</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/04/12/tutorial-building-custom-dashboards-in-vcops/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>VMware VApps: An Empirical View</title>
		<link>http://velemental.com/2012/04/10/vmware-vapps-an-empirical-view/</link>
		<comments>http://velemental.com/2012/04/10/vmware-vapps-an-empirical-view/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 05:39:48 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[vcd vcloud vapp sdn vsphere]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/04/10/vmware-vapps-an-empirical-view/</guid>
		<description><![CDATA[In my most recent post I discussed the concept of OVFs and custom properties associated to OVFs that can help to configure an application and how these work or don’t work with VMware vCloud Director at the moment (v1.5).&#160; I also made a large statement around how the VApps in vSphere aren’t the same as [...]]]></description>
			<content:encoded><![CDATA[<p>In my most recent <a href="http://velemental.com/2012/04/08/vcloud-director-ovfs-and-vapp-custom-properties/">post</a> I discussed the concept of OVFs and custom properties associated to OVFs that can help to configure an application and how these work or don’t work with VMware vCloud Director at the moment (v1.5).&#160; I also made a large statement around how the VApps in vSphere aren’t the same as VApps in vCD.&#160; I wanted to take a second and expand on that topic to better understand what those differences may be and why.</p>
<p>I believe this can be approached from the top down where we first start to understand where VMware is going with their cloud solutions portfolio.&#160; Let’s begin by focusing in a specific area such as Applications.&#160; If you’ve been a part of virtualization over the last handful of years a trend has started to become very clear (it’s coming, yes the big c-word).&#160; As we virtualize pervasively across all different aspects of infrastructure,&#160; from the operating system, virtual hardware, storage, networking, compute, and just about all other areas there is a common theme that we are driving towards.&#160; We are seeing a lot of organizations working feverishly&#160; towards the bigger theme of cloud.&#160; In this thought I am referring to cloud in how we expect technology to be agile, elastic, and scalable unlocking different ways for organizations to consume and deliver applications to their end users.</p>
<p>When we look at Infrastructure, Applications, and End-User computing together we start to get a view of what we’re working with.&#160; The truth of the matter however, is that it is our users that keep the roof on the head and it is the applications that an organization provides that allow them to be efficient.&#160; So for this reason we focus highly on how we can make the applications as agile as possible.&#160; This refers to the notion that an application can be ran from anywhere on anything with a minimal amount of physical requirements, and the thoughtlessness involved in having transparent automation to accomplish successful deployment.&#160; In order to accomplish these things it requires that we start to move away from physical definitions of requirements such as networking hardware capable of value-add features, to providing these same purpose built services in the virtual world and having these services portable or defined alongside an application.&#160; Are we referring to a Virtual Application here?&#160; No, we are referring to an Application that leverages Virtualization to be agile, elastic, and scalable.&#160; There is are other trends of course out there, but let’s focus..</p>
<p>So let’s take a step back to what a Virtual Appliance is in the general Hypervisor world.&#160; A VApp in the previous and short term has typically been known for a couple of things.&#160; The first being the ability to be downloaded as a pre-built, pre-configured, VM or set of Virtual Machines, that can be consumed from&#160; a VMware “store (marketplace)” or other location.&#160; Once a VApp or OVF (Open Virtualization Format) is downloaded the next concern is how the VApp is operated.&#160; This being a set of Virtual Machines grouped together, we paid high attention to setting a start order, defining IP addressing (basically a wizard driven process), all constrained by a certain resource consumption policy.&#160; These two things of downloading and operating being directly related of course.&#160; In continuing our thoughts around how VApp’s are growing up, I now draw a connection from cloud to VApps.</p>
<p>When I previously said that our usage of the term cloud was around being “agile, scalable, and flexible.”&#160; The idea of an existing VApp didn’t necessarily directly promote those concepts,.&#160; So if I was going to make a VApp to meet these “Cloud” concepts for v<u>Cloud</u> Director it would make sense to start from scratch and think about this a bit differently.&#160; We would have to begin to think about what we can contain in a VApp container that would help to make our applications function anywhere, without limitations or physical requirements.</p>
<p>In the rest of the post I will look at the following major areas.</p>
<ul>
<li>VApp Networking </li>
<li>Service Definitions </li>
<li>VApp Templates and Catalogs </li>
<li>Resource Pools </li>
<li>Fast Provisioning </li>
<li><em>For good measure—The vSphere VApp</em> </li>
</ul>
<p>&#160;</p>
<p><em></em></p>
<p><em><strong>VApp Networking</strong></em></p>
<p>The first major difference between vSphere and vCD is the inclusion of optional VApp networking.&#160; If you’re brushing over this one, it’s actually a HUGE topic.&#160; vCD itself introduces many new levels of network virtualization.&#160; These levels can be defined as External Networks, Organizational Networks, and VApp Networks.&#160; In referring to these new networks vCD is providing a couple of major fundamental shifts in how we think about running Virtual Machines.&#160; The first is SDN (Software Defined Networking) where through invisible usage of vShield Edge devices, isolation, and L2 tunneling is achieved without the need for massive amount of VLANs and special networking configuration under the covers.&#160; The other major contribution is around services being deployed, also in an invisible fashion, to service applications or the isolation of VMs.&#160; When thinking about what an application requires to function it basically boils down to a few things.&#160; How am I going to provide proper isolation while leveraging my pool of compute, how can I ensure security among my VMs, and how can I provide services to these VMs that contribute to their operational qualities or remove physical dependencies.&#160; This would all be typically done by physical devices.&#160; Defining these as services for the VApp make for an ultra portable and scalable application.</p>
<p>Below is a VApp with a VApp Network defined.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb5.png" width="456" height="293" /></a></p>
<p>&#160;</p>
<p>Notice the following VApp diagram where we now have services defined (firewall, NAT) which connect externally to a organization network.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb6.png" width="443" height="315" /></a></p>
<p>&#160;</p>
<p>This is defined simply by the following screenshots and repeatable within a VApp or VApp Template.&#160; Here you can see that we have defined a VApp Network and it included NAT and Firewall services with an external connection to orgNetwork.&#160; The “192.168.0.1” services as our inside default gateway of the vShield Edge device shown as a firewall icon in the VApp diagram.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb7.png" width="502" height="111" /></a></p>
<p>&#160;</p>
<p>Here you can see that we have defined stateful TCP services for allowing RDP inbound and allowing all traffic outbound from the VApp VMs.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image9.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb8.png" width="501" height="219" /></a></p>
<p>&#160;</p>
<p>This screenshot show the NAT services that we have specified.&#160; The choices here are “IP Translation” or “Port Forwarding.”&#160; Under IPT an IP address is created on the external connection for every VM that is turned on or specified.&#160; Conversely, under “Port Forwarding” we simply manually specify which VMs and 1:1 rule of outside port to inside port is created on a single IP.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image10.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb9.png" width="469" height="194" /></a></p>
<p>&#160;</p>
<p>This is another important one.&#160; Notice how we define other interfaces as DHCP?&#160; This is to support SDN.&#160; Consider it this way, if I am wanting to create a policy for a VM in a firewall then the firewall is going to ask a simple question.&#160; What IP and what port/protocol?&#160; In order for vCD to communicate this it needs awareness all of the time with 100% certainty in order to be reliable.&#160; This basically means that the old trick of looking at a VM’s IP address via VM Tools won’t fly anymore.&#160; The requirement for repeatability is that vCD defines this information or you manually define this information for it.&#160; This is one of the purposes of IP Pools in vCD.&#160; In this case we have defined the nic0 of “vpodrouter v3” and the IP Mode as Static – Manual.&#160; We have then set the guest IP to match this.&#160; All other VMs in the VApp are set as “DHCP” and as long as we don’t attempt a customization this setting will not (and should not) be forced down to our VApp VMs.&#160; Long story, but this is a detail around IP configuration takes some first hand to fully grasp.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image11.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb10.png" width="194" height="262" /></a></p>
<p><em></em></p>
<p><em></em></p>
<p>Look at these emerging technologies.&#160; I am simply defining them in terms of VApps here.&#160; Take the same though to the virtual datacenter and ask yourself what that vDC would require to be cloud capable?&#160; L2 extensions? Highly available firewalls? High throughput? A lot of discussion here!</p>
<p><em></em></p>
<p><em><strong>Service (Section) Definitions</strong></em></p>
<p>Now let’s get back to differences..&#160; A great way to view some of these is to use PowerCLI and start navigating the two commands (Get-VApp/Get-CIVApp and Get-View/Get-CIView).&#160; One of the first things that popped out at me was the idea that the “services” that are being provided by the VApp Networking were being defined dynamically.&#160; By dynamically, I mean that instead of an Object having hardcoded Firewall, or NAT Policies, this information is all contained in a “Section” parameter which adheres to a general definition to support any number of things.&#160; This is where I start to put my technology cap on for a second.&#160; We briefly discussed VApp Networking and SDNs.&#160; This is clearly visible here (NetworkSection,NetworkConfigSection).&#160; The question that I throw out here is what else would be relevant to a VApp that can be defined dynamically?&#160; Here’s the framework to make it happen!&#160; An array of Section objects that can define any number of services provided to a VApp.</p>
<p>(Get-CIVApp name | Get-CIView).Section | select Href | fl *</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image12.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb11.png" width="473" height="145" /></a></p>
<p><em></em></p>
<p><em></em></p>
<p><em><strong>VApp Templates and Catalogs</strong></em></p>
<p>In comes another new but familiar term.&#160; Instead of thinking of things as VM Templates, in vCD we refer to them as VApp templates.&#160; This is the case even if there is only a single VM in the VApp template.&#160; Do I still need to define services associated to this single VM?&#160; There is always the option to opt-out of these services where Networking can operate in a simple “bridged” mode versus the “NATRouted” mode.&#160; With that said the VApp template is now the container that gets checked into a Catalog and serves as your Gold Copy for all preceding deployments of your VApp.&#160; Is this required? No you can still simply “Copy” VApp’s in order to spawn new copies.&#160; However, it is a way to share VApps between organizations.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image13.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb12.png" width="214" height="104" /></a></p>
<p>&#160;</p>
<p>Here you can see a Catalog populated with versions of our “Base” ePods.&#160; These are a collection of VMs that serve as a starting point from a networking and functional perspective for labs that we might offer.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image14.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb13.png" width="454" height="252" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p><em><strong>Resource Pools Are for Provider/Organizational Virtual Datacenters</strong></em></p>
<p>I haven’t quite stepped into what a Provider and Organizational Virtual Datacenters are.&#160; In one line, a PvDC maps to a cluster or possible physical location and an OvDC maps to a PvDC.&#160; An Organization currently (v1.5) creates an OvDC per PvDC that they would like to consume from.&#160; VApps are then deployed to OvDCs where an organization can have multiple OvDC’s differentiating either applications, departments, SLAs, or any number of different things.</p>
<p>This is a big one.&#160; In vSphere, VApps were essentially just Resource Pools under the covers with extra metadata.&#160; The metadata included things like startup order, and the Resource Pool allowed for native ability to segregate resource consumption for the set of VMs.&#160; In vCD the resource consumption is controlled most directly to the VApp at the OvDC level.&#160; So this only makes sense that an OvDC is simple just a Resource Pool right?</p>
<p>&#160;</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image15.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb14.png" width="348" height="106" /></a></p>
<p>&#160;</p>
<p>This is how vCD consumes the vSphere folders/hierachy.&#160; In this case, you can see our two nodes of the cluster at the top.&#160; Underneath that you can see the C01-RP which is where our Provider vDC is tied in.&#160; And below that we have OvDC_HOLDEV_C01 which is our first Organizational Virtual Datacenter.&#160; From there you simply see VMs with certain unique identifiers that vCD uses to track after the VM names and a special icon.&#160; So what is the main difference?&#160; If not using vCD, the VApp (Resource Pool) would contain only the VMs of that VApp and the VApp (Resource Pool) would define extra metadata.&#160; In vCD a Resource Pool is used simply to martial resources and is again tied directly to an Org vDC.&#160; You can see below that we have 15 or so of the same VM’s running, which means that we have 15 VApps running with that VM in vCD.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image16.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb15.png" width="311" height="212" /></a></p>
<p>&#160;</p>
<p><em><strong>Fast Provisioning</strong></em></p>
<p>As of vCD v1.5 Fast Provisioning is now an option along with a the legacy Thin provisioning capabilities.&#160; Although this is more technology directly aligned towards a VM itself, it is also important to mention that it does function with a VApp construct.&#160; Fast Provisioning is the capability to leverage linked clones at the VMDK level.&#160; This basically creates a new delta disk file for each new VM that is fired up and instantiates any changes this new VM introduces (writes) into the new delta VMDK.&#160; First off I am an EMC employee for this one, YES we highly support the use of linked clones with vCD.&#160; They improve the locality of IOs (better for caching), are space efficient, and are quick to deploy.&#160; Fast Provisioning can actually be thought of as a capability to snapshot in vCD (snapshotting VMs is not natively supported).&#160; By this I mean you can simply check a new copy to the catalog or copy your VApp in order to create a quick snapshot (no quiescing, VApp needs to be shutdown).&#160; Leveraging FP for snapshots is more useful is certain circumstances like labs, VApp development, versioning, than it is in production deployments.&#160; I will expand greatly on how FP looks under the covers in a upcoming post.&#160; For now VApps are FP aware, so all VMs are copied at the same point in time using linked clones.&#160; In vSphere, this was API driven from the VM level.</p>
<p><em></em></p>
<p><em></em></p>
<p><em><strong>For good measure&#8211;vSphere VApp</strong></em></p>
<p>The following is a traditional vSphere VApp which would be repeated any number of times.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image17.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb16.png" width="173" height="55" /></a></p>
<p>&#160;</p>
<p>You can see here some basic resource consumption policies, custom properties, IP Allocations, and Application specific properties.&#160; Other tabs listed are Startup Order and vServices.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image18.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb17.png" width="368" height="195" /></a></p>
<p>&#160;</p>
<p>The vServices is a new one with vSphere 5.0.&#160; Could it someday also allow for defining network services for a VApp?&#160; Probably not.&#160; Don’t underestimate the amount of work it takes to properly automate and implement SDN.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image19.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb18.png" width="457" height="215" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>That’s all!&#160; This has been a bit of a departure from my typical PowerCLI blogs but hopefully worth a quick read for anyone interested in the topic.&#160; Stay tuned for more vCD goodness!</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/04/10/vmware-vapps-an-empirical-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vCloud Director: OVFs and VM Custom Properties</title>
		<link>http://velemental.com/2012/04/08/vcloud-director-ovfs-and-vapp-custom-properties/</link>
		<comments>http://velemental.com/2012/04/08/vcloud-director-ovfs-and-vapp-custom-properties/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 05:23:36 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[vcd vcloud customproperties custom properties productsection ovf]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/04/08/vcloud-director-ovfs-and-vapp-custom-properties/</guid>
		<description><![CDATA[During the past couple of weeks we have been going full tilt building labs for EMC World 2012.&#160; So far this has been great on all sides and I have enjoyed getting stick time in the weeds with a whole lot of technology that I don’t typically get extremely deep with.&#160; In addition to getting [...]]]></description>
			<content:encoded><![CDATA[<p>During the past couple of weeks we have been going full tilt building labs for EMC World 2012.&#160; So far this has been great on all sides and I have enjoyed getting stick time in the weeds with a whole lot of technology that I don’t typically get extremely deep with.&#160; In addition to getting deep and mostly fixing stuff, I am also in a position where I can pull back the onion a bit and build cmdlets and put information out there that might be useful to the general VMware community.&#160; This post is going to dive a bit into the concept of an OVF file in vCD and what you need to know with vCD 1.5.</p>
<p>What the heck is an OVF?&#160; An OVF is an open standard for distributing virtual machines.&#160; The open standard should help standardize the formatting of a virtual disk, describe how a virtual machine needs to be configured to be re-assembled in other systems, and possibly describe an application configuration or custom properties that can be configured to make the VMs and vApp unique and/or function.&#160; This open standard should make it a snap to transfer in between different hypervisors, and hopefully first off within the same family of virtualization technology.</p>
<p>So if you’re like me then you probably expected that an OVF is the same to vCenter/vSphere as it is to vCD.&#160; Well, at the moment it’s not so and a vApp is currently (v1.5) technically not the same =(&#160; </p>
<p>This post should provide an option for navigating this mess and at least being able to get OVF’s constructed as packaged vApps to function in vCD.&#160; </p>
<p>vCloud itself has native functionality to import OVFs as vApps.&#160; The following screenshot was taken by navigating to a catalog, right clicking anywhere inside of the open catalog inventory and selecting upload.&#160; You can see that a Java window opens with the following questions around&#160; he OVF package location, name, and description.&#160; Upon selecting the appropriate options and saying upload, the transfer process begins where the virtual disks from the OVF are copied to the transfer directory of the vCD cell, configuration is consumed,&#160; followed by another copy up to a provider vDC datastore, and a final configuration of the vApp. </p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb.png" width="483" height="281" /></a></p>
<p>In comes the problem with OVFs!&#160; In order to understand this we need to see how OVFs are generated.&#160; I am going to present this in two export methods from VMware technologies.&#160; First though, the native vCD “Download” functionality where you can simply just right click a vApp Template and save the descriptor.ovf and associated files to a directory using the Java applet from vCD.&#160; This *should* be the most native way to reimport a vApp to vCD.&#160; The second way is more the legacy method where you export a vApp/VM from vCenter and/or possibly use <a href="http://www.vmware.com/support/developer/ovf/">OVFTool</a> to construct a vApp where you assign custom properties that a user should answer during the import process.&#160; The custom properties I am referring to may be to accept a license agreement, the hostname, IP address, subnet, gateway, etc. of VMs being deployed.&#160; These custom properties are where the problem comes into play.&#160; </p>
<p><em>Warning: What I am describing is something that I ran into so there are probably more ways to get around this and I probably am not presenting all the information correctly, but here goes..</em></p>
<p>The custom properties that are associated with an OVF seem to somewhat be incompatible (v1.5) with a standard “Upload”.&#160; If there are custom properties, or internally called the “ProductSection,” the upload may fail with the following errors and screenshots.</p>
<p>“Error: Validation failed for the OVF file you provided”</p>
<p>“complex-type2.4.a: Invalid content was found starting with element”</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image0028.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002[8]" border="0" alt="clip_image002[8]" src="http://velemental.com/wp-content/uploads/2012/04/clip_image0028_thumb.jpg" width="545" height="353" /></a></p>
<p>“Error: The manifest of the OVF package is invalid”</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image00210.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002[10]" border="0" alt="clip_image002[10]" src="http://velemental.com/wp-content/uploads/2012/04/clip_image00210_thumb.jpg" width="549" height="356" /></a></p>
<p>&#160;</p>
<p>So what do you do in this case?&#160; The easy way that I have gotten around this is to first import the OVFs into vCenter and then utilize the “Import from vSphere” functionality to get the individual VMs into a vCD vApp.&#160; This will allow you enter the OVF custom properties via vCenter as you normally would.&#160; However, keep in mind that the custom properties will still be associated to this VM, but you shouldn’t have any problem getting the VM imported this way.&#160; I suggest booting the VM up and then stopping it in vSphere following the standard “Deploy OVF Template” process.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb1.png" width="244" height="122" /></a></p>
<p>Now you may be thinking, hey that isn’t so bad?&#160; I got my VMs into the vCD vApp! Well it gets better.&#160; As mentioned before the custom properties may still persist so the problem can now effect the startup of the VM in vCD since it doesn’t play nice with some of the custom properties from VMs brought into vCD from vSphere and previously imported as OVFs.&#160; So what to do?&#160; Pop open your vApp in vCD, right click and go to properties.&#160; Do you see custom properties listed?&#160; If so then you might have a problem.&#160; Try filling these in and try and boot the VM.&#160; Like Below?&#160; Well for this of course we have Powershell and PowerCLI to the rescue!&#160; Below is an error that you may run into if there is invalid custom properties.&#160; Notice the “Invalid vApp Properties: Unknown property” error.&#160; This is followed by other errors where the process then tries to roll itself back and runs into errors doing this.&#160; Trying to start a vApp unsuccessfully may lead to having to go to vSphere and manually stop the other VMs in the vApp and/or delete a portgroup manually.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb2.png" width="493" height="364" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/clip_image002.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://velemental.com/wp-content/uploads/2012/04/clip_image002_thumb.jpg" width="484" height="359" /></a></p>
<p>Here is a quick look at what custom properties or “ProductSection” could possibly cause problems inside of the OVF file.&#160; Can you modify the OVF file ahead of time to make this easy?&#160; Probably, but I decided to go about it a different way.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb3.png" width="554" height="312" /></a></p>
<p>&#160;</p>
<p>So as usual I have built a custom cmdlet using the PowerCLI cloud methods.&#160; Following are the requirements.</p>
<ul>
<li>PowerCLI 5.0.1 (Cloud selected on install)</li>
<li>Download the new custom powershell module <a href="http://velemental.com/wp-content/uploads/2012/04/vcd_custom5_040612.zip">here</a>.</li>
<li>Run Connect-CIServer vCDInstance</li>
<li>Run Import-Module vcd_custom5.psm1</li>
</ul>
<p>&#160;</p>
<p><strong>*New Remove-CICustomProperties* </strong>This cmdlet will remove custom properties other than a single “ProductSection” relevant to the VM itself.&#160; Use at your own risk!</p>
<p>Example- Remove Custom Properties from a Virtual Machine named “name” in a vApp starting with “Google”.</p>
<p>Get-CIVApp Google* | Get-CIVM name | Remove-CICustomProperties</p>
<p>The following screenshot is what a VM in a vApp inside of vCD should look like from the “Custom Properties” tab.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/04/image4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/04/image_thumb4.png" width="685" height="160" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>And that’s it!&#160; From there you should have no problem starting this VM.&#160; If you are running into errors around the dvSwitch then you can either manually remove the associated dvPortGroup, create a new vApp and move the VMs into this vapp, or check the vApp into the catalog and redeploy it from the catalog as a new vApp.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/04/08/vcloud-director-ovfs-and-vapp-custom-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing Metadata in vCD with PowerCLI</title>
		<link>http://velemental.com/2012/03/29/managing-metadata-in-vcd-with-powercli/</link>
		<comments>http://velemental.com/2012/03/29/managing-metadata-in-vcd-with-powercli/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 21:01:38 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[powercli metadata vcd update new remove]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/29/managing-metadata-in-vcd-with-powercli/</guid>
		<description><![CDATA[I came across a post from William Lam today based on working with Metadata for VMware vCloud Director objects referenced here.&#160; This lit a bit of a spark which got me thinking about how mature the underlying assemblies were with vCD in PowerCLI.&#160; The jist of the debate here is that William is leveraging the [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a post from William Lam today based on working with Metadata for VMware vCloud Director objects referenced <a href="http://blogs.vmware.com/vsphere/2012/03/creating-custom-metadata-using-the-vcloud-api.html">here</a>.&#160; This lit a bit of a spark which got me thinking about how mature the underlying assemblies were with vCD in PowerCLI.&#160; The jist of the debate here is that William is leveraging the RESTful (simply web POST/GET/PUT) capabilities of the vCD API, whereas the Cloud portion of PowerCLI is built to do all of the RESTful calls for you as well as setting easy to use types.&#160; The downside to this approach is that you lose flexibility with PowerCLI whereas if there is a bug or something didn’t get implemented in PowerCLI then it will still need to be called from the REST interface.&#160; So far in my recent endeavors I have only run into a single situation (around a bug in NAT for vApps), other than that it’s been very mature from a method perspective.</p>
<p>What does this mean?&#160; Well I’ll have you read through his post, and even give it a shot =) Then give what you see below a try and it might shed some light on how effective good frameworks can be on top of APIs.&#160; This goes back to one of my philosophies around APIs.. they’re great, but if you truly want adoption you need to write frameworks or command line functionality on top of it to make it scalable.&#160; Without this it is only for the 1%’ers who have the time to read the docs and can do those types of calls. =)</p>
<p>What you’re going to find below are four new cmdlets for PowerCLI.&#160; As usual see the requirements.</p>
<ul>
<li>Downloaded the module <a href="http://velemental.com/wp-content/uploads/2012/03/vcd_custom4_032912.zip">here</a>. </li>
<li>PowerCLI 5.0.1 with Cloud selected on install </li>
<li>Import-Module vcd_custom4.psm1 </li>
<li>Connect-CIserver vCDInstance </li>
</ul>
<p>&#160;</p>
<p><strong>*New New-CIMetadata* </strong>Create new metadata associated to whichever vCD object is passed.&#160; See William’s post as mentioned at the top for other links around which objects are actually valid to tag Metadata to.</p>
<p><strong>*New Get-CIMetadata* </strong>Retrieve metadata for a specific vCD object.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image27.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb28.png" width="631" height="263" /></a></p>
<p>&#160;</p>
<p><strong>*New Remove-CIMetadata* </strong>Remove metata assocaited to whichever vCD object is passed.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image28.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb29.png" width="634" height="340" /></a></p>
<p>&#160;</p>
<p><strong>*New Update-CIMetadata*</strong> Updates metadata for a vCD object’s own metadata.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image29.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb30.png" width="629" height="356" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>Now if you’re interested in how we made this happen keep on following on.&#160; For those that just want the unofficial metadata cmdlets you should be good to go.</p>
<p>When exploring for unadvertised features in PowerCLI the first thing I always do is look through the views or ExtensionData from the object.&#160; You can see this below where I issue a “| gm *” after the view which is short for Get-Members *.&#160; The returned information is based on available methods and properties.&#160; The methods are all callable based on the definitions.&#160; This is the first hint that there is a lot of beef behind the Cloud assemblies for PowerCLI.&#160; Looking through the list you can see the GetMetadata methods, perfect!</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image30.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb31.png" width="576" height="614" /></a></p>
<p>With that method found, let’s start to use it.&#160; The following screenshot is a call to the method.&#160; You can see that we then have the metadata keys returned under the MetadataEntry parameter.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image31.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb32.png" width="719" height="174" /></a></p>
<p>However, what’s important here is that we are looking for something that might say “UpdateServerData.”&#160; If this was there I would be able to set the parameters directly and then call this method to actually post the changes.&#160; In this case that method doesn’t exist and instead there is actually one called SetMetadataValue.&#160; Wallah, there you go.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image32.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb33.png" width="668" height="278" /></a></p>
<p>Here are the specific Metadata entries that were stored in the MetadataEntry parameter.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image33.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb34.png" width="674" height="303" /></a></p>
<p>And the next section is actually a sample of what I would do to create a new metadata item.&#160; Notice how when we call SetMetadataValue for this first time it tells us the required parameters (key,value).&#160; In the next line we call it as it required and then check to see if it exists.&#160; Perfecto, all done.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image34.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb35.png" width="684" height="358" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>All in all I want to thank William and the PowerCLI team for implementing a lot of the vCD API.&#160; Although the cmdlets aren’t quite fully baked yet it looks like we will have a pretty rocking Powershell interface to vCD in the short term!</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/29/managing-metadata-in-vcd-with-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding and Removing Catalogs from vCD with PowerCLI</title>
		<link>http://velemental.com/2012/03/28/adding-and-removing-catalogs-from-vcd-with-powercli/</link>
		<comments>http://velemental.com/2012/03/28/adding-and-removing-catalogs-from-vcd-with-powercli/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 06:20:59 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[vcd vcloud new remove delete create catalog]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/28/adding-and-removing-catalogs-from-vcd-with-powercli/</guid>
		<description><![CDATA[As you can tell from the title this post is another (short) one in the easy button series for simple repeatable tasks in VMware vCloud Director leveraging PowerCLI and methods available with the default views.&#160; This one specifically is important if you are a service provider and wishing to create catalogs for customers on the [...]]]></description>
			<content:encoded><![CDATA[<p>As you can tell from the title this post is another (short) one in the easy button series for simple repeatable tasks in VMware vCloud Director leveraging PowerCLI and methods available with the default views.&#160; This one specifically is important if you are a service provider and wishing to create catalogs for customers on the fly or other use cases that are similar.&#160; Also, if you have the need to simply automate a whole bunch of monotonous tasks for setting up development areas for labs then this could help as well =)&#160; This is the 4th post in the series, and yes I will be combining all of the automation work together for vCD into a single module.&#160; I may even go as far as creating a module specifically dialed in around the vCD Lab use case!</p>
<p>So here we go, as usual see requirements below.&#160; </p>
<ul>
<li>PowerCLI 5.0.1 </li>
<li>Download the module <a href="http://velemental.com/wp-content/uploads/2012/03/vcd_custom3_032812.zip">here</a>. </li>
<li>Import-Module vcd_custom3.psm1 </li>
<li>Connect-CIServer vCDinstance </li>
</ul>
<p><strong>*New New-Catalog*</strong></p>
<p>Creates a new catalog by specifying the name of the catalog, the name of the organization and whether to publish (not in screenshot).</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image24.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb24.png" width="580" height="38" /></a></p>
<p><strong>*New Remove-Catalog*</strong></p>
<p>Removes an existing catalog from an organization.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image25.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb25.png" width="871" height="369" /></a></p>
<p><strong>*New Add-CIVAppToCatalog*</strong></p>
<p>Adds an existing VApp to a catalog.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image26.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb26.png" width="727" height="250" /></a></p>
<p>&#160;</p>
<p>That’s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/28/adding-and-removing-catalogs-from-vcd-with-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying a vApp in vCD from a catalog using PowerCLI &#8211; Part Two (the lab use case)</title>
		<link>http://velemental.com/2012/03/27/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli-part-two-the-lab-use-case/</link>
		<comments>http://velemental.com/2012/03/27/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli-part-two-the-lab-use-case/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 07:27:24 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[vcd vcloud deploy vapp networking bridge nat]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/27/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli-part-two-the-lab-use-case/</guid>
		<description><![CDATA[My most recent project has been a pretty fun one.&#160; As you might have been able tell so far it has to do with automating VMware vCloud Director.&#160; I have been focusing pretty heavily on some of the more common use cases, see this post around possibly signing up new organizations here, and here where [...]]]></description>
			<content:encoded><![CDATA[<p>My most recent project has been a pretty fun one.&#160; As you might have been able tell so far it has to do with automating VMware vCloud Director.&#160; I have been focusing pretty heavily on some of the more common use cases, see this post around possibly signing up new organizations <a href="http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/">here</a>, and <a href="http://velemental.com/2012/03/24/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli/">here</a> where we deploy a vApp from a catalog.&#160; This post is going to continue the deployment route by making the functions a bit more advanced in the networking area.</p>
<p>When deploying applications in vCD the combinations of external, organizational, and vApp networks are limitless.&#160; Depending on what the target operating environment is you might need to apply NAT at multiple levels or simply just bridge the networks together which would mitigate any networking multi-tenancy concepts.&#160; Other specific use cases may specify that you not create multi-tenant organizational network divisions, but more specifically a NAT per deployed vApps.&#160; This use case may be aligned towards a lab (hmmm… what’s coming up in May for EMC? And what do we offer there in massive scale?).&#160; Thanks Clair Roberts, Curtis Pope, Everett Golden @VMware Integration Engineering for providing some guidance here.&#160; </p>
<p>In proceeding down this path of leveraging vCD for possibly a lab environment I was able to look at a successful lab scenario (VMworld 2011) that leveraged vCD and looked into what it might take to achieve the same automation in Powershell.&#160; To be successful it is hard to communicate the amount of detail that goes into the backend equipment and vCD design.&#160; As far as vCD we break this into two areas, one for how we support the development of the labs and one for the operational aspects of active labs.</p>
<p>This post is going to demonstrate how we can provision from a catalog including the <em><strong>vApp Networking</strong></em> details that apply NAT for obfuscating vApp VM details, and firewall policies for allowing RDP connections into the vApp.</p>
<p>So let’s dig into it, get the next version of the functions for Instantiation-VApp cmdlet <a href="http://velemental.com/wp-content/uploads/2012/04/vcd_custom2_041212.zip">here</a>. ***</p>
<p>The new options that are included in this version have to do with the vApp networking for DHCP, Firewall, and NAT services.&#160; See the example parameters below when deploying a vApp.&#160; If you are not concerned about the details around how the vApp networking is configured, or you are going to leverage NAT possibly at the organizational level then you can skip everything at the –fencemode and below lines which aligns more with the previous post.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt" color="#006400"># Instantiate-VApp -name &quot;test&quot; -catalogname HOLDEV_HOL22_CAT01 -vappname HOL22-Test-v1 -orgvdcname OvDC_HOLDEV_HOL22_C01 -hashNetworks @{0=@{sourceNet=&quot;orgNetwork_EXTERNAL01_HOL22_C01&quot;;targetNet=&quot;orgNetwork_EXTERNAL01_HOL22_C01&quot;}} -fencemode &quot;bridged&quot;</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#006400" size="2" face="Lucida Console"># Or</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400"># Instantiate-VApp -name &quot;test&quot; -catalogname HOLDEV_HOL22_CAT01 -vappname HOL22-Test-v1 -orgvdcname OvDC_HOLDEV_HOL22_C01 -hashNetworks @{0=@{sourceNet=&quot;orgNetwork_EXTERNAL01_HOL22_C01&quot;;targetNet=&quot;orgNetwork_EXTERNAL01_HOL22_C01&quot;}} </font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-fencemode &quot;natRouted&quot; -natRoutedIpScope @{IsInherited = $False;Gateway = &quot;192.168.100.1&quot;;Netmask=&quot;255.255.255.0&quot;;Dns1=$null;Dns2=$null;DnsSuffix=$null}</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-IpScopeIpRanges @(@{startAddress=&quot;192.168.100.100&quot;;endAddress=&quot;192.168.100.199&quot;})</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-DhcpEnabled $False</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-DhcpIpRange @{startAddress=&quot;192.168.100.2&quot;;endAddress=&quot;192.168.100.99&quot;}</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-DhcpDefaultLeaseTime 3600</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-DhcpMaxLeaseTime 7200</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-FirewallEnabled $True</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-FirewallRule @(</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>@{IsEnabled=$True;Description=&quot;RDP&quot;;policy=&quot;allow&quot;;protocols=@{any=$null;icmp=$null;tcp=$True;udp=$null};port=-1;destinationip=&quot;Any&quot;;sourceport=3389;sourceip=&quot;Any&quot;;direction=&quot;in&quot;;enableLogging=$False},</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>@{IsEnabled=$True;Description=&quot;Allow all outbound traffic&quot;;policy=&quot;allow&quot;;protocols=@{any=$True;icmp=$null;tcp=$null;udp=$null};port=-1;destinationip=&quot;Any&quot;;sourceport=-1;sourceip=&quot;Any&quot;;direction=&quot;out&quot;;enableLogging=$False}</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>)</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#006400">#<span style="mso-spacerun: yes">&#160;&#160;&#160; </span>-Nat @{NatType=&quot;ipTranslation&quot;;Policy=&quot;allowTraffic&quot;}</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><span style="mso-spacerun: yes"><font face="Lucida Console"><font style="font-size: 10pt"></font></font></span></span></p>
<p>So in summary, if you use the parameters above when deploying from a catalog you will be deploying a vApp with a vApp networking leveraging the “natRouted” mode to provide separation from other vApps.&#160; All connectivity to the outside of the vApp will be provided by the “orgNetwork_EXTERNAL01_HOL22_C01” network which can be anything.&#160; See the previous post listed above if you need more details on the parameters before “-fencemode”.</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/27/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli-part-two-the-lab-use-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying a vApp in vCD from a catalog using PowerCLI</title>
		<link>http://velemental.com/2012/03/24/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli/</link>
		<comments>http://velemental.com/2012/03/24/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 07:30:05 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[deploying vapp template vcd automated linkedclone fastprovisioning]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/24/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli/</guid>
		<description><![CDATA[This post is a follow up to yesterday’s post where I continue to explore the vCD PowerCLI cmdlets and generate new one’s to fit my use cases.&#160; See yesterday’s post around requirements as they are the same.&#160; Attached here you will find another Powershell module with a new function in it.&#160; *New Instantiate-VApp* This function [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow up to <a href="http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/">yesterday’s</a> post where I continue to explore the vCD PowerCLI cmdlets and generate new one’s to fit my use cases.&#160; See yesterday’s post around requirements as they are the same.&#160; Attached <a href="http://velemental.com/wp-content/uploads/2012/03/vcd_custom2_032312.zip">here</a> you will find another Powershell module with a new function in it.&#160; </p>
<p><strong>*New Instantiate-VApp* </strong>This function looks for a specific VApp Template that resides in a catalog of an organization and creates a new VApp in a specific Organizational vDC.&#160; The following is what the parameter section looks like for runtime options.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">Param</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> (</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$Name</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">$(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;need -name&quot;</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$CatalogName</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">$(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;need -catalogname&quot;</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$VAppName</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">$(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;need -vappname&quot;</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$orgVdcName</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">$(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;need -orgVdcName&quot;</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$hashNetworks</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> @{}</span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$LinkedClone</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$true</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$AllEULAsAccepted</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$true</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$IsSourceDelete</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$false</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$Deploy</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$true</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#a9a9a9">,</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$PowerOn</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#ff4500">$true</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">)</font></font></span></p>
<p><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p>The parameters are pretty self explanatory, but if needed you can get some more information from the official vCD REST API guide <a href="http://www.vmware.com/pdf/vcd_15_api_guide.pdf">here</a> on page 33.&#160; The –name parameter is for the new vApp, and the VAppName is the template name.&#160; The piece that needs some expanding on is the $hashNetworks portion.&#160; Here we are using a hash table that is issues as follows.</p>
<p><font face="Lucida Console"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9"><font style="font-size: 10pt">-</font></font></span><font style="font-size: 10pt"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#0000ff">hashNetworks</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"> @{</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#800080">0</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">@{sourceNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;ALL_PURPOSE&quot;</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">;targetNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;BBS_external01&quot;</font></span></font><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font style="font-size: 10pt">}}</font></span></font></p>
<p><font size="2" face="Lucida Console"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"></span></font></p>
<p>The important thing here is that we need to map the VApp template network connections to the proper network in the destination Org vDC.&#160; For this we create a hash table based on an integer index (unique network names, not network adapters), and sourceNet/targetNet parameters under those indexes.&#160; So in essence, an array of hashTables with sourceNet/targetNet specified for mapping the two.&#160; A two index hash table would look like the following.</p>
<p><font face="Lucida Console"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9"><font style="font-size: 10pt">-</font></font></span><font style="font-size: 10pt"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#0000ff">hashNetworks</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"> @{</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#800080">0</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">@{sourceNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;ALL_PURPOSE&quot;</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">;targetNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;BBS_external01&quot;</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">};</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#800080">1</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">@{sourceNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;Internal-NoUplink&quot;</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa">;targetNet</span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#a9a9a9">=</font></span><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#8b0000">&quot;BBS_internal01&quot;</font></span></font><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font style="font-size: 10pt">}}</font></span></font></p>
<p><font size="2" face="Lucida Console"><span style="line-height: 12pt; font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"></span></font></p>
<p>The following is a screenshot of the script in action where we actually can choose not to specify –hashNetworks if we want to specify this manually after deployment or we are deploying to a vDC that has the network names that the vApp template currently has.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image22.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb22.png" width="799" height="365" /></a></p>
<p>&#160;</p>
<p>Otherwise we would run the command like follows.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image23.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb23.png" width="796" height="397" /></a></p>
<p>&#160;</p>
<p>In the good spirit of leaving bread crumbs for all of those fellow Powershellers out there, the function that I built leverages the calls that are a part of the OrgVdc object.&#160; This functionality is exposed via issuing a Get-OrgVdc cmdlet follwed by calling the Get-CIView cmdlet and then a method that is available called InstantiateVappTemplate.&#160; Previous to the method being called, we also built out the $paramsVAppT object to contain necessary required fields.&#160; These required fields were pulled and transcoded pretty much line for line from the official vCD REST API guide <a href="http://www.vmware.com/pdf/vcd_15_api_guide.pdf">here</a> on page 33.&#160;&#160; Hopefully following this function you can either make this cooler, or implement completely different use case.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">(</font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">Get-OrgVdc</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$orgVdcName</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">Get-CIView</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">.</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">InstantiateVappTemplate(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$paramsVappT</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">)</font></span></font></p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/24/deploying-a-vapp-in-vcd-from-a-catalog-using-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Orgs, OvDCs, and Setting LDAP in vCD with PowerCLI</title>
		<link>http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/</link>
		<comments>http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 06:54:22 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[vcloud director vcd automation ldap ovdc group]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/</guid>
		<description><![CDATA[I just recently had a chance to play around a bit with the vCD PowerCLI cmdlets.&#160; So far I have mixed reviews about what I have found, but it is a good start.&#160; There is a basic level of functionality exposed through cmdlets and a bit more that takes some slightly advanced Powershelling to expose.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently had a chance to play around a bit with the vCD PowerCLI cmdlets.&#160; So far I have mixed reviews about what I have found, but it is a good start.&#160; There is a basic level of functionality exposed through cmdlets and a bit more that takes some slightly advanced Powershelling to expose.&#160; As usual the more advanced features can be accessed by using the Get-CIView cmdlet or $object.ExtensionData and using methods directly exposed from these vCD objects.&#160;&#160; </p>
<p>Alan has a good post on some basic functions that can help to achieve some basic things all leveraging exposed methods under the covers.</p>
<p><a title="http://blogs.vmware.com/vipowershell/2012/03/automating-creation-of-vcd-organizations-users-and-org-vdcs.html" href="http://blogs.vmware.com/vipowershell/2012/03/automating-creation-of-vcd-organizations-users-and-org-vdcs.html">http://blogs.vmware.com/vipowershell/2012/03/automating-creation-of-vcd-organizations-users-and-org-vdcs.html</a></p>
<p>My intent for this post is to add a few more cmdlets to the public that may be useful for certain circumstances and might even be more useful with a bit of tweaking for yourself.&#160; My use case here was to be able to create an organization, an organizational vDC, create groups for the organization, and set LDAP appropriately to allow an LDAP security group access to that organization.</p>
<p>Requirements are as follows:</p>
<ul>
<li>PowerCLI 5.0.1 (with vCD cmdlets selected on install) </li>
<li>The unofficial vCD module I created <a href="http://velemental.com/wp-content/uploads/2012/03/vcd_custom_032812.zip">here</a>. </li>
<li>Run “Connect-CIServer” </li>
<li>Run “Import-Module vcd_custom.psm1” </li>
</ul>
<p>&#160;</p>
<p><strong>*As Is* New-Org</strong> The following screenshot is based on work from Alan Renouf from the link listed above where we simply create an Org.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image17.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb16.png" width="732" height="122" /></a></p>
<p>&#160;</p>
<p><strong>*New* Set-OrgLDAP</strong> The following cmdlet will set the SYSTEM LDAP setting for an Org.&#160; Before running this we are expecting that you have LDAP configured on the main portion of the vCD Administrator page (outside of an Org) and that you have used the test LDAP functionality in the setup area.&#160; The SYSTEM setting leverages the existing LDAP information from the main vCD instance for the child Org.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image18.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb17.png" width="780" height="214" /></a></p>
<p>&#160;</p>
<p><strong>*New* New-OrgGroup</strong> The next portion here will create a new organization group based on a certain LDAP security group name and an existing vCD role name.&#160; I haven’t had a whole lot of time to test this part, but I did find that in order to get the LDAP sync’d for the org created I had to restart vCD.&#160; Unfortunately I am using 1.5 and not 1.5.1 for specific reasons so am not sure if this is a bug or if I need to wait an indicator saying LDAP group adds are ready.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image19.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb18.png" width="774" height="271" /></a></p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image20.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb19.png" width="775" height="267" /></a></p>
<p>&#160;</p>
<p><strong>*Modified* New-OrgVdc2</strong> The following cmdlet is a spin off of another one that Alan created except I am using a different parameter, –FromOrgVdcName which will allow us to specify a model OrgVdc.&#160; This simplifies the parameters specified since we copy the important stuff from an existing OrgVdc.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image21.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb20.png" width="764" height="156" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>That’s it!&#160; Pretty quick and dirty examples of how to automate some more detailed setup tasks.&#160; I would assume we will see a lot of this stuff get rolled out in the near term in official cmdlets, so this should only be temporary.&#160; Stay tuned to the blog as I have a good amount of vCD automation work that might be popping up here shortly.</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/23/creating-orgs-ovdcs-and-setting-ldap-in-vcd-with-powercli/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multithreading PowerCLI</title>
		<link>http://velemental.com/2012/03/11/multithreading-powercli/</link>
		<comments>http://velemental.com/2012/03/11/multithreading-powercli/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 04:48:37 +0000</pubDate>
		<dc:creator>vele1655</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[multithreading powershell powercli workflow]]></category>

		<guid isPermaLink="false">http://velemental.com/2012/03/11/multithreading-powercli/</guid>
		<description><![CDATA[In this post I am going to demonstrate how you would go about multi-threading the execution of a PowerCLI commands.&#160; As usual I want to make sure that I properly set the stage and describe my use case because this might not be applicable in all situations.&#160; When running PowerCLI cmdlets, some include the ability [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I am going to demonstrate how you would go about multi-threading the execution of a PowerCLI commands.&#160; As usual I want to make sure that I properly set the stage and describe my use case because this might not be applicable in all situations.&#160; </p>
<p>When running PowerCLI cmdlets, some include the ability to asynchronously run which means that they get sent to the background and processed while allowing to run more commands.&#160; This parameter can be invoked by specifying “-runasync:$true”.&#160; This can be very handy if I have a single PowerCLI cmdlet that I want to execute many times with a predetermined set of data, for example to stop all VMs as quicky as possible&#160; “get-vm | Stop-VM -runasync:$true -confirm:$false”.&#160; But what about a situation where I might have a set of commands that need to be run asynchronously? </p>
<p>This is where leveraging the jobs portion of Powershell to launch multiple PowerCLI sessions helps.&#160; With this method we are reusing the existing PowerCLI session token and launching new instances of PowerCLI&#160; to accomplish many tasks in sequence that are all tied together possibly similar to a workflow.</p>
<p>So if you’re interested in seeing this in action, continue on.&#160; Firstly the below is a summary of some of the useful tidbits you will see in this example.</p>
<ul>
<li>Optimizing Powershell and PowerCLI for speed </li>
<li>Reusing VIServer credentials based on session token </li>
<li>Executing differently if PowerCLI is loaded and/or credentials specified </li>
<li>Multi-threaded PowerCLI </li>
</ul>
<p>&#160;</p>
<p>One of the goals of multi-threading is to be able to perform more actions than executing in a serial fashion.&#160; For this reason I assume that you are looking to minimize the average time per execution of PowerCLI.&#160; So to begin with I highly suggest reading a previous post of mine which walks you through how to optimize Powershell and PowerCLI execution times <a href="http://velemental.com/2012/01/01/optimizing-the-execution-of-powershell-and-powercli/">here</a>.&#160; This also has a huge effect on the CPU as if you do not optimize, when PowerCLI starts it will perform compilation operations that eat a whole core of your CPU for 10+ seconds.</p>
<p>Now with that behind us let’s get into the details of credentials.&#160; When logging into a VIServer in PowerCLI the session creates and stores a specific token secret token.&#160; See the screenshot below for retrieving this token.</p>
<p><a href="http://velemental.com/wp-content/uploads/2012/03/image15.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb14.png" width="571" height="212" /></a></p>
<p>We will be reusing this token by passing it to the script that is the target of our multi-threaded execution (in the job) which replaces the need to re-login to create multiple sessions under the same username or pass credentials to the job.</p>
<p>The next important demonstration is pretty common and others may have different approaches.&#160; It involves being able to load/not-load PowerCLI and Connect/Not-Connect based on whether it is needed or not.&#160; For example, if we launch the child job script then we will need to load the PowerCLI snappin on the fly.&#160; But if we want to keep the script the same even if PowerCLI is already loaded (for execution outside job)&#160; then we want to do a simple detection for the existence of the cmdlets.&#160; </p>
<p>The following is a re-useable section of code that you can use to simplify detection of PowerCLI and existence of a login.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b"><font style="font-size: 10pt">if</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">!</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$global:DefaultVIServer</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">) {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-tab-count: 1"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">if</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">!</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">get-pssnapin</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">where</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> {</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$_</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">.</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">name </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">-eq</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;vmware.vimautomation.core&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">})) {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">try</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> { </font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">add-pssnapin</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8a2be2">VMware.VimAutomation.Core</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-ea</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#800080">0</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#0000ff">out-null</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><font style="font-size: 10pt">} </font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">catch</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#8b0000">&quot;Could not load PowerCLI snapin&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">try</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> { </font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">connect-viserver</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcserver</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-username</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcusername</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-password</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcpassword</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-wa</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#800080">0</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">} </font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">catch</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#8b0000">&quot;Failed to connect to VI server&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal">&#160;</p>
<p>Ok so now let’s move on to the more exciting stuff around multi-threading.&#160; The first portion of what we do is set our current path variable.&#160; This is necessary because when loading a new Powershell instance the current path changes to your profile’s set path.&#160; What we want is to set the path based on where the script is being executed from.&#160; For this we issues to following command in the control script and then pass it to the job.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal">&#160;</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500"><font style="font-size: 10pt">$currentPath</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> (</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">Split-Path</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-parent</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$MyInvocation</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">.</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">MyCommand</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">.</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">Definition)</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal">&#160;</p>
<p>So you may be asking, why would we not just use the invoke-item cmdlet or have the job kick off the script without the new Powershell session?&#160; In testing I found that I was getting random errors from PowerCLI cmdlets and methods.&#160; I am not 100% sure why but I believe it has to do with the jobs executing with a console.&#160; Creating a new Powershell instance that PowerCLI can execute under solves this.&#160; Keep in mind the memory usage per thread which can be 60+MB.</p>
<p>Anyways, the next portion is the scriptblock that will be executed when we kick off the job.&#160; Notice the first line, “set-location $args[0]”.&#160; This takes the path that we got from above and has the child kob instance reset its current working directory.&#160; We are passing two parameters to the script, the first being the session to be reused, and the second being the&#160; destination vcserver.</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal">&#160;</p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500"><font style="font-size: 10pt">$job</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">set-location</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$args</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">[</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#800080">0</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">]</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">;</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">powershell</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-command</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#8b0000">&quot;.\powercli_example_cmd.ps1 -session $($args[1]) -vcserver $($args[2])&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"></font></span></p>
<p>The following line is how we kick off the job.&#160; Notice the “-argumentlist” where we specify the parameters to be passed into the $job scriptblock.</p>
<p> <span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font size="3" face="Calibri"><span style="mso-spacerun: yes"></span></font></font></span>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff"><font style="font-size: 10pt">start-job</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-argumentlist</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$currentPath</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">,</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$session</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">,</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcserver</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-scriptblock</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$job</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#0000ff">out-null</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font color="#0000ff" size="2" face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></font></p>
<p>Before kicking off the job we need to build our powercli_example_cmd script.&#160; This script will be responsible for loading the PowerCLI snapin and logging into the VC server with the existing session.&#160; Notice the line for connecting with the “-session” parameter.&#160; This script also includes our workflow, serial steps of commands, or in this case a single command that returns the first VM found to the job output.&#160; An important note here is that the output of the job sent from receive-job comes through in arrays of strings.&#160; So you can either send the output in something like JSON or simply grab what you want like the VM names (| %{ $_.name }) which is easily parseable.&#160; If using this simply to execute methods then this warning may not be valid.</p>
<p> <span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font size="2"><span style="mso-spacerun: yes"></span></font></font></span>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b"><font style="font-size: 10pt">param</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$session</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">=</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">$(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;missing -session parameter&quot;</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">)</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">,</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcserver</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">)</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt"></font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">&#160;</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b"><font style="font-size: 10pt">if</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">!</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$global:DefaultVIServer</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">) {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-tab-count: 1"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">if</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">!</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">(</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">get-pssnapin</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">where</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> {</span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$_</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">.</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;">name </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">-eq</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8b0000">&quot;vmware.vimautomation.core&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt">})) {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">try</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> { </font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">add-pssnapin</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#8a2be2">VMware.VimAutomation.Core</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-ea</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#800080">0</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#0000ff">out-null</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><font style="font-size: 10pt">} </font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">catch</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#8b0000">&quot;Could not load PowerCLI snapin&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">try</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">connect-viserver</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$vcserver</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-session</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#ff4500">$session</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-wa</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#800080">0</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#0000ff">out-null</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">} </font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">catch</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt"> {</font></span></font></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#00008b">throw</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#8b0000">&quot;Failed to connect to VI server&quot;</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><span style="mso-spacerun: yes"><font style="font-size: 10pt">&#160;&#160;&#160; </font></span><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">}</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">&#160;</font></font></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><font face="Lucida Console"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff"><font style="font-size: 10pt">get-vm</font></font></span><font style="font-size: 10pt"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#a9a9a9">|</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#0000ff">select</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font color="#000080">-first</font></span><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"> </span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font style="font-size: 10pt" color="#800080">1</font></span></font><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"></span></p>
<p style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;"><font face="Lucida Console"><font style="font-size: 10pt">&#160;</font></font></span></p>
<p style="line-height: 13pt; margin: 0in 0in 10pt" class="MsoNormal">Ok, so let’s move into actually running the jobs.&#160; In order to execute the job we are leveraging a foreach loop as “1..2 | %{ .\powrcli_mt_control.ps1 –vcserver ip”.&#160; This means run this command twice.&#160; We can then leverage the get-job cmdlet to see the status of the job, as you can see below it is running and then turns to completed.&#160; Once it is completed we can run “get-job | receive-job” to see the output.&#160; Review the help for these cmdlets as there are some gotchas.&#160; For example if you run the get-job | receive-job it will trip the “HasMoreData” to $false until more data comes in.&#160; Long story, just play with it a bit to get comfortable.&#160; When done with the jobs issues a “get-job | remove-job” to remove the existing jobs.</p>
<p style="line-height: 13pt; margin: 0in 0in 10pt" class="MsoNormal"><a href="http://velemental.com/wp-content/uploads/2012/03/image16.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://velemental.com/wp-content/uploads/2012/03/image_thumb15.png" width="759" height="395" /></a></p>
<p style="line-height: 13pt; margin: 0in 0in 10pt" class="MsoNormal">&#160;</p>
<p style="line-height: 13pt; margin: 0in 0in 10pt" class="MsoNormal">I’m afraid that’s all for now!&#160; I am using this very successfully in order to multi-thread some pretty massive workflows all built within Powershell leveraging PowerCLI.&#160; <a href="http://velemental.com/wp-content/uploads/2012/03/powercli_mt_031012.zip">Here are the example scripts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://velemental.com/2012/03/11/multithreading-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

