<?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>Hypervisor.fr &#187; DVSwitch</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=dvswitch" rel="self" type="application/rss+xml" />
	<link>http://www.hypervisor.fr</link>
	<description>French Bare-Metal weblog</description>
	<lastBuildDate>Wed, 26 Jun 2024 22:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The vExpendables</title>
		<link>http://www.hypervisor.fr/?p=4633</link>
		<comments>http://www.hypervisor.fr/?p=4633#comments</comments>
		<pubDate>Fri, 29 Mar 2013 08:23:29 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[DVS]]></category>
		<category><![CDATA[DVSwitch]]></category>
		<category><![CDATA[oneliner]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4633</guid>
		<description><![CDATA[C&#8217;est le tweet de Arne Fokkema qui nous a fais découvrir une feature de DVS 5.0+ qui ne semble pas très connue, l&#8217;autoExpand. Comme son nom le laisse deviner, cette fonctionnalité relègue au placard tous les scripts de check de ports encore disponibles que vous passiez jadis sur votre infra pour ne pas vous retrouver en rade [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">C&#8217;est <a href="https://twitter.com/afokkema/status/315107918443864064" target="_blank">le tweet de Arne Fokkema</a> qui nous a fais découvrir une feature de DVS 5.0+ qui ne semble pas très connue, l&#8217;<a href="http://blogs.vmware.com/vsphere/2012/02/automating-auto-expand-configuration-for-a-dvportgroup-in-vsphere-5.html" target="_blank"><strong>autoExpand</strong></a>. Comme son nom le laisse deviner, cette fonctionnalité relègue au placard tous les scripts de check de ports encore disponibles que vous passiez jadis sur votre infra pour ne pas vous retrouver en rade au prochain déploiement de VM.</p>
<p style="text-align: justify;">En effet, après avoir activé l&#8217;autoExpand, le nombre de ports utilisables d&#8217;un DVPortgroup (en Static binding aka <a href="http://vijava.sourceforge.net/vSphereAPIDoc/ver51/ReferenceGuide/vim.dvs.DistributedVirtualPortgroup.PortgroupType.html" target="_blank">earlyBinding</a>) se verra incrémenté automatiquement de 10 lorsqu&#8217;aucun port n&#8217;est disponible pour une nouvelle VM. Il y a également une fonction d&#8217;autoShrink décrite dans l&#8217;API Reference mais c&#8217;est une peu vague :</p>
<blockquote>
<p style="text-align: justify;">When this property is set to true, the portgroup becomes a potential candidate for auto-shrink. Once the portgroup has auto-expanded then its disconnected ports are likely to be deleted automatically, as a part of auto-shrink step, <strong>if there are more than certain number of free ports</strong>. If the portgroup never auto-expanded, then it will never lose any free ports.</p>
</blockquote>
<p style="text-align: justify;">Sachant que cette fonction est activé par défaut sur les DVSwitch 5.1, nous avons voulu vérifier si c&#8217;était également le cas lors d&#8217;une migration :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/dvpg50_autoexpand.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/dvpg50_autoexpand.png" alt="" width="516" height="348" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/dvpg50_autoexpand_up.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/dvpg50_autoexpand_up.png" alt="" width="516" height="329" /></a></p>
<p style="text-align: left;">On constate donc que même <strong>après avoir upgradé le DVSwitch 5.0.0 en 5.1.0, l&#8217;autoExpand est toujours désactivé</strong>. Mais pas pour longtemps <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: justify;">Après analyse du script PowerCLI d&#8217;Arne et de l&#8217;API Reference, nous avons constaté que les DVUplinks &#8220;disposaient&#8221; de cette fonctionnalité (<strong>désactivée dans tous les cas et à ne probablement pas activer</strong>) car comme nous le confirme <a href="http://www.doublecloud.org/2011/06/tagging-an-invisible-feature-in-vsphere/" target="_blank">Steve Jin, ce ne sont que des DVPortgroup avec un tag spécifique</a> (SYSTEM/DVS.UPLINKPG). De plus, lors de la reconfiguration du DVPortgroup, la propriété <a href="http://vijava.sourceforge.net/vSphereAPIDoc/ver51/ReferenceGuide/vim.dvs.DistributedVirtualPortgroup.ConfigInfo.html#configVersion" target="_blank">configVersion</a> devrait être incrémentée. Et pour finir, en onliner c&#8217;est plus sexy :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType DistributedVirtualPortgroup|?{!($_.Tag|?{$_.Key -eq &quot;SYSTEM/DVS.UPLINKPG&quot;}) -and !$_.Config.autoExpand}|%{$_.ReconfigureDVPortgroup_Task((New-Object VMware.Vim.DVPortgroupConfigSpec -Property @{autoExpand=&quot;True&quot;;ConfigVersion=[int32]$_.Config.ConfigVersion+1}))}</pre>
<p><strong>Le script n&#8217;active la fonctionnalité que sur les DVPortgroup ne l&#8217;ayant pas déjà (hors DVUplinks) et incrémente la propriété ConfigVersion de 1</strong> :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/dvpg50_autoexpand_ex.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/dvpg50_autoexpand_ex.png" alt="" width="516" height="475" /></a></p>
<p style="text-align: left;">Et pour ceux qui voudraient savoir quand de nouveaux ports ont été ajoutés ou supprimés, il y a une alarme pour ça (<em>Monitor : vSphere Distributed Swiches</em>) :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/dvpg50_autoexpand_alarm.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/dvpg50_autoexpand_alarm.png" alt="" width="523" height="340" /></a></p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4633</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
