<?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; DVS</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=dvs" 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>
		<item>
		<title>vSphere 5.1 sans le webclient : DVS Rollback &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=4240</link>
		<comments>http://www.hypervisor.fr/?p=4240#comments</comments>
		<pubDate>Sun, 30 Sep 2012 23:44:57 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Kb]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[DVS]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[vSwitch]]></category>
		<category><![CDATA[webclient]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4240</guid>
		<description><![CDATA[MAJ 27.02.2013 : PowerCLI 5.1 R2 contient 2 nouvelles cmdlet permettant l&#8217;export des des distributed switch/portgroup dans un fichier.
Depuis leur apparition dans vSphere 4.0 en 2009 et jusqu&#8217;à aujourd&#8217;hui (malgré les nouvelles features exclusives), nous avons considéré les distributed switch comme des SPOF. L&#8217;idée de départ est très bonne mais la dépendance au vcenter nous paraissait trop [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 27.02.2013</span> : <a href="http://blogs.vmware.com/vipowershell/2013/02/powercli-5-1-release-2-now-available.html" target="_blank">PowerCLI 5.1 R2 contient 2 nouvelles cmdlet permettant l&#8217;export des des distributed switch/portgroup dans un fichier</a>.</em></p>
<p style="text-align: justify;">Depuis leur apparition dans vSphere 4.0 en 2009 et jusqu&#8217;à aujourd&#8217;hui (malgré les nouvelles features exclusives), nous avons considéré les distributed switch comme des <a href="http://en.wikipedia.org/wiki/Single_point_of_failure" target="_blank">SPOF</a>. L&#8217;idée de départ est très bonne mais la dépendance au vcenter nous paraissait trop importante, il était possible de lancer des actions irréversibles (sur le management network en particulier), de nombreuses kb vmware ont fait état de bugs assez gênant (<a href="http://kb.vmware.com/kb/1017558" target="_blank">surtout pour la v4.x</a>) et nous avons toujours été inquiet de ne pouvoir presque rien faire en direct sur un ESXi en cas de problème réseau. VMware admet même le pire scénario (<a href="http://www.hypervizor.com/diags/HyperViZor-Diags-vSphere-on-IBM-BCH-v2-0.pdf" target="_blank">qui poussait les plus prudents d&#8217;entre nous à mixer standard/distributed</a> lorsque le nombre de nic le permettait) dans  le &#8220;<a href="http://www.vmware.com/files/pdf/techpaper/Whats-New-VMware-vSphere-51-Network-Technical-Whitepaper.pdf" target="_blank">What’s New in vSphere 5.1 – Networking</a>&#8221; :</p>
<blockquote>
<p style="text-align: justify;">However, in the VDS environment, where multiple hosts are connected to a distributed switch, any network failure or misconfiguration of the management port group can potentially disconnect all hosts from the vCenter Server system.<br />
[...]<br />
In vSphere 5.0, the only way for the user to recover from this situation is by <strong>going to individual hosts and building a VSS with a proper management network configuration</strong>.</p>
</blockquote>
<p style="text-align: justify;"><span style="text-align: justify;"><strong><strong>vSphere 5.1 apporte, en plus d&#8217;une certaine maturité, toutes les fonctionnalités qui manquaient à DVS</strong></strong>. L&#8217;une d&#8217;entre elles, nommé </span><a style="text-align: justify;" href="http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.networking.doc/GUID-88B9F893-9739-47DF-9F1B-BAF139E554D6.html" target="_blank"><strong>Host Networking Rollback</strong></a><span style="text-align: justify;">, fera certainement changer d&#8217;avis les plus réticents (y compris nous-même). Pour faire court, cette feature </span><strong><strong>&#8220;déjoue&#8221; automatiquement la dernière reconfiguration du stack réseau (standard ou distributed) qui aboutie à une déconnexion du vCenter :</strong></strong></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/rollback/host_rollback.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/host_rollback.png" alt="" width="466" height="58" /></a></p>
<p style="text-align: justify;">Tout à fait logiquement, lorsque les ESXi recontactent le vCenter, le distributed switch annonce un &#8220;out of sync&#8221; du au rollback :</p>
<p style="text-align: justify;"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/dvswitch_out_of_sync.png" alt="" width="341" height="99" /></p>
<p style="text-align: justify;">C&#8217;est là qu&#8217;une autre nouvelle feature (le <strong>Distributed Switch Rollback</strong>) rentre en scène et permet de restaurer la précédente configuration d&#8217;un distributed switch ou distributed portgroup. Attention, <a href="http://pubs.vmware.com/vsphere-51/topic/com.vmware.wssdk.apiref.doc/vim.dvs.DistributedVirtualPortgroup.html" target="_blank">en cas de restart du vCenter, la dernière configuration est perdue</a>.</p>
<blockquote>
<p style="text-align: justify;">When you use a VMware distributed virtual switch, each time you reconfigure the switch, the Server saves the switch configuration before applying the updates. <strong>If the vCenter Server is restarted, the saved configuration is not preserved</strong> and the method does not return a configuration specification.</p>
</blockquote>
<p style="text-align: justify;">Cette fonctionnalité n&#8217;étant accessible qu&#8217;avec le webclient, voici comment procéder en PowerCLI :</p>
<pre class="brush: powershell; title: ; notranslate">(Get-VirtualPortGroup -Name TargetdvPortGroup|get-view).ReconfigureDVPortgroup($(Get-VirtualPortGroup -Name TargetdvPortGroup|get-view).DVPortgroupRollback($()))</pre>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/rollback/dvportgroup_rollback.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/dvportgroup_rollback.png" alt="" width="500" height="29" /></a></p>
<pre class="brush: powershell; title: ; notranslate">(Get-VirtualSwitch -name TargetDistributedVirtualSwitch|get-view).ReconfigureDvs((Get-VirtualSwitch -name TargetDistributedVirtualSwitch|get-view).DVSRollback($()))</pre>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/rollback/dvswitch_rollback.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/dvswitch_rollback.png" alt="" width="500" height="30" /></a></p>
<p style="text-align: justify;">Cette dernière action n&#8217;est d&#8217;ailleurs même pas possible en GUI, à moins d&#8217;avoir exporté la configuration du DVS dans un fichier.</p>
<p style="text-align: justify;">Bonus : nous vous avons concocté un petit onliner pour créer <strong>une alarme afin d’être averti en cas rollback automatique sur les ESXi</strong> attachés à un distributed switch :</p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/dvswitch_rollback_alarm.png" alt="" width="340" height="43" /></p>
<pre class="brush: powershell; title: ; notranslate">(Get-View AlarmManager).CreateAlarm((Get-Folder -NoRecursion |Get-View).MoRef,(New-Object VMware.Vim.AlarmSpec -Property @{Name = &quot;vSphere Distributed Switch Rollback Event&quot;;Description = &quot;Custom alarm to monitor vim.event.RollbackEvent Event&quot;;Enabled = $true;expression = (New-Object VMware.Vim.OrAlarmExpression -Property @{expression = @((New-Object VMware.Vim.EventAlarmExpression -Property @{eventType = &quot;EventEx&quot;;EventTypeId = &quot;vim.event.RollbackEvent&quot;;objectType = &quot;HostSystem&quot;;status = &quot;yellow&quot;});)});Action=(New-Object VMware.Vim.GroupAlarmAction -Property @{Action= (New-Object VMware.Vim.AlarmTriggeringAction -Property @{Action = (New-Object VMware.Vim.SendEmailAction -Property @{ToList = &quot;admin@vmare.local&quot;;Subject = &quot;[vAlarm] {targetName} NetworkRollback Event - {newStatus}&quot;;CcList = &quot;&quot;;Body = &quot;&quot;});TransitionSpecs = @((New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec -Property @{StartState = &quot;green&quot;;FinalState = &quot;yellow&quot;;Repeats = $false}))})});ActionFrequency = &quot;1800&quot;}))</pre>
<p style="text-align: justify;"><span style="text-decoration: line-through;">Nous n&#8217;avons pas encore trouvé une solution correcte pour exporter la configuration des distributed switch/portgroup dans un fichier (le web client renvois un zip <a href="http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html" target="_blank">ressemblant à un vib</a>), n’hésitez pas à nous remonter vos idées et/ou réactions sur le sujet.</span></p>
<p style="text-align: justify;">Pour finir, il est maintenant possible de reconfigurer &#8220;automatiquement&#8221; la partie management network (standard ou distributed) via la DCUI :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/rollback/host_net_reset.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/host_net_reset.png" alt="" width="492" height="74" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/rollback/host_net_reset_dvs.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/rollback/host_net_reset_dvs.png" alt="" width="493" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4240</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>vSphere 5.1 sans le webclient : DVS Health Check</title>
		<link>http://www.hypervisor.fr/?p=4229</link>
		<comments>http://www.hypervisor.fr/?p=4229#comments</comments>
		<pubDate>Wed, 26 Sep 2012 22:17:00 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[DVS]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[webclient]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4229</guid>
		<description><![CDATA[Autre fonctionnalité intéressante réservée au Web Client, DVS Health Check permet de remonter les erreurs de config de VLAN, MTU et teaming policy. Voici comment activer le &#8220;VlanMtuHealthCheck&#8221; et le &#8220;TeamingHealthCheck&#8221; en PowerCLI sur tous vos DVS où l&#8217;un des 2 checks ne serait pas actif :
Get-View -ViewType DistributedVirtualSwitch&#124;?{($_.config.HealthCheckConfig&#124;?{$_.enable -notmatch &#34;true&#34;})}&#124;%{$_.UpdateDVSHealthCheckConfig(@((new-object Vmware.Vim.VMwareDVSVlanMtuHealthCheckConfig -property @{enable=1;interval=&#34;1&#34;}),(new-object Vmware.Vim.VMwareDVSTeamingHealthCheckConfig -property @{enable=1;interval=&#34;1&#34;})))}
Pour les admins [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Autre fonctionnalité intéressante réservée au Web Client, <a href="http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.networking.doc/GUID-4A6C1E1C-8577-4AE6-8459-EEB942779A82.html" target="_blank">DVS Health Check permet de remonter les erreurs de config de VLAN, MTU et teaming policy</a>. Voici comment activer le &#8220;VlanMtuHealthCheck&#8221; et le &#8220;TeamingHealthCheck&#8221; en PowerCLI sur tous vos DVS où l&#8217;un des 2 checks ne serait pas actif :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType DistributedVirtualSwitch|?{($_.config.HealthCheckConfig|?{$_.enable -notmatch &quot;true&quot;})}|%{$_.UpdateDVSHealthCheckConfig(@((new-object Vmware.Vim.VMwareDVSVlanMtuHealthCheckConfig -property @{enable=1;interval=&quot;1&quot;}),(new-object Vmware.Vim.VMwareDVSTeamingHealthCheckConfig -property @{enable=1;interval=&quot;1&quot;})))}</pre>
<p>Pour les admins qui aiment bien &#8220;aller voir si tout va bien ou pas&#8221;, il n&#8217;y a que le Web Client :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/web_client_dvs_health_check.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/web_client_dvs_health_check.png" alt="" width="487" height="232" /></a></p>
<p style="text-align: left;">Et pour les autres, il y a les alarmes (par défaut) :</p>
<p style="text-align: left;"><img class="aligncenter" src="http://files.hypervisor.fr/img/vi_client_dvs_health_check.png" alt="" width="528" height="91" /></p>
<p style="text-align: left;">Bonus, vous pouvez changer l’intervalle par défaut (en minutes). Impossible en GUI <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4229</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
