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

<channel>
	<title>Jonathan Medd&#039;s Blog &#187; vmware</title>
	<atom:link href="http://www.jonathanmedd.net/tag/vmware/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonathanmedd.net</link>
	<description>Scripting. Powershell, VMware, Windows, Active Directory &#38; Exchange. All that kind of stuff.....</description>
	<lastBuildDate>Wed, 21 Jul 2010 12:41:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Safely Remove Hardware Appears on HW v7 VMs</title>
		<link>http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html</link>
		<comments>http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html#comments</comments>
		<pubDate>Tue, 20 Jul 2010 11:12:14 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=1333</guid>
		<description><![CDATA[Recently I noticed an issue with some Citrix VMs which were displaying the Safely Remove Hardware option to users logged in to that server.

These VMs were on Hardware Version 7 with the latest VMware Tools installed. Both of the above hardware components were using two of the HW7 only drivers, PVSCSI and VMXNET3.  The below [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I noticed an issue with some Citrix VMs which were displaying the Safely Remove Hardware option to users logged in to that server.</p>
<p style="text-align: center;"><a rel="attachment wp-att-1334" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyremovehardware"><img class="size-full wp-image-1334 aligncenter" title="SafelyRemoveHardware" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyRemoveHardware.png" alt="SafelyRemoveHardware" width="294" height="41" /></a></p>
<p>These VMs were on Hardware Version 7 with the latest VMware Tools installed. Both of the above hardware components were using two of the HW7 only drivers, PVSCSI and VMXNET3.  The below KB article explains how to disable the HotPlug capability so that the &#8216;Safely Remove Hardware&#8217; message no longer appears in the system tray.</p>
<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1012225" target="_blank">KB article 1012225</a></p>
<p>This worked successfully on Windows Server 2003 VMs. On Windows Server 2008 VMs the message was only appearing when logged in with administrative privileges, again the KB article changes worked. <strong>(Actually they didn&#8217;t on 2008 &#8211; see below update)</strong></p>
<p>One curiosity with the KB article was that it stated this change would not work with the VMXNET3 driver, however in both Windows 2003 and 2008 it was successful. Looking back at the KB today to make this post the article seems to have been updated (July 19th) to remove this caveat and now only states the more vague:</p>
<p>&#8220;<span style="font-family: Arial; font-size: 10pt;"><strong>Note</strong>:  You can disable the HotPlug capability for PCI devices such as e1000 or  vmxnet2 NICs&#8221;</span></p>
<p><span style="font-family: Arial; font-size: 10pt;"><br />
</span></p>
<p><strong>Update:</strong> Actually the <span style="font-family: Arial; font-size: 10pt;"><span style="font-family: Courier New;">devices.hotplug = &#8220;false&#8221;</span></span> suggestion in the KB article does not seem to work on Windows Server 2008 or 2008 R2.</p>
<p>Even with the above setting applied the below is still available from &#8216;Safely Remove Hardware&#8217; in Windows Server 2008 and 2008 R2.</p>
<p><a rel="attachment wp-att-1340" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware1"><img class="aligncenter size-full wp-image-1340" title="SafelyHardware1" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware1.png" alt="SafelyHardware1" width="262" height="93" /></a></p>
<p>I thought I would test out and see what happens if you try to eject either device. Attempting to remove the disk results in the below, i.e. it won&#8217;t actually let you do it.</p>
<p><a rel="attachment wp-att-1341" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware2"><img class="aligncenter size-full wp-image-1341" title="SafelyHardware2" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware2.png" alt="SafelyHardware2" width="400" height="143" /></a></p>
<p>However, ejecting the network card sees no warning or blocking prompts and the network is consequently disconnected.</p>
<p><a rel="attachment wp-att-1342" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware3"><img class="aligncenter size-full wp-image-1342" title="SafelyHardware3" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware3.png" alt="SafelyHardware3" width="34" height="42" /></a></p>
<p>The network card is now no longer available to be removed.</p>
<p><a rel="attachment wp-att-1343" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware4"><img class="aligncenter size-full wp-image-1343" title="SafelyHardware4" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware4.png" alt="SafelyHardware4" width="265" height="67" /></a></p>
<p>Looking at the configuration of the VM you will see that the network adapater has been removed.</p>
<p><a rel="attachment wp-att-1344" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware5"><img class="aligncenter size-full wp-image-1344" title="SafelyHardware5" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware5.png" alt="SafelyHardware5" width="359" height="240" /></a></p>
<p>However, it is possible to add it back whilst powered on and the drivers are installed.</p>
<p><a rel="attachment wp-att-1345" href="http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/safelyhardware6"><img class="aligncenter size-full wp-image-1345" title="SafelyHardware6" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/SafelyHardware6.png" alt="SafelyHardware6" width="275" height="45" /></a></p>
<p>I&#8217;ll post a further update after my support ticket with VMware is answered.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/07/safely-remove-hardware-appears-on-hw-v7-vms.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 DAG Support Within Virtualised Clusters</title>
		<link>http://www.jonathanmedd.net/2010/07/exchange-2010-dag-support-within-virtualised-clusters.html</link>
		<comments>http://www.jonathanmedd.net/2010/07/exchange-2010-dag-support-within-virtualised-clusters.html#comments</comments>
		<pubDate>Mon, 05 Jul 2010 20:01:08 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=1305</guid>
		<description><![CDATA[One of the major new features within Exchange 2010 is the Database Availabilty Group (DAG). This replaces High Availability options from previous versions of Exchange such as SCR and CCR &#8211; it essentially works by having multiple copies of the same Exchange databases replicated across multiple Exchange servers.

Exchange 2010 is supported on hardware virtualisation platforms [...]]]></description>
			<content:encoded><![CDATA[<p>One of the major new features within Exchange 2010 is the <a href="http://technet.microsoft.com/en-us/library/dd979799.aspx" target="_blank">Database Availabilty Group (DAG)</a>. This replaces High Availability options from previous versions of Exchange such as <a href="http://technet.microsoft.com/en-us/library/bb676502%28EXCHG.80%29.aspx" target="_blank">SCR</a> and <a href="http://technet.microsoft.com/en-us/library/bb124521%28EXCHG.80%29.aspx" target="_blank">CCR</a> &#8211; it essentially works by having multiple copies of the same Exchange databases replicated across multiple Exchange servers.</p>
<p><a rel="attachment wp-att-1311" href="http://www.jonathanmedd.net/2010/07/exchange-2010-dag-support-within-virtualised-clusters.html/dag"><img class="aligncenter size-full wp-image-1311" title="DAG" src="http://www.jonathanmedd.net/wp-content/uploads/2010/07/DAG.gif" alt="DAG" width="450" height="176" /></a></p>
<p>Exchange 2010 is supported on hardware virtualisation platforms provided the conditions <a href="http://technet.microsoft.com/en-gb/library/aa996719.aspx" target="_blank">in this Technet article</a> are met. Whilst looking at various options for a possible Exchange 2010 deployment for a user base in the hundreds (it obviously made sense to look at what possibilities are available if deciding to virtualise the mailbox server role) I stumbled across <a href="http://www.aidanfinn.com/?p=10613" target="_blank">this blog post</a> which suggested that whilst Exchange 2010 was supported as virtual, when running a DAG it was not supported if part of a virtualised cluster.</p>
<p>Given that most people looking to deploy Exchange 2010 DAG solutions virtually, may well already have an existing cluster and do not wish to purchase standalone virtual hosts just for this solution it seemed a bit dissapointing to read that Microsoft had taken this stance. I contacted MS support to clarify exactly what was and wasn&#8217;t supported.</p>
<p>Whilst going back and forth with the support guy I read this <a href="http://technet.microsoft.com/en-us/magazine/ff772734.aspx" target="_blank">Technet Magazine Article</a> which suggested that the above stance might have changed recently and in fact a DAG would be supported within a virtualised cluster, provided that all virtualisation HA features would be disabled for the Exchange 2010 DAG VMs. This seemed to reflect the below quote from the <a href="http://technet.microsoft.com/en-gb/library/aa996719.aspx" target="_blank">virtualisation support article</a></p>
<p><strong><span>&#8220;DAGs are supported in  hardware virtualization environments provided that the &#8230;.. clustered root  servers have been configured to never failover or automatically move  mailbox servers that are members of a DAG to another root server.&#8221;</span></strong></p>
<p>Eventually they confirmed that this was correct and whilst it would be supported to deploy a DAG in a virtualised cluster with these features turned off (HA and DRS in VMware ESX) there was a strong emphasis that this would not be recommended. Exactly why it was not recommended was difficult to ascertain, the impression I got from the call was:</p>
<ul>
<li>As Aidan mentions <a href="http://www.aidanfinn.com/?p=10613" target="_blank">in his blog post</a> he speculates that it hasn&#8217;t been tested enough to be recommended yet. There was also a lot of emphasis on the call on large scale deployments and not much demand yet for testing smaller deployment scenarios.</li>
<li>Fixing VMs to particular hosts does mean that the hosts themselves become a management burden, it was mentioned that this could be a high cost.</li>
</ul>
<p>Whilst it does increase the level of management, purchasing modern physical hardware to run an Exchange 2010 DAG could mean that the servers are not highly utilised for smaller deployments &#8211; consequently the hardware cost of doing so can be comparatively high to the cost of a VM.</p>
<p>The main purpose in this deployement  to consider virtualising Exchange was hardware cost, not the HA features it could bring &#8211; Exchange itself will bring application HA.</p>
<p>The upshot of this post is essentially that an Exchange 2010 DAG in a virtualised cluster is <strong>supported</strong> by Microsoft provided the HA features are turned off, <strong>but not recommended</strong> by them. Consequently you can take that information into your design process and consider if it makes sense for your deployment.</p>
<p><strong>Update:</strong></p>
<p>If running VMware virtualisation, you must also consider that prior to vSphere 4.0 U1 running MSCS clusters within HA/DRS clusters was not supported, this changed with the release of U1. Since an Exchange 2010 DAG relies on Windows Failover Clustering then you must be on at least U1 to be supported &#8211; however, again HA / DRS must be disabled for the VMs in question. <a href="http://twitter.com/VirtualKenneth" target="_blank">Virtual Kenneth</a> has some very useful information about this in <a href="http://virtualkenneth.com/2009/11/20/vmotion-and-exchange-2010/" target="_blank">a blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/07/exchange-2010-dag-support-within-virtualised-clusters.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ESXi 4.0 Slow Boot Times When Hosting Passive MSCS Nodes With RDM LUNs</title>
		<link>http://www.jonathanmedd.net/2010/06/esxi-4-0-slow-boot-times-when-hosting-passive-mscs-nodes-with-rdm-luns.html</link>
		<comments>http://www.jonathanmedd.net/2010/06/esxi-4-0-slow-boot-times-when-hosting-passive-mscs-nodes-with-rdm-luns.html#comments</comments>
		<pubDate>Thu, 24 Jun 2010 13:27:40 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[esxi]]></category>
		<category><![CDATA[powercli]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=1268</guid>
		<description><![CDATA[During the initial stages of an upgrade of a number of VMware hosts from ESX 3.5 U5 to ESXi 4.0 U2 the boot times rose from the normal few mins (most of which is Dell Hardware checks) to around 12 mins.
In particular it was appearing to hang for 5 mins, whilst on the screen the [...]]]></description>
			<content:encoded><![CDATA[<p>During the initial stages of an upgrade of a number of VMware hosts from ESX 3.5 U5 to ESXi 4.0 U2 the boot times rose from the normal few mins (most of which is Dell Hardware checks) to around 12 mins.</p>
<p>In particular it was appearing to hang for 5 mins, whilst on the screen the below was displayed:</p>
<p><strong>Loading module multiextent</strong></p>
<p>This would only happen after the install was completed and the host connected back to the fibre channel SAN, otherwise boot times were normal. It was also fine on ESX 3.5 U5 when connected to the SAN.</p>
<p>Some research led me to the below blog post which describes that this can occur when the hosts are part of a cluster which contain Passive MSCS Nodes with RDM LUNs.</p>
<p><a href="http://www.vstable.com/tag/slow/" target="_blank">http://www.vstable.com/tag/slow/</a></p>
<p>I made the recommendation to modify the <strong>Scsi.UWConflictRetries</strong> Advanced Setting to the minimum value of 80 and the boot time dropped to around 5 mins, slighty longer than before, but much better.</p>
<p><a rel="attachment wp-att-1269" href="http://www.jonathanmedd.net/2010/06/esxi-4-0-slow-boot-times-when-hosting-passive-mscs-nodes-with-rdm-luns.html/scsiconflictretries"><img class="aligncenter size-full wp-image-1269" title="ScsiConflictRetries" src="http://www.jonathanmedd.net/wp-content/uploads/2010/06/ScsiConflictRetries.png" alt="ScsiConflictRetries" width="540" height="228" /></a></p>
<p>Of course you could also make this change in PowerCLI using the below:</p>
<pre class="brush: powershell;">

Get-VMHost test01 | Set-VMHostAdvancedConfiguration -Name  Scsi.UWConflictRetries -Value 80
</pre>
<p>Watch out because the name of the <a href="http://communities.vmware.com/thread/273722?tstart=0" target="_blank">Advanced Setting appears to be case sensitive</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/06/esxi-4-0-slow-boot-times-when-hosting-passive-mscs-nodes-with-rdm-luns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring Extended Properties in PowerCLI</title>
		<link>http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html</link>
		<comments>http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:42:03 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=1139</guid>
		<description><![CDATA[I was asked recently via Twitter how to find the CpuFeatureMask property of a VM using PowerCLI. When running a basic


Get-VM Test01

the below properties are outputted to the console:

It is possible to view more properties and values by runnning:


Get-VM Test01 &#124; Format-List *


Unfortunately this still does not reveal the CpuFeatureMask property.  However, if we pipe [...]]]></description>
			<content:encoded><![CDATA[<p>I was asked recently via Twitter how to find the <strong>CpuFeatureMask</strong> property of a VM using PowerCLI. When running a basic</p>
<pre class="brush: powershell;">

Get-VM Test01
</pre>
<p>the below properties are outputted to the console:</p>
<p><a rel="attachment wp-att-1144" href="http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/get-vm1-2"><img class="aligncenter size-full wp-image-1144" title="Get-VM1" src="http://www.jonathanmedd.net/wp-content/uploads/2010/04/Get-VM11.png" alt="Get-VM1" width="445" height="121" /></a></p>
<p>It is possible to view more properties and values by runnning:</p>
<pre class="brush: powershell;">

Get-VM Test01 | Format-List *
</pre>
<p><a rel="attachment wp-att-1146" href="http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/get-vm2-3"><img class="aligncenter size-full wp-image-1146" title="Get-VM2" src="http://www.jonathanmedd.net/wp-content/uploads/2010/04/Get-VM22.png" alt="Get-VM2" width="631" height="297" /></a></p>
<p>Unfortunately this still does not reveal the <strong>CpuFeatureMask </strong>property.  However, if we pipe the <strong>Get-VM</strong> command through to <strong>Get-View</strong> we will get back a .NET view object for the VM &#8211; by saving this into a variable we can then drill down through the various levels and look for the property we need.</p>
<pre class="brush: powershell;">

$vm = Get-VM | Get-View
$vm
</pre>
<p>Below is the top level of information which is returned:</p>
<p><a rel="attachment wp-att-1150" href="http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/get-vm3-2"><img class="aligncenter size-full wp-image-1150" title="Get-VM3" src="http://www.jonathanmedd.net/wp-content/uploads/2010/04/Get-VM31.png" alt="Get-VM3" width="556" height="313" /></a></p>
<p>This may look initially like a bewildering amount of info, however if you look at the first few entries you could treat them like categories of information. Since <strong>CpuFeatureMask </strong>is a configuration property it would seem like a good guess to try looking in the Config category:</p>
<p><a rel="attachment wp-att-1151" href="http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/get-vm4"><img class="aligncenter size-full wp-image-1151" title="Get-VM4" src="http://www.jonathanmedd.net/wp-content/uploads/2010/04/Get-VM4.png" alt="Get-VM4" width="541" height="113" /></a></p>
<p>You can essentially browse this category by entering the following</p>
<pre class="brush: powershell;">

$vm.config
</pre>
<p>and looking down the list of properties returned you will see <strong>CpuFeatureMask</strong></p>
<p><a rel="attachment wp-att-1154" href="http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/get-vm5"><img class="aligncenter size-full wp-image-1154" title="Get-VM5" src="http://www.jonathanmedd.net/wp-content/uploads/2010/04/Get-VM5.png" alt="Get-VM5" width="452" height="96" /></a></p>
<p>On this particular VM <strong>CpuFeatureMask</strong> is not set, but you get the idea. To retrieve this property for all of your VMs is a simple one liner. With <strong>Select-Object</strong> we can pick one of the standard properties <strong>Name</strong> by simply specifiying it; we can use another technique to create our own property with a label and expression for the <strong>CpuFeatureMask.</strong></p>
<pre class="brush: powershell;">

Get-VM | Get-View | Select-Object Name,@{Name=&quot;CpuFeatureMask&quot;;Expression={$_.config.CpuFeatureMask}}
</pre>
<p>You could apply a similar technique to other cmdlets like <strong>Get-Host</strong> or <strong>Get-Cluster</strong> to retrieve non-standard properties.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/04/exploring-extended-object-properties-in-powercli.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reporting on VMware Update Manager Baselines with PowerCLI</title>
		<link>http://www.jonathanmedd.net/2010/03/reporting-on-vmware-update-manager-baselines-with-powercli.html</link>
		<comments>http://www.jonathanmedd.net/2010/03/reporting-on-vmware-update-manager-baselines-with-powercli.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:21:28 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=942</guid>
		<description><![CDATA[I&#8217;ve mentioned on this blog before that I&#8217;ve been using VMware Update Manager a lot recently &#8211; and wrote about some of my experiences here. Today I was really pleased to see that Carter Shanklin&#8217;s team released some cmdlets for PowerCLI to cover Update Manager which had only previously been available back as a beta [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mentioned on this blog before that I&#8217;ve been using VMware Update Manager a lot recently &#8211; and wrote about some of my experiences <a href="http://www.simple-talk.com/sysadmin/virtualization/using-vmware-vcenter-update-manager-to-keep-your-vsphere-hosts-up-to-date-with-patching/" target="_blank">here</a>. Today I was really pleased to see that <a href="http://twitter.com/powercli" target="_blank">Carter Shanklin&#8217;s</a> team <a href="http://blogs.vmware.com/vipowershell/2010/03/now-available-powercli-cmdlets-for-vcenter-update-manager.html" target="_blank">released some cmdlets</a> for PowerCLI to cover Update Manager which had only previously been available back as a beta in the VI Toolkit days.</p>
<p>They arrived just in time because I am currently preparing for a round of ESX patching and I needed to provide a report of hotfixes I was intending to deploy for a particular version of ESX. In the Update Manager GUI I had already created my baseline and scanned it against a host to produce a compliance report of hotfixes we would need to deploy this time.</p>
<p>You can see below that it produces a nice report for me, but I needed to export that information to a format whereby I can give that information to someone else.</p>
<p><a rel="attachment wp-att-949" href="http://www.jonathanmedd.net/2010/03/reporting-on-vmware-update-manager-baselines-with-powercli.html/updatemanager1-2"><img class="aligncenter size-full wp-image-949" title="UpdateManager1" src="http://www.jonathanmedd.net/wp-content/uploads/2010/03/UpdateManager11.PNG" alt="UpdateManager1" width="568" height="273" /></a></p>
<p>One of the new cmdlets is <strong>Get-Baseline</strong>. I pointed this at my test baseline and with the code below was quickly able to get the information I needed out into a CSV file. I knew from the above report that I just needed to select any patches since 29/12/2009. One of the properties of the patches returned by Get-Baseline is the date it was published so first of all I set a date for which I could query after and stored it in the $BeginDate variable, I then queried the baseline using that date as a starting point.</p>
<pre class="brush: powershell;">

$BeginDate = (Get-Date).adddays(-65)
Get-Baseline Test | Select-Object -ExpandProperty currentpatches | Where-Object {$_.'releasedate' -gt $BeginDate} | Select-Object Name,IDByVendor,Description,@{n='Product';e={$_.product | Select-Object -expandproperty Version}},ReleaseDate | Export-Csv patches.csv -NoTypeInformation
</pre>
<p>Which produces an output like this:</p>
<p><a rel="attachment wp-att-948" href="http://www.jonathanmedd.net/2010/03/reporting-on-vmware-update-manager-baselines-with-powercli.html/updatemanager2-3"><img class="aligncenter size-full wp-image-948" title="UpdateManager2" src="http://www.jonathanmedd.net/wp-content/uploads/2010/03/UpdateManager22.PNG" alt="UpdateManager2" width="600" height="194" /></a></p>
<p>You&#8217;ll notice that I make use of the <strong>ExpandProperty</strong> parameter for <a href="http://technet.microsoft.com/en-us/library/dd315291.aspx" target="_blank">Select-Object</a> which makes it nice and easy to get to properties which are returned in an array, otherwise although they look fine in the console, when you export them to CSV you will not get what you hope for.</p>
<p>It&#8217;s days like today when I&#8217;m especially glad I started using PowerShell and very thankful that the vendors of technologies I&#8217;m using make this stuff so simple by providing cmdlets for managing their products.</p>
<p><strong>Update:</strong></p>
<p>Initially I tried to use the <strong>Get-Compliance</strong> cmdlet to find these patches rather than by date, however it only seemed to return a status of <strong>Compliant</strong> or <strong>Not Compliant</strong>. Thankfully following a <a href="http://communities.vmware.com/thread/258964?tstart=0" target="_blank">post on the communities</a> it has been pointed out that <strong>Get-Compliance</strong> has a <strong>Detailed </strong>parameter which returns a lot more information. Consequently there is no need to mess around with dates, instead you can query for <strong>NotCompliantPatches</strong>. <img src='http://www.jonathanmedd.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush: powershell;">

$ComplianceStatus = Get-Compliance -Entity 'Server1' -Detailed
$ComplianceStatus.NotCompliantPatches | Select-Object Name,IDByVendor,Description,@{n='Product';e={$_.product | Select-Object -expandproperty Version}},ReleaseDate | Export-Csv patches.csv -NoTypeInformation
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/03/reporting-on-vmware-update-manager-baselines-with-powercli.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bug in Cluster mem.usage.average Statistic in vSphere 4.0 U1</title>
		<link>http://www.jonathanmedd.net/2010/02/bug-in-cluster-mem-usage-average-statistic-in-vsphere-4-0-u1.html</link>
		<comments>http://www.jonathanmedd.net/2010/02/bug-in-cluster-mem-usage-average-statistic-in-vsphere-4-0-u1.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:36:25 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=890</guid>
		<description><![CDATA[A while back I posted a script on a basic capacity report I run each month to get an overview of CPU and Memory usage in our various clusters. Since upgrading to vSphere 4.0 U1 I noticed some strange behavior in the results for memory, i.e. they came back at pretty close to 0% (typically [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I <a href="http://www.jonathanmedd.net/2009/09/average-cpu-and-memory-use-per-host-per-cluster.html" target="_blank">posted a script on a basic capacity report</a> I run each month to get an overview of CPU and Memory usage in our various clusters. Since upgrading to vSphere 4.0 U1 I noticed some strange behavior in the results for memory, i.e. they came back at pretty close to 0% (typically between 0.05 and 0.06%) for the average memory usage in a cluster which typically were quite heavily used. On investigating further this also appeared the same in the GUI.</p>
<p>Using Get-Stat, mem.usage.average comes back at 0% where it should be a significant value:</p>
<p><a rel="attachment wp-att-898" href="http://www.jonathanmedd.net/2010/02/bug-in-cluster-mem-usage-average-statistic-in-vsphere-4-0-u1.html/memusageaverage1-2"><img class="aligncenter size-full wp-image-898" title="memusageaverage1" src="http://www.jonathanmedd.net/wp-content/uploads/2010/02/memusageaverage11.PNG" alt="memusageaverage1" width="568" height="144" /></a></p>
<p>The same in the GUI, the other cluster memory stats have significant values, but Memory Usage Average flatlines along the bottom of the graph:</p>
<p><a rel="attachment wp-att-895" href="http://www.jonathanmedd.net/2010/02/bug-in-cluster-mem-usage-average-statistic-in-vsphere-4-0-u1.html/memusageaverage2-2"><img class="aligncenter size-full wp-image-895" title="memusageaverage2" src="http://www.jonathanmedd.net/wp-content/uploads/2010/02/memusageaverage21.PNG" alt="memusageaverage2" width="630" height="400" /></a></p>
<p>This stat shows normal behaviour against host machines. I reported it to VMware who confirmed it to be a bug in 4.0 U1.</p>
<p>Thought I would share in case anyone else spends some time scratching their head and checking maths in scripts like I did. I&#8217;ll post back when there is a fix.</p>
<p><strong>Update 19/05/2010:</strong></p>
<p>Just got a follow up email from VMware Support that this bug will be fixed in VC 4.0 U3 &#8211; no release date for that yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/02/bug-in-cluster-mem-usage-average-statistic-in-vsphere-4-0-u1.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Simple Talk Article &#8211; Using VMware vCenter Update Manager to keep your vSphere Hosts Up-To-Date with Patching</title>
		<link>http://www.jonathanmedd.net/2010/02/new-simple-talk-article-using-vmware-vcenter-update-manager-to-keep-your-vsphere-hosts-up-to-date-with-patching.html</link>
		<comments>http://www.jonathanmedd.net/2010/02/new-simple-talk-article-using-vmware-vcenter-update-manager-to-keep-your-vsphere-hosts-up-to-date-with-patching.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:05:27 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=835</guid>
		<description><![CDATA[I&#8217;m pretty obsessive about patching systems whatever the OS; keeping servers up-to-date and consistent across your environment is very important. VMware ship a great tool vCenter Update Manager to help you with this task for ESX / ESXi systems &#8211; you can find out more about it in a new article I have written for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty obsessive about patching systems whatever the OS; keeping servers up-to-date and consistent across your environment is very important. VMware ship a great tool vCenter Update Manager to help you with this task for ESX / ESXi systems &#8211; you can find out more about it in a <a href="http://www.simple-talk.com/sysadmin/virtualization/using-vmware-vcenter-update-manager-to-keep-your-vsphere-hosts-up-to-date-with-patching/" target="_blank">new article</a> I have written for Simple-Talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2010/02/new-simple-talk-article-using-vmware-vcenter-update-manager-to-keep-your-vsphere-hosts-up-to-date-with-patching.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slide Deck from Nov 2009 London VMUG</title>
		<link>http://www.jonathanmedd.net/2009/11/slide-deck-from-london-vmug.html</link>
		<comments>http://www.jonathanmedd.net/2009/11/slide-deck-from-london-vmug.html#comments</comments>
		<pubDate>Wed, 25 Nov 2009 12:25:20 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[user group]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=303</guid>
		<description><![CDATA[After my PowerCLI session at yesterday&#8217;s London VMUG a few people asked me for the content. I believe the content from all sessions will soon be posted to http://www.box.net/londonug, but in the meantime you can get my slides from the below link.
PowerCLI Workshop London VMUG.pptx
Thanks to all who chatted to me afterwards, its always nice [...]]]></description>
			<content:encoded><![CDATA[<p>After my PowerCLI session at yesterday&#8217;s London VMUG a few people asked me for the content. I believe the content from all sessions will soon be posted to <a href="http://www.box.net/londonug" target="_blank">http://www.box.net/londonug</a>, but in the meantime you can get my slides from the below link.</p>
<p><a href="http://www.jonathanmedd.net/wp-content/uploads/2009/11/PowerCLI-Workshop-London-VMUG.pptx" target="_blank">PowerCLI Workshop London VMUG.pptx</a></p>
<p>Thanks to all who chatted to me afterwards, its always nice to know that someone got something out of a session you put on.</p>
<div style="width:425px;text-align:left" id="__ss_2581625"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/jonathanmedd/power-cli-workshop-london-vmug" title="Power Cli Workshop London Vmug">Power Cli Workshop London Vmug</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=powercli-workshop-london-vmug-091125065356-phpapp02&#038;rel=0&#038;stripped_title=power-cli-workshop-london-vmug" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=powercli-workshop-london-vmug-091125065356-phpapp02&#038;rel=0&#038;stripped_title=power-cli-workshop-london-vmug" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/jonathanmedd">jonathanmedd</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2009/11/slide-deck-from-london-vmug.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vSphere 4.0 Quick Start Guide &#8211; Now Available From Amazon</title>
		<link>http://www.jonathanmedd.net/2009/11/vsphere-4-0-quick-start-guide-now-available-from-amazon.html</link>
		<comments>http://www.jonathanmedd.net/2009/11/vsphere-4-0-quick-start-guide-now-available-from-amazon.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 12:30:15 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=295</guid>
		<description><![CDATA[I recieved a preview copy of the vSphere 4.0 Quick Start Guide a few weeks back from my good friend and PowerCLI expert Alan Renouf . It is a great read and because of its size is really handy fo carrying around and referring to without needing to lug a 700 page book around with [...]]]></description>
			<content:encoded><![CDATA[<p>I recieved a preview copy of the vSphere 4.0 Quick Start Guide a few weeks back from my good friend and PowerCLI expert <a href="http://www.virtu-al.net/" target="_blank">Alan Renouf</a> . It is a great read and because of its size is really handy fo carrying around and referring to without needing to lug a 700 page book around with you. (Having said that I do currently have <a href="http://www.amazon.co.uk/Mastering-VMware-VSphere-Scott-Lowe/dp/0470481382" target="_blank">Scott Lowe&#8217;s Mastering vSphere</a> in my bag at the moment!)</p>
<p>Alan is a contributor to the book and has provided examples of PowerCLI throughout to accompany various sections.</p>
<p>The final release of the book is now available from <a href="http://www.amazon.com/vSphere-Quick-Start-Guide-Virtualization/dp/1439263450/ref=sr_1_18?ie=UTF8&amp;s=books&amp;qid=1258967735&amp;sr=8-18" target="_blank">Amazon.com</a>.</p>
<p><a rel="attachment wp-att-298" href="http://www.jonathanmedd.net/2009/11/vsphere-4-0-quick-start-guide-now-available-from-amazon.html/vspherequickstartguid"><img class="aligncenter size-full wp-image-298" title="vSphereQuickStartGuid" src="http://www.jonathanmedd.net/wp-content/uploads/2009/11/vSphereQuickStartGuid.png" alt="vSphereQuickStartGuid" width="307" height="508" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2009/11/vsphere-4-0-quick-start-guide-now-available-from-amazon.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extending the System Disk in Windows Server 2008</title>
		<link>http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html</link>
		<comments>http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html#comments</comments>
		<pubDate>Wed, 11 Nov 2009 18:51:51 +0000</pubDate>
		<dc:creator>Jonathan Medd</dc:creator>
				<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=228</guid>
		<description><![CDATA[As a system administrator it is often not the latest and greatest big new features of a new operating system which you end up finding the most useful, sometimes its the small improvements which really make your life easier. I&#8217;ve been spending a lot more time with Windows Server 2008 recently (OK, I know R2 [...]]]></description>
			<content:encoded><![CDATA[<p>As a system administrator it is often not the latest and greatest big new features of a new operating system which you end up finding the most useful, sometimes its the small improvements which really make your life easier. I&#8217;ve been spending a lot more time with Windows Server 2008 recently (OK, I know R2 is out, but it takes time for large organisations to move away from older OS&#8217;s and applications.)</p>
<p>Obviously there are great new headline features with things like Server Core and Read-Only Domain Controllers, but I have found a new feature I love which is the abilty to extend a system disk without having to go through some kind of convoluted process. It is particularly easy if it is a VM and you have enough space on the existing datastore to extend the VM&#8217;s disk without requesting more storage from your SAN team.</p>
<p>In VSphere 4.0 it even lets me extend the size of the vmdk with the server powered on, I don&#8217;t remember that being possible in 3.5, but I might be wrong. The big advantage for this for me is the fact that you do not need downtime to carry out this whole process, either extending the vmdk or the system volume!</p>
<p><strong>Update:</strong> I just read in <a href="http://blog.scottlowe.org/2009/08/18/mastering-vmware-vsphere-4-is-out/" target="_blank">Mastering vSphere by Scott Lowe</a> that the above is a new feature in vSphere 4.0 and the VM is required to be hardware version 7.</p>
<p>Take the following steps to carry it out:</p>
<p>1) Edit the settings of the 2008 VM and increase the size of the disk.</p>
<p>2) Within the Disk Management MMC, kick off a &#8216;Rescan Disks&#8217;</p>
<p><a rel="attachment wp-att-229" href="http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html/rescan"><img class="aligncenter size-medium wp-image-229" title="Rescan" src="http://www.jonathanmedd.net/wp-content/uploads/2009/11/Rescan-300x132.png" alt="Rescan" width="300" height="132" /></a></p>
<p>3) You will now see the additional space available at the end of the current disk.</p>
<p><a rel="attachment wp-att-230" href="http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html/extra2gb"><img class="aligncenter size-medium wp-image-230" title="Extra2GB" src="http://www.jonathanmedd.net/wp-content/uploads/2009/11/Extra2GB-300x40.png" alt="Extra2GB" width="300" height="40" /></a></p>
<p>4) Right-click the C: drive and choose &#8216;Extend Volume&#8217;</p>
<p><a rel="attachment wp-att-231" href="http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html/extend-volume"><img class="aligncenter size-medium wp-image-231" title="Extend Volume" src="http://www.jonathanmedd.net/wp-content/uploads/2009/11/Extend-Volume-300x150.png" alt="Extend Volume" width="300" height="150" /></a></p>
<p>5) Follow the wizard through to add the additonal space. On completion your system disk will now have the additional space added &#8211; all with no downtime!</p>
<p><a rel="attachment wp-att-232" href="http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html/17gb"><img class="aligncenter size-medium wp-image-232" title="17GB" src="http://www.jonathanmedd.net/wp-content/uploads/2009/11/17GB-300x38.png" alt="17GB" width="300" height="38" /></a></p>
<p>For completeness there are a number of ways you could do this in Window Server 2003, the way I have typically used is the following. (Make sure you have a good backup of this VM before going ahead)</p>
<p>1) Power down the VM. Edit the settings of the VM to grow the VMDK. Do not power on the VM!</p>
<p>2) Find another Windows Server 2003 VM which is Powered On and has access to the same datastores. Edit the settings of the VM, add an additional hard disk, select the option to use an existing virtual disk, browse to the initial VM&#8217;s vmdk and select it.</p>
<p>3) In Disk Management Rescan the disks and you will see an additional drive with unallocated space available other than your current drives.</p>
<p>4) Use the command line utility <strong>diskpart </strong>to extend this drive.</p>
<ul>
<li>Enter <strong>diskpart</strong> to start</li>
<li><strong>List Volume</strong> will show available volumes on the machine</li>
<li>Check the additional volume has not been listed as a<strong> System</strong> partition</li>
<li>Select that volume with <strong>Select Volume <em>volumenumber</em></strong></li>
<li>Enter <strong>Extend</strong> to increase the size of the drive with all available space</li>
<li><strong>List Volume</strong> will let you check it was successful</li>
<li><strong>Exit</strong> to finish</li>
</ul>
<p>Go back into Disk Management and you should be able to see a larger drive.</p>
<p>5) Edit the settings of the VM and remove the additional disk &#8211; make sure you do not select the option to delete the files from disk!</p>
<p>6) Power the initial VM back on. After logging back in the first time you will most likely be prompted to restart the server. Once logged back in, check Disk Management to see the larger system disk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonathanmedd.net/2009/11/extending-the-system-disk-in-windows-server-2008.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
