<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ICT-Freak.nl</title>
	<atom:link href="http://ict-freak.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://ict-freak.nl</link>
	<description>VMware, Windows, Citrix, Linux, Scripting...</description>
	<lastBuildDate>Mon, 23 Aug 2010 20:06:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ict-freak.nl' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9f0af381794bfe42194f4bc92c8e84b9?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>ICT-Freak.nl</title>
		<link>http://ict-freak.nl</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ict-freak.nl/osd.xml" title="ICT-Freak.nl" />
	<atom:link rel='hub' href='http://ict-freak.nl/?pushpress=hub'/>
		<item>
		<title>vCenter: A general system error occurred: Invalid fault</title>
		<link>http://ict-freak.nl/2010/08/23/vcenter-a-general-system-error-occurred-invalid-fault/</link>
		<comments>http://ict-freak.nl/2010/08/23/vcenter-a-general-system-error-occurred-invalid-fault/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 20:06:12 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[Maintenance Mode]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/08/23/vcenter-a-general-system-error-occurred-invalid-fault/</guid>
		<description><![CDATA[I tried to enable maintenance mode on an ESX host and got the following error: Just like my earlier post today, the solution was to restart the management service. Login to the ESX Service Console and run the following command: service mgmt-vmware restart after the restart of the service I was able to enable maintenance [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4806&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://go2.wordpress.com/?id=725X1342&amp;site=ictfreak.wordpress.com&amp;url=http%3A%2F%2Fictfreak.files.wordpress.com%2F2010%2F07%2Fimage_thumb1_thumb1_thumb1.png&amp;sref=http%3A%2F%2Fict-freak.nl%2F&w=630" /> </p>
<p>I tried to enable maintenance mode on an ESX host and got the following error:</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/08/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/08/image_thumb1.png?w=644&#038;h=101" width="644" height="101" /></a> </p>
</p>
<p>Just like my earlier post today, the solution was to restart the management service. Login to the ESX Service Console and run the following command:</p>
<blockquote><p>service mgmt-vmware restart</p>
</blockquote>
<p>after the restart of the service I was able to enable maintenance mode on the specific host.</p>
<p>Source: <a title="http://communities.vmware.com/message/1188234" href="http://communities.vmware.com/message/1188234">http://communities.vmware.com/message/1188234</a></p>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/maintenance-mode/'>Maintenance Mode</a>, <a href='http://ict-freak.nl/tag/vcenter/'>vCenter</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4806/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4806&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/08/23/vcenter-a-general-system-error-occurred-invalid-fault/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://go2.wordpress.com/?id=725X1342&#38;site=ictfreak.wordpress.com&#38;url=http://ictfreak.files.wordpress.com/2010/07/image_thumb1_thumb1_thumb1.png&#38;sref=http://ict-freak.nl/" medium="image" />

		<media:content url="http://ictfreak.files.wordpress.com/2010/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>vSphere: vCenter shows VMName (Invalid)</title>
		<link>http://ict-freak.nl/2010/08/23/vsphere-vcenter-shows-vmname-invalid/</link>
		<comments>http://ict-freak.nl/2010/08/23/vsphere-vcenter-shows-vmname-invalid/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 20:05:08 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/08/23/vsphere-vcenter-shows-vmname-invalid/</guid>
		<description><![CDATA[After some issues with a NFS share I noticed that a couple of VM’s changed to Invalid. The VM was still fully operational but vCenter didn’t recognized the VM’s anymore. I found the following knowledge base article: http://kb.vmware.com/kb/1015778 which describes the following symptoms: •Virtual machines display as invalid in vCenter Server •The command service mgmt-vmware [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4803&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://go2.wordpress.com/?id=725X1342&amp;site=ictfreak.wordpress.com&amp;url=http%3A%2F%2Fictfreak.files.wordpress.com%2F2010%2F07%2Fimage_thumb1_thumb1_thumb1.png&amp;sref=http%3A%2F%2Fict-freak.nl%2F&w=630" /> </p>
<p>After some issues with a NFS share I noticed that a couple of VM’s changed to Invalid. The VM was still fully operational but vCenter didn’t recognized the VM’s anymore. </p>
<p><a href="http://ictfreak.files.wordpress.com/2010/08/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/08/image_thumb.png?w=214&#038;h=244" width="214" height="244" /></a> </p>
<p>I found the following knowledge base article: <a title="http://kb.vmware.com/kb/1015778" href="http://kb.vmware.com/kb/1015778">http://kb.vmware.com/kb/1015778</a> which describes the following symptoms:</p>
<blockquote><p>•Virtual machines display as invalid in vCenter Server      <br />•The command service mgmt-vmware restart fails to stop the management agent       <br />•The command vmware-cmd -l returns the error: </p>
<p>PANIC: SyncWaitQ: The system limit on the total number of open files has been reached</p>
<p>•The command ps -auxwww shows a large amount of SSHD processes running</p>
</blockquote>
<p>In my case the solution was to restart the management agent on the host where the VM’s where running on. </p>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/vcenter/'>vCenter</a>, <a href='http://ict-freak.nl/tag/vm/'>vm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4803/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4803&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/08/23/vsphere-vcenter-shows-vmname-invalid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://go2.wordpress.com/?id=725X1342&#38;site=ictfreak.wordpress.com&#38;url=http://ictfreak.files.wordpress.com/2010/07/image_thumb1_thumb1_thumb1.png&#38;sref=http://ict-freak.nl/" medium="image" />

		<media:content url="http://ictfreak.files.wordpress.com/2010/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Just Married 23 July 2010</title>
		<link>http://ict-freak.nl/2010/07/25/just-married-23-july-2010/</link>
		<comments>http://ict-freak.nl/2010/07/25/just-married-23-july-2010/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 10:39:37 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[Diversen]]></category>

		<guid isPermaLink="false">http://ict-freak.nl/?p=4793</guid>
		<description><![CDATA[Filed under: Diversen<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4793&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ictfreak.files.wordpress.com/2010/07/p1090492.jpg"><img class="alignnone size-full wp-image-4798" title="Wedding Arne &amp; Laura" src="http://ictfreak.files.wordpress.com/2010/07/p1090492.jpg?w=630&#038;h=472" alt="" width="630" height="472" /></a></p>
<br />Filed under: <a href='http://ict-freak.nl/category/website/diversen/'>Diversen</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4793/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4793/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4793/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4793&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/07/25/just-married-23-july-2010/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/07/p1090492.jpg" medium="image">
			<media:title type="html">Wedding Arne &#38; Laura</media:title>
		</media:content>
	</item>
		<item>
		<title>vSphere 4.1 Download Links Are Ready</title>
		<link>http://ict-freak.nl/2010/07/13/vsphere-4-1-download-links-are-ready/</link>
		<comments>http://ict-freak.nl/2010/07/13/vsphere-4-1-download-links-are-ready/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 01:28:26 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[Release]]></category>
		<category><![CDATA[vSphere 4.1]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/07/13/vsphere-4-1-donwload-links-are-ready/</guid>
		<description><![CDATA[Breaking news: The download links for vSphere 4.1 are ready: vCenter: http://bit.ly/9M6Rcz ESX: http://bit.ly/9ypsFj ESXi: http://bit.ly/arqXlY thanks to @vConsult! &#160; To be continued. Need some sleep zzzZZZZ (3:27) Filed under: VMware Tagged: Release, vSphere 4.1<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4790&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ictfreak.files.wordpress.com/2010/07/image_thumb1_thumb1_thumb1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image_thumb1_thumb1_thumb[1]" border="0" alt="image_thumb1_thumb1_thumb[1]" src="http://ictfreak.files.wordpress.com/2010/07/image_thumb1_thumb1_thumb1_thumb.png?w=204&#038;h=38" width="204" height="38" /></a> </p>
<p>Breaking news: The download links for vSphere 4.1 are ready: </p>
<ul>
<li>vCenter: <a href="http://bit.ly/9M6Rcz">http://bit.ly/9M6Rcz</a> </li>
<li>ESX: <a href="http://bit.ly/9ypsFj">http://bit.ly/9ypsFj</a> </li>
<li>ESXi: <a href="http://bit.ly/arqXlY">http://bit.ly/arqXlY</a> </li>
</ul>
<p>thanks to @vConsult!</p>
<p>&#160;</p>
<p>To be continued. Need some sleep zzzZZZZ (3:27)</p>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/release/'>Release</a>, <a href='http://ict-freak.nl/tag/vsphere-4-1/'>vSphere 4.1</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4790/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4790&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/07/13/vsphere-4-1-download-links-are-ready/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/07/image_thumb1_thumb1_thumb1_thumb.png" medium="image">
			<media:title type="html">image_thumb1_thumb1_thumb[1]</media:title>
		</media:content>
	</item>
		<item>
		<title>vSphere: Set NFS Advanced Configuration Settings via esxcfg-advcfg</title>
		<link>http://ict-freak.nl/2010/06/22/vsphere-set-nfs-advanced-configuration-settings-via-esxcfg-advcfg/</link>
		<comments>http://ict-freak.nl/2010/06/22/vsphere-set-nfs-advanced-configuration-settings-via-esxcfg-advcfg/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:29:49 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[vSphere]]></category>
		<category><![CDATA[esxcfg-advcfg]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/06/22/vsphere-set-nfs-advanced-configuration-settings-via-esxcfg-advcfg/</guid>
		<description><![CDATA[Yesterday I created a post about changing the advanced configuration settings for NFS via PowerCLI. Today I will show you how you can change the advanced configuration settings with the use of esxcfg-advcfg. This is quite useful for kickstart installations. This is a snippet from my ks.cfg file: # Set NFS advanced Configuration Settings /usr/sbin/esxcfg-advcfg [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4786&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb1_thumb.png?w=204&amp;h=38" /> </p>
<p>Yesterday I created a <a href="http://ict-freak.nl/2010/06/21/powercli-changing-advanced-configuration-settings-for-nfs/">post</a> about changing the advanced configuration settings for NFS via PowerCLI. Today I will show you how you can change the advanced configuration settings with the use of esxcfg-advcfg. This is quite useful for kickstart installations.</p>
<p>This is a snippet from my ks.cfg file:</p>
<blockquote><p># Set NFS advanced Configuration Settings     <br />/usr/sbin/esxcfg-advcfg -s 30 /Net/TcpipHeapSize      <br />/usr/sbin/esxcfg-advcfg -s 120 /Net/TcpipHeapMax      <br />/usr/sbin/esxcfg-advcfg -s 10 /NFS/HeartbeatMaxFailures      <br />/usr/sbin/esxcfg-advcfg -s 12 /NFS/HeartbeatFrequency      <br />/usr/sbin/esxcfg-advcfg -s 5 /NFS/HeartbeatTimeout      <br />/usr/sbin/esxcfg-advcfg -s 32 /NFS/MaxVolumes</p>
</blockquote>
<p>So how do you know what values you need to enter when you want to use this command. Bouke has a html version of the esxcfg manuals on his blog: <a title="http://www.jume.nl/esx4man/man8/esxcfg-advcfg.8.html" href="http://www.jume.nl/esx4man/man8/esxcfg-advcfg.8.html">http://www.jume.nl/esx4man/man8/esxcfg-advcfg.8.html</a>. But this page doesn’t show the information I needed. Open the Advanced Settings screen in the vSphere client.</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image4.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb4.png?w=644&#038;h=261" width="644" height="261" /></a> </p>
<p>Open the NFS settings. Let’s use the NFS.MaxVolumes in this example. NFS is the ‘root’ folder the setting in this case MaxVolumes is the child folder. So if you want to change this setting via /usr/sbin/esxcfg-advcfg we need to use the /NFS/MaxVolumes. If you want to know what the current value is, just run the following command from the service console:</p>
<blockquote><p>/usr/sbin/esxcfg-advcfg –g /NFS/MaxVolumes</p>
</blockquote>
<p>This will be the output:</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image5.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb5.png?w=559&#038;h=108" width="559" height="108" /></a> </p>
<p>When you change the value to 32 via this command:</p>
<blockquote><p>/usr/sbin/esxcfg-advcfg -s 32 /NFS/MaxVolumes</p>
</blockquote>
<p>This will be the output:</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image6.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb6.png?w=559&#038;h=108" width="559" height="108" /></a></p>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/esxcfg-advcfg/'>esxcfg-advcfg</a>, <a href='http://ict-freak.nl/tag/nfs/'>NFS</a>, <a href='http://ict-freak.nl/tag/vsphere/'>vSphere</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4786/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4786/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4786/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4786&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/06/22/vsphere-set-nfs-advanced-configuration-settings-via-esxcfg-advcfg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb1_thumb.png?w=204&#38;h=38" medium="image" />

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerCLI: Changing Advanced Configuration Settings for NFS</title>
		<link>http://ict-freak.nl/2010/06/21/powercli-changing-advanced-configuration-settings-for-nfs/</link>
		<comments>http://ict-freak.nl/2010/06/21/powercli-changing-advanced-configuration-settings-for-nfs/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 20:14:03 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vEcoShell]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/?p=4774</guid>
		<description><![CDATA[&#160;&#160; &#160; After reading Jase’s post http://www.jasemccarty.com/blog/?p=532 about setting the advanced configuration settings. I wanted to create a script and add it to the Community Powerpack (more info about the Powerpack here: http://www.virtu-al.net/2010/06/04/goodbye-virtu-al-hello-community/) So I created two PowerCLI scripts to achieve this. You can see a short demo here: &#160; This script will be added [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4774&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;<a href="http://ictfreak.files.wordpress.com/2010/06/go2-wordpress1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="go2.wordpress[1]" border="0" alt="go2.wordpress[1]" src="http://ictfreak.files.wordpress.com/2010/06/go2-wordpress1_thumb.png?w=89&#038;h=75" width="89" height="75" /></a>&#160; <a href="http://ictfreak.files.wordpress.com/2010/06/image_thumb11.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image_thumb[1]" border="0" alt="image_thumb[1]" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb.png?w=240&#038;h=54" width="240" height="54" /></a>&#160; </p>
<p>After reading Jase’s post <a href="http://www.jasemccarty.com/blog/?p=532">http://www.jasemccarty.com/blog/?p=532</a> about setting the advanced configuration settings. I wanted to create a script and add it to the Community Powerpack (more info about the Powerpack here: <a href="http://www.virtu-al.net/2010/06/04/goodbye-virtu-al-hello-community/">http://www.virtu-al.net/2010/06/04/goodbye-virtu-al-hello-community/</a>)</p>
<p>So I created two PowerCLI scripts to achieve this. You can see a short demo here:</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:e0c10ee1-7fb3-454c-89f4-fd2d25100052" class="wlWriterSmartContent">
<div><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/WwMv84tL9Is&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/WwMv84tL9Is&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span></div>
</p></div>
<p>&#160;</p>
<p>This script will be added to the new version of the Powerpack.If you don’t want to wait until&#160; the new version of the Community Powerpack comes online, you can use the following script to set the advanced settings on all of your ESX hosts:</p>
<pre><span style="color:#0000ff;">param</span><span style="color:#000000;">(
    [parameter(Mandatory </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">)]
    [</span><span style="color:#008080;">string</span><span style="color:#000000;">[]]</span><span style="color:#800080;">$vCenter</span><span style="color:#000000;">
)

</span><span style="color:#5f9ea0;font-weight:bold;">Connect-VIServer</span><span style="color:#000000;"> </span><span style="color:#800080;">$vCenter</span><span style="color:#000000;">

</span><span style="color:#800080;">$esxHosts</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHost</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Sort</span><span style="color:#000000;"> </span><span style="color:#800000;">Name</span><span style="color:#000000;">
</span><span style="color:#0000ff;">foreach</span><span style="color:#000000;">(</span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="color:#0000ff;">in</span><span style="color:#000000;"> </span><span style="color:#800080;">$esxHosts</span><span style="color:#000000;">){
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Updating TCP and NFS Advanced Configuration Settings on $esx</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">

    </span><span style="color:#008000;">#</span><span style="color:#008000;"> Update TCP Settings</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">Net.TcpipHeapSize</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">30</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">Net.TcpipHeapSize</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">30</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">Net.TcpipHeapMax</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">120</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">Net.TcpipHeapMax</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">120</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }

    </span><span style="color:#008000;">#</span><span style="color:#008000;"> Update NFS Settings</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatMaxFailures</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">10</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatMaxFailures</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">10</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatFrequency</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">12</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatFrequency</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">12</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatTimeout</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">5</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.HeartbeatTimeout</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">5</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.MaxVolumes</span><span style="color:#000000;">).Values </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">64</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Set-VMHostAdvancedConfiguration</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VMHost</span><span style="color:#000000;"> </span><span style="color:#800080;">$esx</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Name</span><span style="color:#000000;"> </span><span style="color:#800000;">NFS.MaxVolumes</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Value</span><span style="color:#000000;"> </span><span style="color:#000000;">64</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    }
}</span></pre>
<p>&#160;</p>
<p>You can start the script with the parameter –vCenter in my case this is vc01:</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb2.png?w=644&#038;h=80" width="644" height="80" /></a></p>
<p>The script will generate the following output. </p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb3.png?w=644&#038;h=206" width="644" height="206" /></a></p>
<p>Note on the first ESX host I already changed the NFS.HeartbeatFrequency during the test of the cmdlets.</p>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/automation/'>Automation</a>, <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/nfs/'>NFS</a>, <a href='http://ict-freak.nl/tag/powercli/'>PowerCLI</a>, <a href='http://ict-freak.nl/tag/vecoshell/'>vEcoShell</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4774/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4774&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/06/21/powercli-changing-advanced-configuration-settings-for-nfs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/go2-wordpress1_thumb.png" medium="image">
			<media:title type="html">go2.wordpress[1]</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb.png" medium="image">
			<media:title type="html">image_thumb[1]</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>vSphere: The Virtual Machine is installing VMware Tools and Cannot Initiate a Migration Operation</title>
		<link>http://ict-freak.nl/2010/06/07/vsphere-the-virtual-machine-is-installing-vmware-tools-and-cannot-initiate-a-migration-operation/</link>
		<comments>http://ict-freak.nl/2010/06/07/vsphere-the-virtual-machine-is-installing-vmware-tools-and-cannot-initiate-a-migration-operation/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 06:26:13 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMware Tools]]></category>
		<category><![CDATA[vmware-cmd]]></category>
		<category><![CDATA[vmware-vim-cmd]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/?p=4763</guid>
		<description><![CDATA[After upgrading a large group Virtual Machines&#160; to the latest build of VMware Tools. I got an error when I started a vMotion task on a some VMs. The warning is pretty clear but I couldn’t cancel the VMware Tools wizard from the vSphere client. After a short search on Google I found a post [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4763&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb1.png"><img style="display:inline;border-width:0;" title="image_thumb1_thumb[1]" border="0" alt="image_thumb1_thumb[1]" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb1_thumb.png?w=204&#038;h=38" width="204" height="38" /></a></p>
<p>After upgrading a large group Virtual Machines&#160; to the latest build of VMware Tools. I got an error when I started a vMotion task on a some VMs. </p>
<p><a href="http://ictfreak.files.wordpress.com/2010/06/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb1.png?w=538&#038;h=324" width="538" height="324" /></a></p>
<p>The warning is pretty clear but I couldn’t cancel the VMware Tools wizard from the vSphere client. After a short search on Google I found a post from <a href="http://lonesysadmin.net/author/lonesysadmin/">Bob Plankers</a></p>
<p>The solution is quite simple. Logon to the ESX host where the VM is running on and run the following command:</p>
<blockquote><p><font size="2">/ust/bin/vmware-cmd -l</font></p>
</blockquote>
<p>Now you get a list of all the registered VMs on that host. Copy the full path of the vmx from the VM you want to migrate with vMotion. Now run the vmware-cmd pathtovmx getid command:</p>
<blockquote><p>/usr/bin/vmware-cmd /vmfs/volumes/datastore-name/vm-folder/vmx-file.vmx getid</p>
</blockquote>
<p>The latest step is to run the following command. Just replace the idnumber with number you get with the previous command:</p>
<blockquote><p>/usr/bin/vmware-vim-cmd vmsvc/tools.cancelinstall idnumber</p>
</blockquote>
<p>Now you are able to migrate the VM with vMotion again.</p>
<table border="0" cellspacing="0" cellpadding="2" width="688">
<tbody>
<tr>
<td valign="top" width="41">Source</td>
<td valign="top" width="645"><a href="http://lonesysadmin.net/2009/12/11/how-to-cancel-a-stuck-vmware-tools-install-from-the-esx-cli/">http://lonesysadmin.net/2009/12/11/how-to-cancel-a-stuck-vmware-tools-install-from-the-esx-cli/</a></td>
</tr>
</tbody>
</table>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/'>Virtualization</a> Tagged: <a href='http://ict-freak.nl/tag/vmware-tools/'>VMware Tools</a>, <a href='http://ict-freak.nl/tag/vmware-cmd/'>vmware-cmd</a>, <a href='http://ict-freak.nl/tag/vmware-vim-cmd/'>vmware-vim-cmd</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4763/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4763&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/06/07/vsphere-the-virtual-machine-is-installing-vmware-tools-and-cannot-initiate-a-migration-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb1_thumb1_thumb.png" medium="image">
			<media:title type="html">image_thumb1_thumb[1]</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Release: vEcoShell 1.2.6</title>
		<link>http://ict-freak.nl/2010/06/04/release-vecoshell-1-2-6/</link>
		<comments>http://ict-freak.nl/2010/06/04/release-vecoshell-1-2-6/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 08:25:16 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[Release]]></category>
		<category><![CDATA[vEcoShell]]></category>
		<category><![CDATA[VESI]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/06/04/release-vecoshell-1-2-6/</guid>
		<description><![CDATA[vEcoShell 1.2.6 is GA!! Quote from vEcoShell blog: The major difference in 1.2.6 is in how connections to multiple vCenter or ESX Servers are managed.&#160; In previous versions, vEcoShell maintained all session management and required custom code in nearly all of it&#8217;s scripts to function properly.&#160; These scripts could not run externally to vEcoShell, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4758&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ictfreak.files.wordpress.com/2010/06/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/06/image_thumb.png?w=240&#038;h=54" width="240" height="54" /></a> </p>
<p>vEcoShell 1.2.6 is GA!!</p>
<p>Quote from vEcoShell blog:</p>
<blockquote><p>The major difference in 1.2.6 is in how connections to multiple vCenter or ESX Servers are managed.&#160; In previous versions, vEcoShell maintained all session management and required custom code in nearly all of it&#8217;s scripts to function properly.&#160; These scripts could not run externally to vEcoShell, so the PowerShell Code tab provided limited value.&#160; With the 1.2.6 release, vEcoShell now lets PowerCLI manage all connections.&#160; This means we were able to remove all custom code from our script library.&#160; Nearly every script that is in vEcoShell today can be run externally.&#160; Simply copy a code block from the &quot;PowerShell Code&quot; tab after a script has completed and paste it into the script editor.&#160; After running the Connect-VIServer command in the console window, the copied funciton will run just as it does in the admin console.</p>
</blockquote>
<p>What’s new:</p>
<ul>
<li>it’s the first stable release</li>
<li>compatible with PowerCLI 4.0 U1</li>
<li>easy Copy and Paste PowerCLI code</li>
<li>It will remain Freeware <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>You can download the vEcoShell 1.2.6 and language packs here: <a title="http://vcommunity.vizioncore.com/administration/vecoshell/p/downloads.aspx" href="http://vcommunity.vizioncore.com/administration/vecoshell/p/downloads.aspx">http://vcommunity.vizioncore.com/administration/vecoshell/p/downloads.aspx</a>&#160;</p>
<p>If you’re new to the vEcoShell, checkout the QuickTip videos from Scott Herold here: <a title="http://vcommunity.vizioncore.com/administration/vecoshell/b/weblog/archive/2010/06/03/new-videos-online.aspx" href="http://vcommunity.vizioncore.com/administration/vecoshell/b/weblog/archive/2010/06/03/new-videos-online.aspx" target="_blank">http://vcommunity.vizioncore.com</a></p>
<br />Filed under: <a href='http://ict-freak.nl/category/release/'>Release</a> Tagged: <a href='http://ict-freak.nl/tag/vecoshell/'>vEcoShell</a>, <a href='http://ict-freak.nl/tag/vesi/'>VESI</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4758/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4758&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/06/04/release-vecoshell-1-2-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/06/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>CentOS: How To Create a Local VMware Repository</title>
		<link>http://ict-freak.nl/2010/05/18/centos-how-to-create-a-local-vmware-repository/</link>
		<comments>http://ict-freak.nl/2010/05/18/centos-how-to-create-a-local-vmware-repository/#comments</comments>
		<pubDate>Tue, 18 May 2010 21:36:53 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Repository]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/?p=4747</guid>
		<description><![CDATA[The first step is to configure the repository server. Before you can start, you have to install the createrepo package. Just run the following command: yum install createrepo If you didn’t already, also install Apache on the Server that’s hosting the repository. Let’s create a folder structure so we can place the rpm’s on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4747&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ictfreak.files.wordpress.com/2010/05/image_thumb11.png"><img style="display:inline;border-width:0;" title="image_thumb1[1]" border="0" alt="image_thumb1[1]" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb11_thumb.png?w=240&#038;h=50" width="240" height="50" /></a> <a href="http://ictfreak.files.wordpress.com/2010/05/image_thumb12.png"><img style="display:inline;border-width:0;" title="image_thumb[1]" border="0" alt="image_thumb[1]" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb1_thumb.png?w=204&#038;h=38" width="204" height="38" /></a> </p>
<p>The first step is to configure the repository server. Before you can start, you have to install the createrepo package. Just run the following command:</p>
<blockquote><p>yum install createrepo</p>
</blockquote>
<p>If you didn’t already, also install Apache on the Server that’s hosting the repository.</p>
<p>Let’s create a folder structure so we can place the rpm’s on the server. In case you want create a repository for 32 bit and 64 bit CentOS. You have to create a i386 and a x86_64 directory.</p>
<p>i368:</p>
<blockquote><p>/var/www/html/repo/centos/5/i386/vmware</p>
</blockquote>
<p>Upload your rpm files to the vmware directory and run the createrepo command:</p>
<blockquote><p>createrepo /var/www/html/repo/centos/5/i386/vmware/</p>
</blockquote>
<p>x86_x64</p>
<blockquote><p>/var/www/html/repo/repo/centos/5/x86_64/vmware</p>
</blockquote>
<p>Upload your rpm files to the vmware directory and run the createrepo command:</p>
<blockquote><p>createrepo /var/www/html/repo/centos/5/x86_64/vmware/</p>
</blockquote>
<p>The next step is to test the repository. Just open your favorite web browser and browse to the url. In my case this is: <a href="http://distribution.ict-freak.local/repo/centos/5/i386/vmware">http://distribution.ict-freak.local/repo/centos/5/i386/vmware</a>. </p>
<p><a href="http://ictfreak.files.wordpress.com/2010/05/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb3.png?w=548&#038;h=262" width="548" height="262" /></a></p>
<p>If this works, your local vmware repository is ready for action. But first we need to add the repository on the client side.</p>
<p>Open the following file in your favorite text editor</p>
<blockquote><p>/etc/yum.repos.d/vmware_local.repo</p>
</blockquote>
<p>Add the following lines and edit the baseurl so it will match your environment.</p>
<blockquote><p>[vmware_local]      <br />name=Uniserver CentOS-$releasever-$basearch       <br />baseurl=<a href="http://distribution.ict-freak.local/repo/centos/">http://distribution.ict-freak.local/repo/centos/</a>$releasever/$basearch/vmware/       <br />gpgcheck=0       <br />enabled=1</p>
</blockquote>
<p>Save the vmware_local.repo file and run the yum update command.</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/05/image4.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb4.png?w=644&#038;h=215" width="644" height="215" /></a></p>
<p>Now you’re ready to install packages from the vmware_local repository. Let’s install VMware server 2.0.2-203138 by running the following command:</p>
<blockquote><p>yum install VMware-server</p>
</blockquote>
<p>The install process will start:</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/05/image5.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb5.png?w=644&#038;h=478" width="644" height="478" /></a></p>
<p>When you also upload the VMware Tools rpm file, you can install or update the package with the following commands:</p>
<p>Install:</p>
<blockquote><p><font face="con">yum install VMwareTools</font></p>
</blockquote>
</p>
<p>Update:</p>
<blockquote><p><font face="consola">yum update VMwareTools</font></p>
</blockquote>
<p>When you need to upgrade de VMware Tools, the only thing you have to do is upload the new rpm file and run the yum update command. The finals step is to run the vmware-config-tools.pl script. But this step can be replaced by the check-vmware-tools script. More info about this script can be found here: <a title="http://bit.ly/97fpcD" href="http://bit.ly/97fpcD">http://bit.ly/97fpcD</a></p>
<br />Filed under: <a href='http://ict-freak.nl/category/linux/centos-linux/'>CentOS</a>, <a href='http://ict-freak.nl/category/linux/'>Linux</a>, <a href='http://ict-freak.nl/category/virtualization/'>Virtualization</a>, <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/howto/'>howto</a>, <a href='http://ict-freak.nl/tag/repository/'>Repository</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4747/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4747/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4747/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4747&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/05/18/centos-how-to-create-a-local-vmware-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb11_thumb.png" medium="image">
			<media:title type="html">image_thumb1[1]</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb1_thumb.png" medium="image">
			<media:title type="html">image_thumb[1]</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerCLI: Script to Schedule Memory and or vCPU up/downgrade</title>
		<link>http://ict-freak.nl/2010/05/07/powercli-script-to-schedule-memory-and-or-vcpu-updowngrade/</link>
		<comments>http://ict-freak.nl/2010/05/07/powercli-script-to-schedule-memory-and-or-vcpu-updowngrade/#comments</comments>
		<pubDate>Fri, 07 May 2010 14:02:43 +0000</pubDate>
		<dc:creator>afokkema</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">https://ictfreak.wordpress.com/2010/05/07/powercli-script-to-schedule-memory-and-or-vcpu-updowngrade/</guid>
		<description><![CDATA[After creating the Restart-VMs.ps1 script, I also created a script to schedule vHardware changes. With this script, you’re able to upgrade or downgrade the amount of memory and or the amount of vCPU’s of a VM. Just lik the restart script, you can schedule this script and change the recommended parameters. These are the parameters [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4735&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://go2.wordpress.com/?id=725X1342&amp;site=ictfreak.wordpress.com&amp;url=http%3A%2F%2Fictfreak.files.wordpress.com%2F2010%2F03%2Fimage8.png&amp;sref=http%3A%2F%2Fict-freak.nl%2F&amp;w=600&w=630" /> </p>
<p>After creating the Restart-VMs.ps1 script, I also created a script to schedule vHardware changes. With this script, you’re able to upgrade or downgrade the amount of memory and or the amount of vCPU’s of a VM. Just lik the restart script, you can schedule this script and change the recommended parameters.</p>
<p>These are the parameters you need to supply to the script. The first two parameters are mandatory. When you supply all the parameters, you are able to add/remove Memory and add/remove vCPU’s. </p>
<table border="0" cellspacing="0" cellpadding="2" width="578">
<tbody>
<tr>
<td valign="top" width="117">-vCenter</td>
<td valign="top" width="459">enter the vCenter server you want to connect to. It’s possible to connect to multiple vCenter servers.</td>
</tr>
<tr>
<td valign="top" width="117">-vmName</td>
<td valign="top" width="459">enter the name of the VM you want </td>
</tr>
<tr>
<td valign="top" width="117">-MemoryMB</td>
<td valign="top" width="459">enter the amount of memory you want to add or remove from the VM. Be sure you enter the amount in MB.</td>
</tr>
<tr>
<td valign="top" width="117">-MemoryOption</td>
<td valign="top" width="459">Supply the option <strong>add</strong> or <strong>remove</strong>. </td>
</tr>
<tr>
<td valign="top" width="117">-CPUCount</td>
<td valign="top" width="459">Enter the amount of vCPU’s you want to add or remove from the VM. </td>
</tr>
<tr>
<td valign="top" width="117">-CPUOption</td>
<td valign="top" width="459">Supply the option <strong>add</strong> or <strong>remove</strong>.</td>
</tr>
</tbody>
</table>
<p>This is how the script works. </p>
<blockquote><ol>
<li>Connect to vCenter</li>
<li>Shutdown the selected VM</li>
<li>Add/remove memory and or vCPU’s</li>
<li>Poweron the selected VM</li>
<li>Disconnect vCenter</li>
</ol>
</blockquote>
<p>Now it’s time for an example. I have a VM called NAGIOS and needed to remove 512MB RAM and needed to add an extra vCPU. So I started the script with the following parameters:</p>
<blockquote><p>.\Change-VM_Memory_CPU_Count.ps1 -vCenter vc01.ict-freak.local -vmName NAGIOS -MemoryMB 512 -MemoryOption Remove -CPUCount 1 -CPUOption Add</p>
</blockquote>
<p>The VM is powered off and the memory is downgraded to 1024MB RAM and the total number of vCPU’s upgraded to 2.</p>
<p><a href="http://ictfreak.files.wordpress.com/2010/05/image2.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://ictfreak.files.wordpress.com/2010/05/image_thumb2.png?w=644&#038;h=241" width="644" height="241" /></a> </p>
<p>You can download the script below.</p>
<p> <span id="more-4735"></span>
<p>The script:</p>
<pre><span style="color:#008000;">#</span><span style="color:#008000;">##################################################################</span><span style="color:#008000;">
#
#</span><span style="color:#008000;"> Change-VM_Memory_CPU_Count.ps1</span><span style="color:#008000;">
#
#</span><span style="color:#008000;"> -MemoryMB the amount of Memory you want </span><span style="color:#008000;">
#</span><span style="color:#008000;">  to add or remove from the VM in MB</span><span style="color:#008000;">
#</span><span style="color:#008000;"> -MemoryOption Add/Remove</span><span style="color:#008000;">
#</span><span style="color:#008000;"> -CPUCount the amount of vCPU's you want </span><span style="color:#008000;">
#</span><span style="color:#008000;">  to add or remove from the VM</span><span style="color:#008000;">
#</span><span style="color:#008000;"> -CPUOption Add/Remove</span><span style="color:#008000;">
#
#</span><span style="color:#008000;"> Example:</span><span style="color:#008000;">
#</span><span style="color:#008000;"> .\Change-VM_Memory_CPU_Count.ps1 -vCenter vc01 </span><span style="color:#008000;">
#</span><span style="color:#008000;"> -vmName NAGIOS -MemoryMB 512 -MemoryOption Add </span><span style="color:#008000;">
#</span><span style="color:#008000;"> -CPUCount 1 -CPUOption Remove## </span><font color="#008000">Version 1.0 May 2010 Arne Fokkema www.ict-freak.nl @afokkema</font>
<span style="color:#008000;">#</span><span style="color:#008000;">
#</span><span style="color:#008000;">###################################################################</span><span style="color:#008000;">
</span><span style="color:#000000;">
</span><span style="color:#0000ff;">param</span><span style="color:#000000;">(
    [parameter(Mandatory </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">)]
    [</span><span style="color:#008080;">string<font color="#000000">[<span style="color:#000000;">]</span></font></span><span style="color:#000000;">]</span><span style="color:#800080;">$vCenter</span><span style="color:#000000;">,
    [parameter(Mandatory </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">)]
    [</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$vmName</span><span style="color:#000000;">,
    [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;">,
    [</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$MemoryOption</span><span style="color:#000000;">,
    [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$CPUCount</span><span style="color:#000000;">,
    [</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$CPUOption</span><span style="color:#000000;">
)    

</span><span style="color:#0000ff;">function</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">PowerOff-VM</span><span style="color:#000000;">{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">([</span><span style="color:#008080;">string</span><span style="color:#000000;">] </span><span style="color:#800080;">$vm</span><span style="color:#000000;">)

    </span><span style="color:#5f9ea0;font-weight:bold;">Shutdown-VMGuest</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VM</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vm</span><span style="color:#000000;">) </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Out-Null</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Shutdown $vm</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">do</span><span style="color:#000000;"> {
        </span><span style="color:#800080;">$status</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vm</span><span style="color:#000000;">).PowerState
    }</span><span style="color:#0000ff;">until</span><span style="color:#000000;">(</span><span style="color:#800080;">$status</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PoweredOff</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)
    </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">OK</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
}

</span><span style="color:#0000ff;">function</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">PowerOn-VM</span><span style="color:#000000;">{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">( [</span><span style="color:#008080;">string</span><span style="color:#000000;">] </span><span style="color:#800080;">$vm</span><span style="color:#000000;">)

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$vm</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter a valild VM name</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">((</span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vm</span><span style="color:#000000;">).powerstate </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PoweredOn</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$vm is already powered on</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}

    </span><span style="color:#0000ff;">else</span><span style="color:#000000;">{
        </span><span style="color:#5f9ea0;font-weight:bold;">Start-VM</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-VM</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vm</span><span style="color:#000000;">) </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Out-Null</span><span style="color:#000000;">
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Starting $vm</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">do</span><span style="color:#000000;"> {
            </span><span style="color:#800080;">$status</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (</span><span style="color:#5f9ea0;font-weight:bold;">Get-vm</span><span style="color:#000000;"> </span><span style="color:#800080;">$vm</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Get-View</span><span style="color:#000000;">).Guest.ToolsRunningStatus
        }</span><span style="color:#0000ff;">until</span><span style="color:#000000;">(</span><span style="color:#800080;">$status</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">guestToolsRunning</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">OK</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
    }
}

</span><span style="color:#0000ff;">function</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">Change-VMMemory</span><span style="color:#000000;">{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">([</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$vmName</span><span style="color:#000000;">, [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;">, [</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$Option</span><span style="color:#000000;">)
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$vmName</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter a VM Name</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter an amount of Memory in MB</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter an option to add or remove memory</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }

    </span><span style="color:#800080;">$vm</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;">
    </span><span style="color:#800080;">$CurMemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (</span><span style="color:#800080;">$vm</span><span style="color:#000000;">).MemoryMB

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$vm</span><span style="color:#000000;">.Powerstate </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PoweredOn</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The VM must be Powered Off to continue</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Add</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#800080;">$NewMemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurMemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">elseif</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Remove</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ge</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurMemoryMB</span><span style="color:#000000;">){
            </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The amount of memory entered is greater or equal than
            the current amount of memory allocated to this VM</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
        }
        </span><span style="color:#800080;">$NewMemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurMemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;">
    }

    </span><span style="color:#800080;">$vm</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Set-VM</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-MemoryMB</span><span style="color:#000000;"> </span><span style="color:#800080;">$NewMemoryMB</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The new configured amount of memory is</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">(</span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$VM</span><span style="color:#000000;">).MemoryMB
}

</span><span style="color:#0000ff;">function</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">Change-VMCPUCount</span><span style="color:#000000;">{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">([</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$vmName</span><span style="color:#000000;">, [</span><span style="color:#008080;">int</span><span style="color:#000000;">]</span><span style="color:#800080;">$NumCPU</span><span style="color:#000000;">, [</span><span style="color:#008080;">string</span><span style="color:#000000;">]</span><span style="color:#800080;">$Option</span><span style="color:#000000;">)
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$vmName</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter a VM Name</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$NumCPU</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter the number of vCPU's you want to add</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter an option to add or remove vCPU</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }

    </span><span style="color:#800080;">$vm</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;">
    </span><span style="color:#800080;">$CurCPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> (</span><span style="color:#800080;">$vm</span><span style="color:#000000;">).NumCPU

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$vm</span><span style="color:#000000;">.Powerstate </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PoweredOn</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The VM must be Powered Off to continue</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
    }

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Add</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#800080;">$NewvCPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurCPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">$NumCPU</span><span style="color:#000000;">
    }
    </span><span style="color:#0000ff;">elseif</span><span style="color:#000000;">(</span><span style="color:#800080;">$Option</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Remove</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$NumCPU</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ge</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurCPUCount</span><span style="color:#000000;">){
            </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The number of vCPU's entered is higher or equal
            than the current number of vCPU's allocated to this VM</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            </span><span style="color:#0000ff;">return</span><span style="color:#000000;">
        }
        </span><span style="color:#800080;">$NewvCPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$CurCPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">$NumCPU</span><span style="color:#000000;">
    }

    </span><span style="color:#800080;">$vm</span><span style="color:#000000;"> | </span><span style="color:#5f9ea0;font-weight:bold;">Set-VM</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-NumCPU</span><span style="color:#000000;"> </span><span style="color:#800080;">$NewvCPUCount</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span><span style="color:#000000;">
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">The new configured number of vCPU's is</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">(</span><span style="color:#5f9ea0;font-weight:bold;">Get-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$VM</span><span style="color:#000000;">).NumCPU
}

</span><span style="color:#008000;">#</span><span style="color:#008000;">######################################################################################</span><span style="color:#008000;">
#</span><span style="color:#008000;"> Main script</span><span style="color:#008000;">
#</span><span style="color:#008000;">######################################################################################</span><span style="color:#008000;">
</span><span style="color:#000000;">
</span><span style="color:#800080;">$VIServer</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Connect-VIServer</span><span style="color:#000000;"> </span><span style="color:#800080;">$vCenter</span><span style="color:#000000;">
</span><span style="color:#0000ff;">If</span><span style="color:#000000;"> (</span><span style="color:#800080;">$VIServer</span><span style="color:#000000;">.IsConnected </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">){
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">error connecting to $vCenter</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-ForegroundColor</span><span style="color:#000000;"> </span><span style="color:#800000;">Red</span><span style="color:#000000;">
    exit
}

</span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-or</span><span style="color:#000000;"> </span><span style="color:#800080;">$CPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">0</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
    </span><span style="color:#800080;">$poweroff</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">PowerOff-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;">
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$poweroff</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Ok</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
    </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PowerOff OK</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">

        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">0</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
            </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$MemoryOption</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#000000;">) {</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter an option to add or remove memory</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
            </span><span style="color:#0000ff;">else</span><span style="color:#000000;">{
                </span><span style="color:#5f9ea0;">Change-VMMemory</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;"> </span><span style="color:#800080;">$MemoryMB</span><span style="color:#000000;"> </span><span style="color:#800080;">$MemoryOption</span><span style="color:#000000;">
            }
        }

        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$CPUCount</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-ne</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">0</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
            </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$CPUOption</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#000000;">) {</span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Please enter an option to add or remove cpu</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
            </span><span style="color:#0000ff;">else</span><span style="color:#000000;">{
                </span><span style="color:#5f9ea0;">Change-VMCPUCount</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;"> </span><span style="color:#800080;">$CPUCount</span><span style="color:#000000;"> </span><span style="color:#800080;">$CPUOption</span><span style="color:#000000;">
            }
        }

        </span><span style="color:#800080;">$poweron</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">PowerOn-VM</span><span style="color:#000000;"> </span><span style="color:#800080;">$vmName</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;">(</span><span style="color:#800080;">$poweron</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Ok</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">){
            </span><span style="color:#5f9ea0;font-weight:bold;">Write-Host</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PowerOn OK</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
    }
}

</span><span style="color:#5f9ea0;font-weight:bold;">Disconnect-VIServer</span><span style="color:#000000;"> </span><span style="font-style:italic;color:#5f9ea0;">-Confirm</span><span style="color:#000000;">:</span><span style="color:#800080;">$false</span></pre>
<br />Filed under: <a href='http://ict-freak.nl/category/virtualization/vmware/automation/'>Automation</a>, <a href='http://ict-freak.nl/category/virtualization/vmware/'>VMware</a> Tagged: <a href='http://ict-freak.nl/tag/powercli/'>PowerCLI</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ictfreak.wordpress.com/4735/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ictfreak.wordpress.com/4735/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ictfreak.wordpress.com/4735/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ict-freak.nl&blog=427991&post=4735&subd=ictfreak&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ict-freak.nl/2010/05/07/powercli-script-to-schedule-memory-and-or-vcpu-updowngrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/68a6ca0e4e1bf2d16d6db8cae5db2c7c?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">afokkema</media:title>
		</media:content>

		<media:content url="http://go2.wordpress.com/?id=725X1342&#38;site=ictfreak.wordpress.com&#38;url=http://ictfreak.files.wordpress.com/2010/03/image8.png&#38;sref=http://ict-freak.nl/&#38;w=600" medium="image" />

		<media:content url="http://ictfreak.files.wordpress.com/2010/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>