<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:media="http://search.yahoo.com/mrss/" version="2.0">

<channel>
	<title>A. Mikkelsen</title>
	
	<link>http://www.amikkelsen.com</link>
	<description>VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!</description>
	<lastBuildDate>Thu, 14 Jun 2012 09:49:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AMikkelsen" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="amikkelsen" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>View client “To Go”</title>
		<link>http://www.amikkelsen.com/?p=676</link>
		<comments>http://www.amikkelsen.com/?p=676#comments</comments>
		<pubDate>Thu, 14 Jun 2012 09:49:21 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[VMware View]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[unetbootin]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=676</guid>
		<description><![CDATA[Ever wanted to turn any PC into a View client? Then take a look at this webbased View Client ISO creator &#8211; TinyCore Builder for VMware View (http://repurpose.vmwaredotg.com/). Create ISO Burn ISO If you want to boot from USB, I have great success using UNetbootin (http://unetbootin.sourceforge.net/), to convert ISO images to USB. A. Mikkelsen]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to turn any PC into a View client?</p>
<p>Then take a look at this webbased View Client ISO creator &#8211; TinyCore Builder for VMware View (<a href="http://repurpose.vmwaredotg.com/">http://repurpose.vmwaredotg.com/</a>).</p>
<ul>
<li>Create ISO</li>
<li>Burn ISO</li>
</ul>
<p>If you want to boot from USB, I have great success using UNetbootin (<a href="http://unetbootin.sourceforge.net/">http://unetbootin.sourceforge.net/</a>), to convert ISO images to USB.</p>
<p>A. Mikkelsen</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=676</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell/ESXCLI – EMC VPLEX changing multipathing policy</title>
		<link>http://www.amikkelsen.com/?p=640</link>
		<comments>http://www.amikkelsen.com/?p=640#comments</comments>
		<pubDate>Fri, 16 Mar 2012 21:01:33 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[ESXi]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[vSphere (ESX)]]></category>
		<category><![CDATA[emc]]></category>
		<category><![CDATA[esxcli]]></category>
		<category><![CDATA[fixed policy]]></category>
		<category><![CDATA[iops]]></category>
		<category><![CDATA[multipathing]]></category>
		<category><![CDATA[powerpath]]></category>
		<category><![CDATA[psp]]></category>
		<category><![CDATA[roundrobin]]></category>
		<category><![CDATA[satp]]></category>
		<category><![CDATA[vplex]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=640</guid>
		<description><![CDATA[When connecting some storage systems to vSphere, vSphere sometime doesn&#8217;t select the most optimal multipathing policy. I came across the above problem when adding an EMC VPLEX storage system to a  large vSphere 4.1 installation. vSphere selected the Fixed path multipathing policy. In smaller environments this isn&#8217;t normally a problem , but when a Fixed policy is selected in [...]]]></description>
				<content:encoded><![CDATA[<p>When connecting some storage systems to vSphere, vSphere sometime doesn&#8217;t select the most optimal multipathing policy.</p>
<p>I came across the above problem when adding an EMC VPLEX storage system to a  large vSphere 4.1 installation.<br />
vSphere selected the Fixed path multipathing policy. In smaller environments this isn&#8217;t normally a problem , but when a Fixed policy is selected in a large environment with multiple datastores. vSphere selects the first path for each datastore, this results in almost all datastores uses the same path. The result is that the path will be overloaded.</p>
<p><a href="http://www.emc.com/collateral/hardware/white-papers/h7118-using-vmware-virtualization-platforms-vplex.pdf" target="_blank">EMC&#8217;s best practices for EMC VMAX/VPLEX</a> is to use Fixed policy with static load balancing or to use EMC PowerPath.<br />
In our environment Fixed or PowerPath wasn&#8217;t an option as we have multiple hosts and datastores, <del>so in close communication with EMC we chose to change the multipathing policy to Round Robin.</del>.<br />
EMC has once now informed us that RR is only an option (not the best) if PowerPath or Fixed is not an option.</p>
<p>Changing the policy for a few LUN&#8217;s won&#8217;t take long, if you only have a few hosts and a few datastores, but if you have multiple hosts with multiple datastores, the task is massive.</p>
<p>Using Powershell and EsxCli the task is very easy and extremely fast.<br />
Thanks to Arnim van Lieshout (<a href="http://www.van-lieshout.com/2011/01/esxcli-powercli/">http://www.van-lieshout.com/2011/01/esxcli-powercli/</a>) for the basic script.</p>
<p><strong><span style="color: #ff0000;">The below script illustrates how to set RoundRobin and not Fixed, this will be updated ASAP.<br />
Until then take a look at this post from LucD <a href="http://communities.vmware.com/message/1774139">http://communities.vmware.com/message/1774139</a> </span></strong></p>
<pre class="brush: powershell; title: ; notranslate">
&lt;pre&gt;function FuncMail {
 param($To, $From, $Subject, $Body, $smtpServer)
 $msg = new-object Net.Mail.MailMessage
 $smtp = new-object Net.Mail.SmtpClient($smtpServer)
 $msg.From = $From
 $msg.To.Add($To)
 $msg.Subject = $Subject
 $msg.IsBodyHtml = 1
 $msg.Body = $Body
 $smtp.Send($msg)
}

#load Vmware Module
if ((Get-PSSnapin | Where-Object { $_.Name -eq &quot;VMware.VimAutomation.Core&quot; }) -eq $null) { Add-PSSnapin VMware.VimAutomation.Core }

# ----------- Variables ---------------
#vCenter
$vcServer = &quot;vcenterserver&quot;
$vCenterUser = &quot;vcenterusername&quot;
$vCenterPWD = &quot;vcenterpassword&quot;
$DC = &quot;*&quot; # Use * for all DC else replace * with datacenter name
$cluster = &quot;*&quot; # Use * for all Clusters in DC else replace * with cluster name

# LUN settings
$LUNType = &quot;EMC Fibre Channel Disk*&quot;
$psp = &quot;VMW_PSP_RR&quot;
$satp = &quot;VMW_SATP_INV&quot;
$iops = 10

# ESX
$esxUser = &quot;esxuser-root&quot;
$esxPWD = &quot;esxuserpassword&quot;

# Email
$strEmailTo = &quot;to@mail.com&quot;
$strEmailFrom = &quot;from@mail.com&quot;
$strEmailSubject = &quot;PSP info '$vcServer' &quot;
$strEmailSMTP = &quot;smtpserver.com&quot;

# HTML
$strHeadHTML = &quot;&lt;STYLE TYPE='text/css'&gt;&quot;
$strHeadHTML += &quot;TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}&quot;
$strHeadHTML += &quot;TH{border-width: 1px;padding: 10px;border-style: solid;border-color: black; background-color:thistle}&quot;
$strHeadHTML += &quot;TD{border-width: 0px;padding: 0px;padding-right: 5px;padding-left: 5px;border-style: solid;border-color: black}&quot;
$strHeadHTML += &quot;&lt;/STYLE&gt;&quot;

$strBodyHTMLStart = &quot;&lt;H3&gt; Setting PSP multipath &amp; IOPS : &quot;
$strBodyHTMLStart += Get-Date -Format g
$strBodyHTMLStart += &quot;&lt;/H3&gt;&quot;
$strBodyHTMLStart += &quot;&lt;TABLE&gt;&lt;TR&gt; &lt;TH&gt;vCenter&lt;/TH&gt; &lt;TH&gt;Datacenter&lt;/TH&gt; &lt;TH&gt;Cluster&lt;/TH&gt; &lt;TH&gt;Host&lt;/TH&gt; &lt;TH&gt;Device&lt;/TH&gt; &lt;TH&gt;SATP&lt;/TH&gt; &lt;TH&gt;Old PSP&lt;/TH&gt; &lt;TH&gt;New PSP&lt;/TH&gt; &lt;TH&gt;IOPS&lt;/TH&gt; &lt;TH&gt;Old Paths&lt;/TH&gt; &lt;TH&gt;New Paths&lt;/TH&gt;&lt;/TR&gt;&quot;

$strBodyHTMLinfoStart = &quot;&lt;H3&gt; PSP multipath &amp; IOPS not set : &quot;
$strBodyHTMLinfoStart += Get-Date -Format g
$strBodyHTMLinfoStart += &quot;&lt;/H3&gt;&quot;
$strBodyHTMLinfoStart += &quot;&lt;TABLE&gt;&lt;TR&gt; &lt;TH&gt;vCenter&lt;/TH&gt; &lt;TH&gt;Datacenter&lt;/TH&gt; &lt;TH&gt;Cluster&lt;/TH&gt; &lt;TH&gt;Host&lt;/TH&gt; &lt;TH&gt;Device&lt;/TH&gt; &lt;TH&gt;SATP&lt;/TH&gt; &lt;TH&gt;PSP&lt;/TH&gt; &lt;TH&gt;Paths&lt;/TH&gt;&lt;/TR&gt;&quot;

# ---------- Logic (Don't Change) --------------------

$strBODYHTML = &quot;&quot;
$strBodyExcludeHTML = &quot;&quot;

#Connect to vCenter
Connect-VIServer $vcServer -User $vCenterUser -Password $vCenterPWD| Out-Null

#Get Datacenter Clusters
$arrDC = Get-Datacenter -Name $DC | Sort Name
if($arrDC){
 foreach($objDC in $arrDC){

 #Get Cluster list
 $arrCluster = Get-Cluster -Location $objDC -Name $cluster | Sort name
 if($arrCluster){
 foreach($objCluster in $arrCluster){

 #Connect to ESX hosts in cluster
 foreach ($esx in Get-VMHost -Location $objCluster | Sort Name) {

 Connect-VIServer $esx -User $esxUser -Password $esxPWD | Out-Null

#Retrieve the esxcli instances and loop through them
 foreach($esxcli in Get-EsxCli -Server $esx.name) {

 #Write-Host $esx.Name -BackgroundColor Red

 # Change PSP for EMC VPLEX/VMAX devices
 $arrDevice = $esxCli.nmp.device.list() | where {$_.PathSelectionPolicy -ne $psp -and $_.DeviceDisplayName -like $LUNType}
 if($arrDevice){
 foreach($myDevice in $arrDevice){
 #Write-Host &quot;Updating $($myDevice.Device)&quot; -ForegroundColor green
 $esxCli.nmp.device.setpolicy($null, $myDevice.Device, $psp)
 $esxcli.nmp.roundrobin.setconfig(0,$myDevice.device,[long]$iops,&quot;iops&quot;,$false)

 $newPSP = $esxCli.nmp.device.list($myDevice.device)
 $newIOPS = $esxcli.nmp.roundrobin.getconfig($myDevice.device)
 $strBODYHTML += &quot;&lt;TR&gt; &lt;TD&gt;$($vcServer)&lt;/TD&gt; &lt;TD&gt;$($objDC.Name)&lt;/TD&gt; &lt;TD&gt;$($objCluster.Name)&lt;/TD&gt; &lt;TD&gt;$($esx.Name)&lt;/TD&gt; &lt;TD&gt;$($myDevice.Device)&lt;/TD&gt; &lt;TD&gt;$($myDevice.StorageArrayType)&lt;/TD&gt; &lt;TD&gt;$($myDevice.PathSelectionPolicy)&lt;/TD&gt; &lt;TD&gt;$($($newPSP[0]).PathSelectionPolicy)&lt;/TD&gt; &lt;TD&gt;$($newIOPS.IOOperationLimit)&lt;/TD&gt; &lt;TD&gt;$($myDevice.WorkingPaths)&lt;/TD&gt; &lt;TD&gt;$($($newPSP[0]).WorkingPaths)&lt;/TD&gt;&lt;/TR&gt;&quot;
 }
 }

 # Changes not set on
 $arrInfoDevice = $esxCli.nmp.device.list() | where {$_.PathSelectionPolicy -ne $psp -and $_.DeviceDisplayName -like $LUNType}
 if($arrInfoDevice){
 foreach($myInfoDevice in $arrInfoDevice){
 $strBODYHTMLinfo += &quot;&lt;TR&gt; &lt;TD&gt;$($vcServer)&lt;/TD&gt; &lt;TD&gt;$($objDC.Name)&lt;/TD&gt; &lt;TD&gt;$($objCluster.Name)&lt;/TD&gt; &lt;TD&gt;$($esx.Name)&lt;/TD&gt; &lt;TD&gt;$($myInfoDevice.Device)&lt;/TD&gt; &lt;TD&gt;$($myInfoDevice.StorageArrayType)&lt;/TD&gt; &lt;TD&gt;$($myInfoDevice.PathSelectionPolicy)&lt;/TD&gt; &lt;TD&gt;$($myInfoDevice.WorkingPaths)&lt;/TD&gt;&lt;/TR&gt;&quot;
 }
 }

 #Change the default PSP for my SATP
 $esxcli.nmp.satp.setdefaultpsp($psp,$satp) | Out-Null
 }
 Disconnect-VIServer $esx.name -Confirm:$false
 }
 }
 }
 }
}
#Disconnect from vCenter
Disconnect-VIServer $vcServer -Confirm:$false | Out-Null

$strBodyHTMLEnd = &quot;&lt;/TABLE&gt;&quot;
$strBodyHTMLinfoEnd = &quot;&lt;/TABLE&gt;&quot;

# Collect the HTML
$strHTML = &quot;&lt;HTML&gt;&lt;HEAD&gt;&quot;
$strHTML += $strHeadHTML
$strHTML += &quot;&lt;/HEAD&gt;&lt;BODY&gt;&quot;
$strHTML += $strBodyHTMLStart
$strHTML += $strBODYHTML
$strHTML += $strBodyHTMLEnd
$strHTML += $strBodyHTMLinfoStart
$strHTML += $strBODYHTMLinfo
$strHTML += $strBodyHTMLinfoEnd
$strHTML += &quot;&lt;/BODY&gt;&lt;/HTML&gt;&quot;

# Email the collected data
FuncMail -To $strEmailTo -From $strEmailFrom -Subject $strEmailSubject -Body $strHTML -smtpServer $strEmailSMTP
</pre>
<p><strong>Script explained</strong></p>
<p>Line 20-24:<br />
Add you vCenter server name and the logon credentionls.</p>
<p>Line 27-30:<br />
LUNTYPE, is the storage type you want to change PSP and SATP for (you can set this to *, if you want you set the PSP and SATP for all datastores.<br />
PSP, is the multipathing policy you want to change to.<br />
SATP, is the storage array type you want to change the default to.<br />
IOPS, is the number of IO&#8217;s to be send, before switching to the next path. vSphere default is 1000, EMC recommends 1, but I found 10 to work for me.<br />
Stephen Foskett has explained what is PSP and SATP in plain English  <a href="http://blog.fosketts.net/2011/06/06/vmware-esx-vsphere-satp-psp-support-matrix/">http://blog.fosketts.net/2011/06/06/vmware-esx-vsphere-satp-psp-support-matrix/</a>.</p>
<p>Line 33-34:<br />
Change the user to a user with root privileges.<br />
Change the password to correspond with the user.</p>
<p>Line 37-40:<br />
Change the info to receive an report of what has been changed.</p>
<p>Line 92-93:<br />
Sets the PSP and IOPS for each datastore.</p>
<p>Line 95-96:<br />
Retrieves the new settings (for verification) for  each datastore.</p>
<p>Line 101-107:<br />
Generates a list of datastores, where the PSP setting wasn&#8217;t able to be set.<br />
Run the script again to set them.</p>
<p>Line 111:<br />
Sets the hosts default datastore PSP and SATP.<br />
If your hosts connect to multiple different storage systems, I wouldn&#8217;t recommend setting this, but it&#8217;s to you.</p>
<p>If you want to see an output on the screen of the progress of the script, uncomment the lines 85, 91</p>
<p>Download the full RoundRobin script <a href="http://www.amikkelsen.com/?dl_id=30">here</a>.</p>
<p>An exampel of what a report can look like:<br />
<a href="http://www.amikkelsen.com/images/vplex_multipath_report.jpg"><img title="PSP, SATP and IOPS report for VPLEX " src="http://www.amikkelsen.com/images/vplex_multipath_report.jpg" alt="" width="562" height="214" /></a></p>
<p>Post is updated after input from Josh Coen, <a href="http://www.valcolabs.com/">www.valcolabs.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=640</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<enclosure url="http://www.emc.com/collateral/hardware/white-papers/h7118-using-vmware-virtualization-platforms-vplex.pdf" length="6854071" type="application/pdf" /><media:content url="http://www.emc.com/collateral/hardware/white-papers/h7118-using-vmware-virtualization-platforms-vplex.pdf" fileSize="6854071" type="application/pdf" /></item>
		<item>
		<title>VMware Chargeback: Change MSSQL database IP and/or port</title>
		<link>http://www.amikkelsen.com/?p=635</link>
		<comments>http://www.amikkelsen.com/?p=635#comments</comments>
		<pubDate>Thu, 06 Oct 2011 10:08:06 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Chargeback]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[vCenter Chargeback]]></category>
		<category><![CDATA[config.xml]]></category>
		<category><![CDATA[hibernate.cfg.xml]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[jbdc]]></category>
		<category><![CDATA[mmsql]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[vccb]]></category>
		<category><![CDATA[vcenter]]></category>
		<category><![CDATA[vcloud]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=635</guid>
		<description><![CDATA[Yesterday I was supposed to receive last months billing reports from our vCloud Director environment. But for some reason this didn&#8217;t happen I tried to logon to the VCCB web front end, but that wasn&#8217;t possible &#8211; the page just timed out. Then I checked the VCCB  services and all was running. Just to be sure I [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday I was supposed to receive last months billing reports from our vCloud Director environment.<br />
But for some reason this didn&#8217;t happen <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>I tried to logon to the VCCB web front end, but that wasn&#8217;t possible &#8211; the page just timed out.<br />
Then I checked the VCCB  services and all was running.<br />
Just to be sure I rebooted the server, with no luck.</p>
<p>Then I started to be scared&#8230;..</p>
<p>I checked the database login credentials, and the were correct.<br />
So what happend?</p>
<p>After a quick google  I found a <a href="http://communities.vmware.com/message/1705111" target="_blank">community thread</a> about changing the IP for the back end database, and from this I located the config files containing the database connection information.</p>
<ol>
<li><em>Installation_Directory</em>\apache-tomcat-6.0.18\webapps\vCenter-CB\WEB-INF\classes\hibernate.cfg.xml</li>
<li><em>Installation_Directory</em>\DataCollector-Embedded\classes\hibernate.cfg.xml</li>
</ol>
<p>Locate the line</p>
<pre>&lt;property name="connection.url"&gt;jdbc:sqlserver://10.0.0.100;databaseName=vcenter_chargeback;integratedSecurity=false&lt;/property&gt;</pre>
<p>Here you can change the connection string as you see fit.<br />
The connection string is based on Microsoft JDBC, so you are able to change it to fit you needs, choosing from all JDBC parameters. <a href="http://support.microsoft.com/kb/313100">http://support.microsoft.com/kb/313100</a></p>
<p>I solved my problem by adding the port number of the MSSQL server to the connection string.</p>
<pre>10.0.0.100:14331</pre>
<p>I also found that you need to update 2 other config files.</p>
<ol>
<li><em>Installation_Directory</em>\Config.xml</li>
<li><em>Installation_Directory</em>\DataCollector-Embedded\Config.xml</li>
</ol>
<p>Locate the line</p>
<pre>&lt;hostport&gt;10.0.0.100&lt;/hostport&gt;</pre>
<p>Here you just need to update the IP and/or port number.<br />
I needed to add the portnumber.</p>
<pre>&lt;hostport&gt;10.0.0.100:14331&lt;/hostport&gt;</pre>
<p>As you can see in the config.xml you are also able to change other parameters like</p>
<ul>
<li>Databasename</li>
<li>username</li>
<li>Password<br />
This is encrypted so you need to update this through the supplied VCCB tool.<br />
Start -&gt; All Programs -&gt; VMware -&gt; VMware vCenter Chargeback -&gt; vCenter Chargeback Tools -&gt; Update vCenter Chargeback Database Credentials</li>
</ul>
<p>When you have updated all 4 configuration files, restart all services or restart the server.</p>
<p>Wait a few minutes and then login to the VCCB web front end&#8230;.</p>
<p>All is now working <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=635</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware releases vSphere 4.1 hardening guide</title>
		<link>http://www.amikkelsen.com/?p=631</link>
		<comments>http://www.amikkelsen.com/?p=631#comments</comments>
		<pubDate>Fri, 24 Jun 2011 21:25:16 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hardening]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=631</guid>
		<description><![CDATA[In April VMware released their hardening guide for vSphere 4.1 (http://communities.vmware.com/docs/DOC-15413) , now the have also released a free tool to check your vSphere installations against their hardening guidelines. The tool is called &#8220;VMware Compliance Checker for vSphere&#8221; &#8211; http://www.vmware.com/products/datacenter-virtualization/vsphere-compliance-checker/overview.html]]></description>
				<content:encoded><![CDATA[<p>In April VMware released their hardening guide for vSphere 4.1 (<a href="http://communities.vmware.com/docs/DOC-15413">http://communities.vmware.com/docs/DOC-15413</a>) , now the have also released a free tool to check your vSphere installations against their hardening guidelines.</p>
<p>The tool is called &#8220;VMware Compliance Checker for vSphere&#8221; &#8211; <a href="http://www.vmware.com/products/datacenter-virtualization/vsphere-compliance-checker/overview.html">http://www.vmware.com/products/datacenter-virtualization/vsphere-compliance-checker/overview.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=631</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware vSphere PowerCLI Reference – Book</title>
		<link>http://www.amikkelsen.com/?p=629</link>
		<comments>http://www.amikkelsen.com/?p=629#comments</comments>
		<pubDate>Fri, 24 Jun 2011 21:18:45 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=629</guid>
		<description><![CDATA[If you haven&#8217;t read or read about the must have PowerCLI book &#8220;VMware vSphere PowerCLI Reference: Automating vSphere Administration&#8220;, by Luc Dekens, Alan Renouf, Glen Sizemore, Arnim van Lieshout and Jonathan Medd, then you need to check it out. The book will show you how to automate your VMware infrastructure from vCenter to VM&#8217;s. Automate [...]]]></description>
				<content:encoded><![CDATA[<p>If you haven&#8217;t read or read about the must have PowerCLI book &#8220;<a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797,navId-290600.html" target="_blank">VMware vSphere PowerCLI Reference: Automating vSphere Administration</a>&#8220;, by Luc Dekens, Alan Renouf, Glen Sizemore, Arnim van Lieshout and Jonathan Medd, then you need to check it out.</p>
<p>The book will show you how to automate your VMware infrastructure from vCenter to VM&#8217;s.</p>
<ul>
<li>Automate installations</li>
<li>Create and configure VM&#8217;s</li>
<li>Secure your environment</li>
<li>Create reports</li>
</ul>
<p>and much more.</p>
<p>Read a few chaphers from the book or buy the book (like I did <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) at:<br />
<a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470890797,miniSiteCd-SYBEX,descCd-description.html">http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470890797,miniSiteCd-SYBEX,descCd-description.html</a></p>
<p>Download the PowerCLI examples from each chapter:<br />
<a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470890797,miniSiteCd-SYBEX,descCd-DOWNLOAD.html">http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470890797,miniSiteCd-SYBEX,descCd-DOWNLOAD.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=629</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>List hosts CDP information</title>
		<link>http://www.amikkelsen.com/?p=592</link>
		<comments>http://www.amikkelsen.com/?p=592#comments</comments>
		<pubDate>Fri, 03 Jun 2011 17:28:06 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[PowerCLI Scripts]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[cdp]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=592</guid>
		<description><![CDATA[If you have your hosts connected to a Cisco network infrastructure, you can see a hosts CDP information directly from within the VI Client. As you can see in the exampels below it’s quite impossible to get the full CDP picture if you have many hosts with multiple NICs. So I created a script that [...]]]></description>
				<content:encoded><![CDATA[<p>If you have your hosts connected to a Cisco network infrastructure, you can see a hosts CDP information directly from within the VI Client.</p>
<p>As you can see in the exampels below it’s quite impossible to get the full CDP picture if you have many hosts with multiple NICs.<br />
So I created a script that retrieves all CDP info from all your hosts (even across multiple vCenters) and displays it as a webpage.<br />
Now it’s possible to search and share the information <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.amikkelsen.com/images/cdp_web.jpg" target="_blank"><img title="show cdp info " src="../images/cdp_web.jpg" alt="" width="576" height="274" /></a></p>
<p>The script is build up by a few functions</p>
<ul>
<li>Retrieve the vCenter servers to retrieve host from.
<pre class="brush: powershell; title: ; notranslate">
$objvCenterServer = Import-Csv -Path $strvCenterFilePath -Delimiter &quot;;&quot; | sort vCenter
foreach($strvCenterServer in $objvCenterServer){
# Check if VC is uncommented
if ((!($strvCenterServer.vCenter.Contains(&quot;#&quot;))) -and ($strvCenterServer.vCenter.Length -gt 0)){
# Connect to vCenter Server
 Connect-VIServer -Server $strvCenterServer.vCenter -User $strvCenterServer.UserName -Password $strvCenterPWD

# Add logic

# Disconnect from vCenter server
DisConnect-VIServer -Confirm:$false
}}
</pre>
</li>
<li>Retrieve hosts from clusters.
<pre class="brush: powershell; title: ; notranslate">
$arrDC = Get-Datacenter | Sort
foreach($objDC in $arrDC){
 $arrCluster = Get-Cluster -Location $objDC | Sort
 # Only proceed if the Cluster isn't blank
 if ($($arrCluster | Measure-Object).count -gt 0){
 foreach($Cluster in $arrCluster){
 $vmhosts = Get-VMHost -Location $Cluster | Sort Name | Where-Object {$_.State -eq &quot;Connected&quot;} | Get-View
 #Only proceed if any hosts in cluster
 if ($vmhosts.Count -gt 0){
 foreach ($vmhost in $vmhosts){

# Add logic for each host

}}}}}
</pre>
</li>
<li>Retrieve hosts NICs CDP info.
<pre class="brush: powershell; title: ; notranslate">
foreach ($vmhost in $vmhosts){
 $networkSystem = Get-view $vmhost.ConfigManager.NetworkSystem

 foreach($pnic in $networkSystem.NetworkConfig.Pnic | Sort Device){
 $pnicInfo = $networkSystem.QueryNetworkHint($pnic.Device)

 foreach($Hint in $pnicInfo){

 # LinkSpeed &amp; MAC
 $record = 0
 $tmpSpeed = &quot;&quot;
 $tmpMAC = &quot;&quot;
 Do{
 If ($Hint.Device -eq $vmhost.Config.Network.Pnic[$record].Device){
 $tmpSpeed = $vmhost.Config.Network.Pnic[$record].LinkSpeed.SpeedMb
 $tmpMAC = $vmhost.Config.Network.Pnic[$record].Mac
 }
 $record ++
 }
 Until ($record -eq ($vmhost.Config.Network.Pnic.Length))

 # Duplex
 $tmpDuplex = &quot;&quot;
 if($Hint.ConnectedSwitchPort.FullDuplex -eq $true){
 $tmpDuplex = &quot;Full&quot;
 }
 if($Hint.ConnectedSwitchPort.FullDuplex -eq $false){
 $tmpDuplex = &quot;Half&quot;
 }

 # Status
 $tmpStatus = &quot;&quot;
 If (($tmpSpeed -ge 1000) -and ($tmpDuplex -eq &quot;Full&quot;)){
 $tmpStatus = &quot;OK&quot;
 }else{
 If (($tmpSpeed -gt 0) -and ($tmpDuplex -eq &quot;&quot;)){
 $tmpStatus = &quot;CDP not working&quot;
 }
 elseif (($tmpSpeed -gt 0) -and ($tmpDuplex -eq &quot;Half&quot;)){
 if ($tmpStatus -ne &quot;&quot;){$tmpStatus += &quot; / &quot;}
 $tmpStatus = &quot;Duplex config error&quot;
 }
 elseif (($tmpSpeed -gt 0) -and ($tmpSpeed -lt 1000)){
 if ($tmpStatus -ne &quot;&quot;){$tmpStatus += &quot; / &quot;}
 $tmpStatus = &quot;Speed config error&quot;
 }
 else{
 $tmpStatus = &quot;Link Down&quot;
 }}}}
</pre>
</li>
<li>Seperate information included/excluded.
<pre class="brush: powershell; title: ; notranslate">
$isExcluded = func_exclude_from_list -ExcludeHost $vmhost.Name -ExcludeVMNIC $Hint.Device -FromObj $objExcludeList
</pre>
</li>
<li>Generate html outputfile.
<pre class="brush: powershell; title: ; notranslate">
Add-Content -Path $($strOutputPath + $strOutputFileName + &quot;.TMP&quot;) -Value $strHTML
if(Test-Path -Path $($strOutputPath + $strOutputFileName + &quot;.htm&quot;)){
 Copy-Item -Path $($strOutputPath + $strOutputFileName + &quot;.htm&quot;) -Destination $($strOutputPath + $strOutputFileName + $(Get-Date -uformat &quot;%Y%m%d&quot;) + &quot;.htm&quot;) -Force
}
Copy-Item -Path $($strOutputPath + $strOutputFileName + &quot;.TMP&quot;) -Destination $($strOutputPath + $strOutputFileName + &quot;.htm&quot;) -Force
Remove-Item -Path $($strOutputPath + $strOutputFileName + &quot;.TMP&quot;) -Force
</pre>
</li>
</ul>
<p>vCenter servers are added/removed from the file &#8220;_All_vCenter_Hosts_.csv&#8221; .<br />
A hosts NICs are moved to the exclude section, by adding it to the host exclude list &#8220;host_CDP_exclude.csv&#8221;.</p>
<p><a href="../images/cdp_web_excluded.jpg" target="_blank"><img title="show cdp info exclude" src="../images/cdp_web_excluded.jpg" alt="" width="546" height="134" /></a></p>
<p>The CDP information is sorted and saved in a HTML output file. If the script has been run before and an older version of the output file exist, it’s renamed and the new is saved (This supply you with a sort of history).</p>
<p>Get all script files here.<br />
<a title="cdp web" href="http://www.amikkelsen.com/?dl_id=29">_All_vCenter_Hosts_.csv<br />
host_CDP_exclude.csv<br />
host_cdp_info_v01.ps1</a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>For CDP information to be visible  in the VI client, CDP must also be enabled/configured on your physical Cisco switch – see example.<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1003885">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1003885</a></p>
<p>To enable/change the CDP information on a host you have several options.</p>
<ol>
<li>If you are using dvSwitches in vSphere 4.x you can enable it from GUI .<br />
<a href="http://www.amikkelsen.com/images/cdp_gui.jpg" target="_blank"><img title="enable CDP gui" src="http://www.amikkelsen.com/images/cdp_gui.jpg" alt="" width="423" height="328" /></a></p>
<ul>
<li>Connect to vCenter using VI Client</li>
<li>From <strong>Home</strong> click <strong>Networking</strong></li>
<li>Right click your dvSwitch and select<strong> Edit Settings</strong></li>
<li>Under the <strong>Properties</strong> tab select <strong>Advanced</strong></li>
<li>Check <strong>Cisco Discovery Protocol</strong></li>
<li>Set <strong>Operation</strong> to <strong>Both</strong></li>
<li>Click <strong>OK</strong></li>
</ul>
</li>
<li> Using ESX Command line<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1003885">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1003885</a><br />
(exchange vSwitch1 with the name of your vSwitch)</p>
<ul>
<li>Show current setting
<pre>esxcfg-vswitch -b vSwitch1</pre>
</li>
<li>Set the new status (down, listen, advertise, both)
<pre>esxcfg-vswitch -B both vSwitch1</pre>
</li>
<li>Verify new settings
<pre>esxcfg-vswitch -b vSwitch1</pre>
</li>
</ul>
</li>
<li>Using vMA<br />
<a href="http://spininfo.homelinux.com/news/vSphere_PowerCLI/2010/03/24/Enable_CDP_on_vSwitch_on_all_hosts">http://spininfo.homelinux.com/news/vSphere_PowerCLI/2010/03/24/Enable_CDP_on_vSwitch_on_all_hosts</a></p>
<pre> vicfg-vswitch --server &lt;vcenter.domain.com&gt; -h &lt;esxi.domain.com&gt; -B both &lt;vSwitch1&gt;</pre>
</li>
</ol>
<p>To view your CDP info you also a few options<br />
See all options here:<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007069">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007069</a></p>
<ol>
<li>GUI<br />
<a href="http://www.amikkelsen.com/images/show_cdp.jpg" target="_blank"><img title="show cdp info gui" src="http://www.amikkelsen.com/images/show_cdp.jpg" alt="" width="250" height="238" /></a></p>
<ul>
<li>Connect to vCenter or ESX using VI Client</li>
<li>Select a ESX host</li>
<li>Click the Configuration tab</li>
<li>Select Networking</li>
<li>Click the Info icon to the right of the vSwitch</li>
<li>A tool tip opens with CDP information for the selected physical network interface</li>
</ul>
</li>
<li>PowerShell
<pre class="brush: powershell; title: ; notranslate">
 Get-VMHost | Where-Object {$_.State -eq &quot;Connected&quot;} |
 %{Get-View $_.ID} |
 %{$esxname = $_.Name; Get-View $_.ConfigManager.NetworkSystem} |
 %{ foreach($physnic in $_.NetworkInfo.Pnic){
    $pnicInfo = $_.QueryNetworkHint($physnic.Device)
    foreach($hint in $pnicInfo){
       Write-Host $esxname $physnic.Device
       if( $hint.ConnectedSwitchPort ) {
          $hint.ConnectedSwitchPort
       }
       else {
          Write-Host &quot;No CDP information available.&quot;; Write-Host
       }
    }
 }
</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=592</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<enclosure url="http://www.amikkelsen.com/?dl_id=29" length="3087" type="application/download" /><media:content url="http://www.amikkelsen.com/?dl_id=29" fileSize="3087" type="application/download" /></item>
		<item>
		<title>A must see, about how VMware sees the future of cloud</title>
		<link>http://www.amikkelsen.com/?p=589</link>
		<comments>http://www.amikkelsen.com/?p=589#comments</comments>
		<pubDate>Fri, 03 Jun 2011 11:52:42 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[director]]></category>
		<category><![CDATA[EMC world]]></category>
		<category><![CDATA[vCube]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=589</guid>
		<description><![CDATA[See the full keynote from EMC Worls 2011, staring Poul Maritz &#8211; VMware CEO http://www.youtube.com/watch?v=Ac9jQZi_lz8&#38;feature=youtu.be&#38;goback=%252Egde_1800113_member_55803385]]></description>
				<content:encoded><![CDATA[<p>See the full keynote from EMC Worls 2011, staring Poul Maritz &#8211; VMware CEO</p>
<p><a href="http://www.youtube.com/watch?v=Ac9jQZi_lz8&amp;feature=youtu.be&amp;goback=%252Egde_1800113_member_55803385">http://www.youtube.com/watch?v=Ac9jQZi_lz8&amp;feature=youtu.be&amp;goback=%252Egde_1800113_member_55803385</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Ac9jQZi_lz8&amp;feature" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/Ac9jQZi_lz8&amp;feature"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=589</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<enclosure url="http://www.youtube.com/v/Ac9jQZi_lz8&amp;amp;feature" length="1201" type="application/x-shockwave-flash" /><media:content url="http://www.youtube.com/v/Ac9jQZi_lz8&amp;amp;feature" fileSize="1201" type="application/x-shockwave-flash" /></item>
		<item>
		<title>vSphere Client 4.1 error…</title>
		<link>http://www.amikkelsen.com/?p=586</link>
		<comments>http://www.amikkelsen.com/?p=586#comments</comments>
		<pubDate>Wed, 01 Jun 2011 14:37:59 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[Virtual Center]]></category>
		<category><![CDATA[4.1.258902]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[internal error]]></category>
		<category><![CDATA[vcenter]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=586</guid>
		<description><![CDATA[After I upgraded vSphere vCenter &#38; Client to 4.1 258902, I been getting an error in the vSphere Client. A internal error occured in the vSphere Client. Details: Object reference not set to an instant object. The solution is provided by VMware. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#38;cmd=displayKC&#38;externalId=1033560 It&#8217;s just replacing a DLL file The error is only with version [...]]]></description>
				<content:encoded><![CDATA[<p>After I upgraded vSphere vCenter &amp; Client to 4.1 258902, I been getting an error in the vSphere Client.</p>
<pre>A internal error occured in the vSphere Client. Details: Object reference not set to an instant object.</pre>
<p><img title="A internal error occured in the vSphere Client. Details: Object reference not set to an instant object" src="http://www.amikkelsen.com/images/vsphere_client_error.jpg" alt="" /></p>
<p>The solution is provided by VMware.<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1033560">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1033560</a></p>
<p>It&#8217;s just replacing a DLL file <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The error is only with version 4.1 258902 and not 4.1 Update 1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=586</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorry for my absence</title>
		<link>http://www.amikkelsen.com/?p=582</link>
		<comments>http://www.amikkelsen.com/?p=582#comments</comments>
		<pubDate>Mon, 16 May 2011 21:21:45 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=582</guid>
		<description><![CDATA[Hey all, Just to let you know that I haven’t forgotten about you, but the last 6 months has been hectic. In October I changed job from Logica to NNIT. The change has meant that I haven’t had much the time to blog. This is no excuse, but now I’m back J Over the next [...]]]></description>
				<content:encoded><![CDATA[<p>Hey all,<br />
Just to let you know that I haven’t forgotten about you, but the last 6 months has been hectic.</p>
<p>In October I changed job from Logica to NNIT.<br />
The change has meant that I haven’t had much the time to blog. This is no excuse, but now I’m back J</p>
<p>Over the next weeks I’ll post some of the PowerShell scripts that I have created months ago. I hope you can use them.</p>
<p>A. Mikkelsen</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=582</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poor man’s hostprofiles including ESX deployment</title>
		<link>http://www.amikkelsen.com/?p=577</link>
		<comments>http://www.amikkelsen.com/?p=577#comments</comments>
		<pubDate>Mon, 16 May 2011 21:11:04 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[drs]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[get-vmhost]]></category>
		<category><![CDATA[hostprofiles]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=577</guid>
		<description><![CDATA[Last year I was asked to reduce the time spend on installing and configuring our ESX hosts.  Because we weren’t using Enterprise Plus licenses, we didn’t have Host Profiles. I came up with a simple two-step process based on the EDA appliance and a custom PowerShell script. Install the host from PXE. Only setting the [...]]]></description>
				<content:encoded><![CDATA[<p>Last year I was asked to reduce the time spend on installing and configuring our ESX hosts.  Because we weren’t using Enterprise Plus licenses, we didn’t have Host Profiles.<br />
I came up with a simple two-step process based on the EDA appliance and a custom PowerShell script.</p>
<ul>
<li>Install the host from PXE.<br />
Only setting the minimum configuration, so it’s as versatile as possible.</p>
<ul>
<li>Disk layout</li>
<li>Network teaming</li>
<li>FQDN and IP</li>
</ul>
</li>
<li>Configure the host using a      custom PowerShell script.<br />
Based on the Datacenter and Cluster the host is to be added to.</p>
<ul>
<li>Add to vCenter</li>
<li>Set COS memory</li>
<li>Enable VMotion</li>
<li>License host</li>
<li>And much more…</li>
</ul>
</li>
</ul>
<p>A lot of blog posts are available on the net, on how to setup and install an ESX host using the EDA appliance so I won’t trouble you with this.</p>
<p>The PowerShell script is divided into several sections, I won’t explain everyone, only the most relevant, the rest is documented in the full script.<br />
All steps in the script are logged to a host specific log file.</p>
<ul>
<li>User input – Only 3 things      are asked for when running the script, the rest is stored in the scripts      Static section.
<ul>
<li>FQDN of the host (must be       configured in DNS to work)</li>
<li>The environment – what       environment is the host to be placed in, like PROD, DMZ, etc.</li>
<li>The hosts VMotion IP.</li>
</ul>
</li>
<li>Add the host to the right      cluster.<br />
You must have get the Datacenter/Cluster variable prior to adding the      host, else it will just be placed in the first datacenter (See script for      more info).</p>
<pre class="brush: powershell; title: ; notranslate">
 add-vmhost $strHost -location $strvCenterDatacenter -user $strHostUser -password $strHostUserPWD -force: $true
 </pre>
</li>
<li>Set the host in      maintenance mode
<pre class="brush: powershell; title: ; notranslate">
 Get-VMHost -Name $strHost | Set-VMHost -State maintenance
 </pre>
</li>
<li>License host.<br />
As you can see below, you have to supply the full name of the license you      are adding, not just the license key.</p>
<pre class="brush: powershell; title: ; notranslate">
 $targethostMoRef = (get-VMHost $strHost | get-view).MoRef
 $si = Get-View ServiceInstance
 $LicManRef=$si.Content.LicenseManager
 $LicManView=Get-View $LicManRef
 $licassman = (Get-View $LicManView.LicenseAssignmentManager)

 #$licassman.UpdateAssignedLicense($targethostMoRef.value,”YOUR LIC KEY”,”vSphere4 Enterprise Plus (1-12 cores per CPU”)
 $licassman.UpdateAssignedLicense($targethostMoRef.value,”YOUR LIC KEY”,”vSphere4 Enterprise (1-6 cores per CPU”)
 </pre>
</li>
<li>Set the correct time zone.
<pre class="brush: powershell; title: ; notranslate">
 $strTimeZone = &quot;Europe/Copenhagen&quot;
 $tmpHost = Get-VMHost $strHost | get-view
 $tmpDTSystem =  $tmpHost.ConfigManager.DateTimeSystem
 $tmpMoRef = Get-View  $tmpDTSystem
 $tmpDateConfig = New-Object      Vmware.Vim.HostDateTimeConfig
 $tmpDateConfig.timeZone = $strTimeZone
 $tmpMoRef.updateDateTimeConfig($tmpDateConfig)
 </pre>
</li>
<li>Add NTP servers.<br />
Use an array of NTP servers like<br />
$arrNTPServer = @(&#8220;dk.pool.ntp.org&#8221;,&#8221;de.pool.ntp.org&#8221;,&#8221;us.pool.ntp.org&#8221;,&#8221;clock.cimat.ues.edu.sv&#8221;,&#8221;ntp1.gbg.netnod.se&#8221;,&#8221;ntp1.theremailer.net&#8221;)</p>
<pre class="brush: powershell; title: ; notranslate">
 Add-VMHostNtpServer -VMHost $strHost -NtpServer $arrNTPServer -Confirm:$false
 </pre>
<p>If you want you can restart the NTP service – only do it if you don’t plan      on restarting the host after configuring.</p>
<pre class="brush: powershell; title: ; notranslate">
 Restart-VMHostService $ntpd -Confirm:$false
 </pre>
</li>
<li>Open firewall rules<br />
I always open the following firewall rules so that NTP and the SSH is      working</p>
<pre class="brush: powershell; title: ; notranslate">
 Get-VmhostFirewallException -VMHost $strHost -Name &quot;NTP Client&quot; | Set-VMHostFirewallException -enabled:$true
 Get-VmhostFirewallException -VMHost $strHost -Name &quot;SSH Client&quot; | Set-VMHostFirewallException -enabled:$true
 [/powershel]&lt;/li&gt;
	&lt;li&gt;Set the correct DNS servers
 Use an array of DNS servers, this way you can add multiple DNS servers at      once.
 @(&quot;10.10.10.40&quot;,&quot;10.10.10.30&quot;) or @(&quot;10.10.10.40&quot;)
 1
 $strHost = @(&quot;10.10.10.40&quot;,&quot;10.10.10.30&quot;)
 Get-VMHost -Name $strHost | Get-View | %{$tmpNS = Get-View -Id $_.configManager.networkSystem
 $tmpDNS = $tmpNS.NetworkConfig.DnsConfig
 $tmpDNS.domainName = $strHostDomain
 $tmpDNS.address = $arrDNSsrv
 $tmpDNS.searchDomain = $strSearchDomain
 $tmpNS.updateDnsConfig($tmpDNS)}
 </pre>
</li>
<li>Configuring network,      adding network including VMotion.<br />
See the script for the full script.</p>
<pre class="brush: powershell; title: ; notranslate">
 $vSwitch = Get-VirtualSwitch $strHost -Name vSwitch0
 #Set-VirtualSwitch -VirtualSwitch $vSwitch -Nic vmnic1
 New-VirtualPortGroup -VirtualSwitch $vSwitch -Name &quot;VMOTION&quot; -VLanId 0
 New-VMHostNetworkAdapter -VMHost $strHost -PortGroup &quot;VMOTION&quot; -VirtualSwitch $vSwitch -IP $strVMotion -SubnetMask $strSubnetMask -VMotionEnabled $true
 $strNetConfig = Get-View (Get-VMHost $strHost | Get-View).ConfigManager.NetworkSystem
 $strIPRoute = New-Object VMware.Vim.HostIpRouteConfig
 $strIPRoute.defaultGateway = $strGateway
 $strNetConfig.UpdateIpRouteConfig($strIPRoute)
 New-VirtualPortGroup -VirtualSwitch $vSwitch -Name &quot;PROD&quot; -VLanId 200
 New-VirtualPortGroup -VirtualSwitch $vSwitch -Name &quot;PXE&quot; -VLanId 0
 </pre>
<p>If needed you can remove the default VM network</p>
<pre class="brush: powershell; title: ; notranslate">
 $vSwitch = Get-VirtualSwitch $strHost -Name vSwitch0
 $vmnetwork = Get-VirtualPortGroup -VirtualSwitch $vSwitch -Name &quot;VM Network&quot;
 Remove-VirtualPortGroup -VirtualPortGroup $vmnetwork -Confirm:$false}
 </pre>
</li>
<li>Reboot the host J
<pre class="brush: powershell; title: ; notranslate">
 Get-VMHost -Name $strHost | %{Get-View $_.ID} | %{$_.RebootHost_Task($TRUE)}
 </pre>
</li>
<li>If you want your script to wait for the host to      be rebooted before continuing, you can do it with these two loops.
<pre class="brush: powershell; title: ; notranslate">
 do{
 $result = Get-VMHost $strHost
 Start-Sleep 10 # Wait 10 sec
 }
 Until($result.State -ne &quot;Maintenance&quot;)
 # Maintenance - because host entered Maintenence mode earlier

 do{
 $result =  Get-VMHost $strHost
 Start-Sleep 10 # Wait 10 sec
 }
 Until($result.State -eq &quot;Maintenance&quot;)
 </pre>
</li>
<li>Finally exit the host from      maintenance mode.
<pre class="brush: powershell; title: ; notranslate">
 Get-VMHost -Name $strHost | Set-VMHost -State connected
 </pre>
</li>
</ul>
<p>If everything is configured correctly, DRS should start migrating VM’s to the newly added host.</p>
<p>This script helped reducing the time spend on installing and configuring a host from 90 minutes to about 18 minutes. That’s a reduction of more than 500%, time you can use on other cool PowerShell tasks. J</p>
<p>By using a script to customize our hosts, we also gained two other benefits.</p>
<ol>
<li>Compliance – a host is      always installed and configured the exact same way each time.</li>
<li>Each step is documented in      a host specific log file.</li>
</ol>
<p>The full script can be downloaded <a title="ESX Deployment" href="http://www.amikkelsen.com/?dl_id=28" target="_self">here</a>.</p>
<p>﻿</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=577</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<enclosure url="http://www.amikkelsen.com/?dl_id=28" length="14686" type="application/download" /><media:content url="http://www.amikkelsen.com/?dl_id=28" fileSize="14686" type="application/download" /></item>
		<item>
		<title>Changing the virtual videocard settings</title>
		<link>http://www.amikkelsen.com/?p=570</link>
		<comments>http://www.amikkelsen.com/?p=570#comments</comments>
		<pubDate>Wed, 27 Apr 2011 13:51:50 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[auto detect]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[setting]]></category>
		<category><![CDATA[videocard]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=570</guid>
		<description><![CDATA[Some time ago I was asked to create a script that could list each VM’s videocard settings. As you could see that was quite simple. I using the Get-View -ViewType to speed up the query – See LucD’s post on http://communities.vmware.com/message/1511671#1511671 for more info. Then I was asked to set all VM’s videocard setting to [...]]]></description>
				<content:encoded><![CDATA[<p>Some time ago I was asked to create a script that could list each VM’s videocard settings. </p>
<pre class="brush: powershell; title: ; notranslate">
$VMs = Get-View -ViewType VirtualMachine | sort Name 
foreach($VM in $VMs){
	write &quot;$($VM.Name) $($VM.Guest.Screen.Width)/$($VM.Guest.Screen.Height)&quot;
}
</pre>
<p>As you could see that was quite simple.<br />
I using the Get-View -ViewType to speed up the query – See LucD’s post on <a href="http://communities.vmware.com/message/1511671#151167">http://communities.vmware.com/message/1511671#1511671</a> for more info.</p>
<p>Then I was asked to set all VM’s videocard setting to Auto Detect (Default setting).</p>
<pre class="brush: powershell; title: ; notranslate">
$vms = Get-View -ViewType VirtualMachine | sort Name
foreach ($vm in $vms){
	if ($vm.Runtime.PowerState -eq &quot;PoweredOff&quot;) {
		if ($vm.Config.Version -eq &quot;vmx-07&quot;){ 
			foreach($dev in $vm.Config.Hardware.Device){
				if ($dev.DeviceInfo.Label -like &quot;Video*&quot;){
					if ($dev.UseAutoDetect -match &quot;False&quot; ) {
						$VMName = $vm.Name
						$VMcidcrd = New-Object VMware.Vim.VirtualMachineVideoCard 
						$VMcidcrd.UseAutoDetect = 1
						$VMcidcrd.Key = 500
						$spec = new-object VMware.Vim.VirtualDeviceConfigSpec
						$spec.Device = $VMcidcrd
						$spec.Operation = &quot;edit&quot;
						$VMSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
						$VMSpec.DeviceChange = $spec
						$vm.ReconfigVM_Task($VMSpec)
						write &quot;$($vm.Name) - Video Settings Changed&quot;
						
					}
				}
			}
		}
	}
}
</pre>
<p>As you can see this requires a bit more.<br />
The VM has to be<br />
•	Powered Off<br />
•	Running vHW version 7<br />
Download the full script <a href="/files/powershell/videocard_to_auto_v01.ps1">here</a>.</p>
<p>If you want to set the videocard setting to a specific MB, then just change the line from the above script</p>
<pre class="brush: powershell; title: ; notranslate">
$VMcidcrd.UseAutoDetect = 0
</pre>
<p>To</p>
<pre class="brush: powershell; title: ; notranslate">
$VMcidcrd.UseAutoDetect = 0
</pre>
<p>And add the line</p>
<pre class="brush: powershell; title: ; notranslate">
$VMcidcrd.VideoRamSizeInKB = 131072
</pre>
<p>Where the 131072 us the amount of MB you want multiplied with 1024<br />
Ex. 128 x 1024 = 131072</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=570</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project Onyx 2.0 is released</title>
		<link>http://www.amikkelsen.com/?p=564</link>
		<comments>http://www.amikkelsen.com/?p=564#comments</comments>
		<pubDate>Fri, 19 Nov 2010 21:09:59 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Project Onyx]]></category>
		<category><![CDATA[onyx]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=564</guid>
		<description><![CDATA[September 15, 2010 VMware released version 2.0 of its Project Onya Alpha. You can download and read more about Project Onyx on the projects home page. http://communities.vmware.com/community/vmtn/vsphere/automationtools/onyx?view=overview This project is a must have for all PowerCLI geeks]]></description>
				<content:encoded><![CDATA[<p>September 15, 2010 VMware released version 2.0 of its Project Onya Alpha.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="444" height="271" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/bANfdjuH4wk&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="444" height="271" src="http://www.youtube.com/v/bANfdjuH4wk&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can download and read more about Project Onyx on the projects home page.<br />
<a href="http://communities.vmware.com/community/vmtn/vsphere/automationtools/onyx?view=overview" target="_blank">http://communities.vmware.com/community/vmtn/vsphere/automationtools/onyx?view=overview</a></p>
<p>This project is a must have for all PowerCLI geeks <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=564</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<enclosure url="http://www.youtube.com/v/bANfdjuH4wk&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;version=3" length="3320" type="application/x-shockwave-flash" /><media:content url="http://www.youtube.com/v/bANfdjuH4wk&amp;amp;hl=en_US&amp;amp;feature=player_embedded&amp;amp;version=3" fileSize="3320" type="application/x-shockwave-flash" /></item>
		<item>
		<title>Downgrading ESX virtual hardware 7 to 4</title>
		<link>http://www.amikkelsen.com/?p=557</link>
		<comments>http://www.amikkelsen.com/?p=557#comments</comments>
		<pubDate>Fri, 19 Nov 2010 20:18:32 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[ESX Migrate/Upgrade]]></category>
		<category><![CDATA[vSphere (ESX)]]></category>
		<category><![CDATA[White Papers]]></category>
		<category><![CDATA[4]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[ddb.virtualhwversion]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[lsilogic]]></category>
		<category><![CDATA[lsisas1068]]></category>
		<category><![CDATA[scsi0.virtualdev]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[virtual hardware]]></category>
		<category><![CDATA[virtualhw.version]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=557</guid>
		<description><![CDATA[When you upgrade your vSphere environment you normally also upgrade the VM&#8217;s virtual hardware to version 7, to take advantage of the new features. This is pretty normal procedure for all VMware admins. But in some very very rare cases you might need to move a VM upgraded to hardware version 7, to a host [...]]]></description>
				<content:encoded><![CDATA[<p>When you upgrade your vSphere environment you normally also upgrade the VM&#8217;s virtual hardware to version 7, to take advantage of the new features. This is pretty normal procedure for all VMware admins.</p>
<p>But in some very very rare cases you might need to move a VM upgraded to hardware version 7, to a host that doesn’t support VM’s running hardware version 7.<br />
From a host running ESX 4.x to a host running ESX 3.x</p>
<p>So what to do.<br />
There is two ways you can accomplice this task.</p>
<p>The first way is to use the free VMware Converter tool.<br />
Some great guides have been created by others so I don’t want to do it all over again.<br />
The only thing is that it can take some time to convert the VM, but it is a proven and stable method.<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1028019">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1028019</a><br />
Or<br />
<a href="http://www.techhead.co.uk/vmware-esx-how-to-downgrade-a-vms-vm-versionhw-level-from-7-4-0-to-4-3-x">http://www.techhead.co.uk/vmware-esx-how-to-downgrade-a-vms-vm-versionhw-level-from-7-4-0-to-4-3-x</a><br />
Or<br />
<a href="http://blog.vmpros.nl/2010/04/09/vmware-how-to-downgrade-vm-hardware-level-7-to-4/">http://blog.vmpros.nl/2010/04/09/vmware-how-to-downgrade-vm-hardware-level-7-to-4/</a></p>
<p>The other way is to do it manually, this way is a lot faster, but there is a risk that it will corrupt the VM, so make sure you have a working backup.<br />
Use this guide on your own risk</p>
<ul>
<li>Powered off the VM</li>
<li>Make sure the VM doesn’t have any snapshots before proceeding</li>
<li>From the ESX console or from a Putty session, edit the VMs VMX file, using your favorite editor
<pre>vi /vmfs/volume/DS1/WIN2008-001/WIN2008-001.vmx</pre>
</li>
<li>Change the virtual hardware version from:
<pre>virtualHW.version = “7”</pre>
<p>To</p>
<pre>virtualHW.version = “4”</pre>
</li>
<li>You don’t need to change config.version = “8”, since ESX 3.x already uses this version</li>
<li>Change the virtual controller, because virtual hardware version 4 doesn’t understand the version 7 virtual controller, from:
<pre>scsi0.virtualDev = “lsisas1068”</pre>
<p>To</p>
<pre>scsi0.virtualDev = “lsilogic”</pre>
</li>
</ul>
<ul>
<li>From the ESX console or from a Putty session, edit the VMs VMDK pointer file/files (if more than one virtual disk), using your favorite editor
<pre>vi /vmfs/volume/DS1/WIN2008-001/WIN2008-001.vmdk</pre>
</li>
<li>Change the virtual hardware version from:
<pre>ddb.virtualHWVersion = "7"</pre>
<p>To</p>
<pre>ddb.virtualHWVersion = "4"</pre>
</li>
</ul>
<ul>
<li>You should now be able to power on the VM as virtual hardware version 4.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=557</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Configure IBM Blades (running ESX) and Cisco switches for failover</title>
		<link>http://www.amikkelsen.com/?p=540</link>
		<comments>http://www.amikkelsen.com/?p=540#comments</comments>
		<pubDate>Wed, 29 Sep 2010 20:18:47 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[White Papers]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[failover]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[link state tracking]]></category>
		<category><![CDATA[state]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=540</guid>
		<description><![CDATA[Using IBM Blades and Cisco switches to run your ESX enviroment? If yes, have you tested what happens if you unplug the network cables going into one switch? If you like me have bundled 2 or more cables going from one switch, to one backbone switch and done the same for the other switch, then [...]]]></description>
				<content:encoded><![CDATA[<p>Using IBM Blades and Cisco switches to run your ESX enviroment?</p>
<p>If yes, have you tested what happens if you unplug the network cables going into one switch?</p>
<p>If you like me have bundled 2 or more cables going from one switch, to one backbone switch and done the same for the other switch, then your VM&#8217;s using that switch will loose network connection (from outside the host).<br />
This is not the way I wanted the setup to work.</p>
<p><a rel="attachment wp-att-549" href="http://www.amikkelsen.com/?attachment_id=549"><img class="size-medium wp-image-549 alignnone" title="bladecenterH_cisco" src="http://www.amikkelsen.com/files/bladecenterH_cisco-213x300.jpg" alt="" width="213" height="300" /></a></p>
<p>After a bit of googling i found a blog from Scott Lowe (<a href="http://blog.scottlowe.org/2007/06/22/link-state-tracking-in-blade-deployments/">http://blog.scottlowe.org/2007/06/22/link-state-tracking-in-blade-deployments/</a>) about the problem and also a solution.<br />
The solution is called <strong>Link State Tracking</strong>. Many users have tried the solution and have got it to work, so I had to test it&#8230;..</p>
<p>I added the following lines to each of the Blade Switches (<span style="color: #ff0000;">Port-Channel, group and interfaces may be different on your system</span>).</p>
<p><tt></tt><tt></tt></p>
<pre><tt>----------UPLINK to CORE switch------------
interface Port-Channel1
link state group 1 upstream

----------LINK to Blade server------------
interface range GigabitEthernet0/1 - 14
link state group 1 downstream

----------Global command------------
link state track 1

conf t
interface Port-Channel1
link state group 1 upstream
interface range GigabitEthernet0/1 - 14
link state group 1 downstream
link state track 1
</tt></pre>
<p>Remember to write the changes to memory using</p>
<pre>wri</pre>
<p>After this was done on both Blade switches, i just had to test it.<br />
I started a ping to a VM that I knew was using Switch1 to communicate with external network traffic.<br />
Then I unplugged the to 2 network cables going into Switch1 and waited to see if the ping command would loose the communication with the VM&#8230;.<br />
It didn&#8217;t loose connection. So the the VM must have switched to Switch2.</p>
<p><a rel="attachment wp-att-552" href="http://www.amikkelsen.com/?attachment_id=552"><img class="size-medium wp-image-552 alignnone" title="bladecenterH_cisco-disconnected" src="http://www.amikkelsen.com/files/bladecenterH_cisco-disconnected-215x300.jpg" alt="" width="215" height="300" /></a></p>
<p>So configuring the Blade Switches for <strong>Link State Tracking</strong> is to proper way to configure the switches.<br />
A big thanks goes to Scott Lowe for the blog on Link State Tracking.</p>
<p><tt></tt></p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=540</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guest warning after upgrade to vSphere 4.1</title>
		<link>http://www.amikkelsen.com/?p=509</link>
		<comments>http://www.amikkelsen.com/?p=509#comments</comments>
		<pubDate>Thu, 23 Sep 2010 18:04:42 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[vSphere (ESX)]]></category>
		<category><![CDATA[Workstation]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[buslogic]]></category>
		<category><![CDATA[lsi logic]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[suppress]]></category>
		<category><![CDATA[vsphere]]></category>
		<category><![CDATA[warning]]></category>
		<category><![CDATA[wminxp]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=509</guid>
		<description><![CDATA[After we upgraded to vSphere 4.1, the SCSI adaptor of all our WINXP guests changed from LSI Logic Parallel  to BusLogic Parallel. This change should normally not create any warnings or problems it VMware Tools are up to date. But after the upgrade all our WINXP guests got the following warning when powered on in [...]]]></description>
				<content:encoded><![CDATA[<p>After we upgraded to vSphere 4.1, the SCSI adaptor of all our WINXP guests changed from LSI Logic Parallel  to BusLogic Parallel. This change should normally not create any warnings or problems it VMware Tools are up to date.</p>
<p>But after the upgrade all our WINXP guests got the following warning when powered on in the event log.</p>
<p><a rel="attachment wp-att-521" href="http://www.amikkelsen.com/?attachment_id=521"><img class="size-medium wp-image-521 alignnone" title="buslogic_warning" src="http://www.amikkelsen.com/files/buslogic_warning-300x148.jpg" alt="Message from esxhost01.labt.local: The guest operating system is Windows XP and you have one or more virtual SCSI devices installed in your virtual machine. Windows XP does not support the BusLogic SCSI adapter that VMware ESX currently uses for its virtual SCSI devices. Select OK to continue or Cancel to cancel. info 22-09-2010 15:55:25 VM name vpxuser" width="300" height="148" /></a><br />
I then changed the SCSI adaptor back to LSI Logic Parallel and I now got almost the same warning.</p>
<p style="text-align: left;"><a rel="attachment wp-att-524" href="http://www.amikkelsen.com/?attachment_id=524"><img class="size-medium wp-image-524 alignnone" title="lsilogic_warning" src="http://www.amikkelsen.com/files/lsilogic_warning-299x131.jpg" alt="Message from esxhost01.labt.local: The guest operating system is Windows XP and you have one or more virtual SCSI devices installed in your virtual machine. Windows XP does not support the LSI Logic SCSI adapter that VMware ESX currently uses for its virtual SCSI devices. Select OK to continue or Cancel to cancel. info 22-09-2010 15:55:25 VM name vpxuser" width="299" height="131" /></a></p>
<p>I contacted VMware support and they told me that it was a known &#8220;feature&#8221;/&#8221;bug&#8221; and send me the following link to suppress the waring in the Event log.<br />
<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007122" target="_blank">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007122</a></p>
<p>There is two ways to suppress the warning.</p>
<p><strong>Through vSphere Client</strong></p>
<ul>
<li>Using the vSpher Client logon to your vCenter server.</li>
<li>Poweroff the VM.</li>
<li>Edit the VM’s settings</li>
<li>Navigate to <strong>Options &gt; Advanced &gt; General<a rel="attachment wp-att-489" href="http://www.amikkelsen.com/?attachment_id=489"><br />
</a></strong></li>
<li>Click <strong>Configuration Parameters</strong></li>
<li>Add the following rows, by using <strong>Add Row</strong>
<ul>
<li>If you have a BusLogic Parallel SCSI adaptor</li>
</ul>
<ul>
<pre><span><span>buslogic.noDriver = "FALSE"</span></span></pre>
<li>If you have a LSI Logic Parallel SCSI adaptor</li>
<pre><span><span>lsilogic.noDriver = "FALSE"</span></span></pre>
</ul>
</li>
<li>Click <strong>OK</strong> twice to close the dialogs and save the changes.</li>
<li>PowerOn the VM</li>
</ul>
<p><strong>Editing the VMX file</strong></p>
<ul>
<li>Open a SSH to the host ex. using Putty</li>
<li>Navigate to the VM&#8217;s files (relpace with your own path)
<pre>cd /vmfs/volumes/lun01/winxp01/</pre>
</li>
<li>Open the config file  in your favorit editor .
<pre>vi winxp01.vmx</pre>
</li>
<li>Add the following line to the file
<ul>
<li>If you have a BusLogic Parallel SCSI adaptor</li>
</ul>
</li>
</ul>
<ul>
<li>
<ul>
<pre>buslogic.noDriver = "FALSE"</pre>
<li>If you have a LSI Logic Parallel SCSI adaptor</li>
<pre>lsilogic.noDriver = "FALSE"</pre>
</ul>
</li>
</ul>
<ul>
<li>Save and close the config file.</li>
<li>PowerOn the VM</li>
</ul>
<p>I haven&#8217;t tested if it possible to add the lines to the global config file on each host (/etc/vmware/config) for all VM&#8217;s..</p>
<p>I will test this next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=509</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Problems with FullScreen in vSphere 4.1</title>
		<link>http://www.amikkelsen.com/?p=506</link>
		<comments>http://www.amikkelsen.com/?p=506#comments</comments>
		<pubDate>Wed, 22 Sep 2010 11:54:22 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[vSphere (ESX)]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[4.x]]></category>
		<category><![CDATA[full]]></category>
		<category><![CDATA[fullscreen]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=506</guid>
		<description><![CDATA[After we upgraded to vSphere 4.1 we have been expirence problems with VM&#8217;s entering FullScreen mode. The issue is that 9/10 times a VM enter FullScreen mode, you are not able to move the mouse to the bottom part of the screen and select a program or the Start option. VMware is aware of the [...]]]></description>
				<content:encoded><![CDATA[<p>After we upgraded to vSphere 4.1 we have been expirence problems with VM&#8217;s entering FullScreen mode.</p>
<p>The issue is that 9/10 times a VM enter FullScreen mode, you are not able to move the mouse to the bottom part of the screen and select a program or the Start option.</p>
<p>VMware is aware of the bug.<br />
They say that it is resolved  in ESX 5 (next year)  &#8211; FullScreen mode should be completely redesigned.</p>
<p>Until then a patch is requested from PR, but no timeframe is released.<br />
So if you have the same problem, please file a support request with VMware to speed up the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=506</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Copy &amp; Paste option is disabled in vSphere Client 4.1 – default</title>
		<link>http://www.amikkelsen.com/?p=487</link>
		<comments>http://www.amikkelsen.com/?p=487#comments</comments>
		<pubDate>Tue, 21 Sep 2010 13:23:56 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[cut]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=487</guid>
		<description><![CDATA[Yesterday we upgraded one of our vSphere Clusters to 4.1 &#8211; it went smoothly But today the users reported that they weren&#8217;t able to use cut % paste between the guest and their computer using the vSphere Client (Console). After a quick google we found that VMware has tightened the vSphere security by disabling this [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday we upgraded one of our vSphere Clusters to 4.1 &#8211; it went smoothly <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>But today the users reported that they weren&#8217;t able to use cut % paste between the guest and their computer using the vSphere Client (Console).</p>
<p>After a quick google we found that VMware has tightened the vSphere security by disabling this feature. See VMware <a title="KB1026437" href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1026437" target="_blank">KB 1026437</a>.</p>
<p>If you need the cut &amp; paste functionality you can enable it again on the guest or host level.</p>
<h3>For a single VM:</h3>
<ul>
<li>Using the vSpher Client logon to your vCenter server.</li>
<li>Poweroff the VM.</li>
<li>Edit the VM&#8217;s settings</li>
<li>Navigate to <strong>Options &gt; Advanced &gt; General<br />
<a rel="attachment wp-att-489" href="http://www.amikkelsen.com/?attachment_id=489"><img class="alignnone size-medium wp-image-489" title="cutpaste_Properties" src="http://www.amikkelsen.com/files/cutpaste_Properties-300x165.jpg" alt="" width="300" height="165" /></a></strong></li>
<li>Click <strong>Configuration Parameters</strong></li>
<li>Add the following rows, by using <strong>Add Row</strong>
<pre>isolation.tools.copy.disable –  false
isolation.tools.paste.disable  – false
<a rel="attachment wp-att-490" href="http://www.amikkelsen.com/?attachment_id=490"><img class="alignnone size-medium wp-image-490" title="cutpaste_CP" src="http://www.amikkelsen.com/files/cutpaste_CP-300x243.jpg" alt="" width="300" height="243" /></a></pre>
</li>
<li>Click <strong>OK</strong> twice to close the dialogs and save the changes.</li>
<li>PowerOn the VM</li>
</ul>
<h3>For all VM&#8217;s on a host ESX/ESXi</h3>
<p><span style="color: #ff0000;">Must be done on all hosts, so you don&#8217;t loose the functionality when the VM is migrated to another host.</span></p>
<ul>
<li><span style="color: #ff0000;"><span style="color: #000000;">Open a SSH to the host ex. using Putty</span></span></li>
<li><span style="color: #ff0000;"><span style="color: #000000;">Open /etc/vmware/config in your favorit editor .<br />
<a rel="attachment wp-att-493" href="http://www.amikkelsen.com/?attachment_id=493"><img class="alignnone size-medium wp-image-493" title="cutpaste_cos_vi1" src="http://www.amikkelsen.com/files/cutpaste_cos_vi1-300x69.jpg" alt="" width="300" height="69" /></a></span></span></li>
<li><span style="color: #ff0000;"><span style="color: #000000;">Add these lines to the file<br />
</span></span></p>
<pre>isolation.tools.copy.disable="FALSE"
isolation.tools.paste.disable="FALSE"
<a rel="attachment wp-att-499" href="http://www.amikkelsen.com/?attachment_id=499"><img class="alignnone size-medium wp-image-499" title="cutpaste_cos_vi2" src="http://www.amikkelsen.com/files/cutpaste_cos_vi21-300x128.jpg" alt="" width="300" height="128" /></a></pre>
</li>
<li><span style="color: #ff0000;"><span style="color: #000000;">Save and close the config file. Cut &amp; Paste will work after a VM powerson, reboots or resume.<br />
</span></span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=487</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Upgrading ESXi 3.x/4.0 to 4.1 – “Failed to read the upgrade package metadata.xml”</title>
		<link>http://www.amikkelsen.com/?p=478</link>
		<comments>http://www.amikkelsen.com/?p=478#comments</comments>
		<pubDate>Sun, 18 Jul 2010 20:16:38 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[ESX Migrate/Upgrade]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[4.0]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[cim.vgz]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[esxupdate]]></category>
		<category><![CDATA[failed to read the upgrade package medata.xml]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[hostupdate utility]]></category>
		<category><![CDATA[metadata.zip]]></category>
		<category><![CDATA[rcli]]></category>
		<category><![CDATA[remote cli]]></category>
		<category><![CDATA[unsupported]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=478</guid>
		<description><![CDATA[Friday I was at a customer to upgrade their ESXi 4.0 (free) to version 4.1. This should have been an easy task, download CD, burn it and install. This wasn&#8217;t the case, the new ESXi 4.1 wouldn&#8217;t install, it kept freezing during the extract of the cim.vgz file. The problem occurred on both the Dell [...]]]></description>
				<content:encoded><![CDATA[<p>Friday I was at a customer to upgrade their ESXi 4.0 (free) to version 4.1.<br />
This should have been an easy task, download CD, burn it and install.</p>
<p>This wasn&#8217;t the case, the new ESXi 4.1 wouldn&#8217;t install, it kept freezing during the extract of the cim.vgz file.<br />
The problem occurred on both the Dell custom of ESXi 4.0 U1 and the standard ESXi 4.1.<br />
We googled and googled but didn&#8217;t find a solution &#8211; in the end we blamed the error on the old bios version 1.1.4.</p>
<p>To my luck the customer still had the CD we installed the server with 9 months ago &#8211; ESXi 4.0.</p>
<p>We installed ESXi using the old CD and then everything was working &#8211; but we still needed to upgrade to ESXi 4.1.</p>
<p>So now what to do &#8230;&#8230;.</p>
<p>Normally you use the hostupdate utility or the Remote CLI but the hostupdate utility is not included in the free version of ESXi and the we didn&#8217;t want to install the Remote CLI on the computer.<br />
To my luck I had the hostupdate utility installed but i kept getting this error when trying to upgrade the ESXi host.</p>
<pre>“Failed to read the upgrade package metadata.xml”</pre>
<p><strong>The solution to our problem was:</strong></p>
<ol>
<li>Since it was a ESXi free with out support, we decided to use the &#8220;ESXi  command line interface&#8221;, witch is unsupported.<br />
Follow this guide to enable it (<a href="http://www.bauer-power.net/2010/04/vmware-esxi-hack-to-allow-ssh.html" target="_blank">http://www.bauer-power.net/2010/04/vmware-esxi-hack-to-allow-ssh.html</a>).</li>
<li>Download and extract the upgrade ZIP file from VMware.</li>
<li>From the VIclient, upload the extracted files to the host datastore, using the &#8220;datastore browser&#8221;<br />
- I uploaded the files to a folder named &#8220;upgrade&#8221;</li>
<li>Put the ESXi host in &#8220;Maintance Mode&#8221;<br />
- Since it is a ESXi, this can only be done when all VM&#8217;s are powered off.</li>
<li>Connect the the ESXi console using ex. Putty.exe.</li>
<li>Navigate to the upgrade directory.
<pre>cd /vmfs/volumes/local-datastore/upgrade</pre>
</li>
<li>Begin the upgrade process
<pre>esxupdate update -m metadata.zip
<a href="http://www.amikkelsen.com/images/esxi_upgrade_cos.jpg"><img class="alignnone" title="ESXi commandline" src="http://www.amikkelsen.com/images/esxi_upgrade_cos.jpg" alt="" width="602" height="247" /></a></pre>
</li>
<li>When the upgrade is finished, reboot the host.
<pre>reboot</pre>
</li>
<li>To verify the new build number:<br />
- Connect to the host using the VIclient<br />
- Select the host<br />
- Choose the &#8220;Summery&#8221; tab<br />
- Verify that the ESXi version number and build has been updated</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=478</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Powershell – vRanger Automated is now avaiable for download</title>
		<link>http://www.amikkelsen.com/?p=475</link>
		<comments>http://www.amikkelsen.com/?p=475#comments</comments>
		<pubDate>Tue, 22 Jun 2010 19:57:51 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[PowerCLI Scripts]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[vRanger]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=475</guid>
		<description><![CDATA[Just released the complete powershell script to control vRanger backup from vCenter. Read about the script and it&#8217;s features here. Download it here.]]></description>
				<content:encoded><![CDATA[<p>Just released the complete powershell script to control vRanger backup from vCenter.</p>
<p>Read about the script and it&#8217;s features <a title="View features" href="http://www.amikkelsen.com/?p=437" target="_self">here</a>.</p>
<p>Download it <a title="Download File" href="http://www.amikkelsen.com/?dl_id=26" target="_self">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=475</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<enclosure url="http://www.amikkelsen.com/?dl_id=26" length="9731" type="application/download" /><media:content url="http://www.amikkelsen.com/?dl_id=26" fileSize="9731" type="application/download" /></item>
		<item>
		<title>Powershell – Check if a service is running</title>
		<link>http://www.amikkelsen.com/?p=472</link>
		<comments>http://www.amikkelsen.com/?p=472#comments</comments>
		<pubDate>Fri, 18 Jun 2010 08:22:30 +0000</pubDate>
		<dc:creator>A. Mikkelsen</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servicce]]></category>
		<category><![CDATA[vcenter]]></category>
		<category><![CDATA[virtualcenter]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.amikkelsen.com/?p=472</guid>
		<description><![CDATA[If you ever have experienced that after your vCenter server reboots &#8211; due to Windows updates, the &#8220;VMware VirtualCenter Server&#8221; service is not starting? I have seen it a few times and every time it&#8217;s during a weekend So to make sure your vCenter service (or other) is always running you could use this powershell [...]]]></description>
				<content:encoded><![CDATA[<p>If you ever have experienced that after your vCenter server reboots &#8211; due to Windows updates, the &#8220;VMware VirtualCenter Server&#8221; service is not starting?</p>
<p>I have seen it a few times and every time it&#8217;s during a weekend <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>So to make sure your vCenter service (or other) is always running you could use this powershell script to check if a service is running, and if not start it.<br />
To make sure you know if the service wasn&#8217;t started after a reboot or other cause, I have added a mail function to the script <img src='http://www.amikkelsen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush: powershell; title: ; notranslate">
function FuncCheckService{
    param($ServiceName)
    $arrService = Get-Service -Name $ServiceName
    if ($arrService.Status -ne &quot;Running&quot;){
        Start-Service $ServiceName
        FuncMail -To &quot;to-email@domain.com&quot; -From &quot;from-mail@domain.com&quot;  -Subject &quot;Servername : ($ServiceName) service started.&quot; -Body &quot;Service $ServiceName started&quot; -smtpServer &quot;relay.mailserver.com&quot;
    }
}

function FuncMail {
    #param($strTo, $strFrom, $strSubject, $strBody, $smtpServer)
    param($To, $From, $Subject, $Body, $smtpServer)
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = $From
    $msg.To.Add($To)
    $msg.Subject = $Subject
    $msg.IsBodyHtml = 1
    $msg.Body = $Body
    $smtp.Send($msg)
}

FuncCheckService -ServiceName &quot;VMware VirtualCenter Server&quot;
</pre>
<p>Create a PS1 file and schedule it to run every 15 or 30 minutes.</p>
<p>It works great and is simple&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amikkelsen.com/?feed=rss2&amp;p=472</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	<media:rating>nonadult</media:rating></channel>
</rss>
