<?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; vSwitch</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=vswitch" 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>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>les secrets de Network Failover Detection &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=2057</link>
		<comments>http://www.hypervisor.fr/?p=2057#comments</comments>
		<pubDate>Wed, 12 May 2010 08:52:18 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vSwitch]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2057</guid>
		<description><![CDATA[MAJ 12/05/2010 : Luc nous informe que ces paramètres sont disponible dans le SDK, il y a d&#8217;ailleurs dédié un post que nous avions raté.

En GUI, seuls &#8220;Link Status only&#8221; et Beacon Probing&#8221; ne sont disponibles pour le Failover des vSwitch et Port Group :

Ces 2 méthodes peuvent suffire dans la majorité des cas mais [...]]]></description>
			<content:encoded><![CDATA[<p><em><span style="color: #ff0000;">MAJ 12/05/2010</span> : Luc nous informe que ces paramètres sont disponible dans le SDK, <a href="http://www.lucd.info/2009/09/09/ta2650-scripts-part-4-nic-teaming-hidden-failure-criteria/" target="_blank">il y a d&#8217;ailleurs dédié un post que nous avions raté</a>.<br />
</em></p>
<p>En GUI, seuls &#8220;Link Status only&#8221; et Beacon Probing&#8221; ne sont disponibles pour le Failover des vSwitch et Port Group :</p>
<p><a href="http://www.hypervisor.fr/wp-content/uploads/2010/05/NFD.jpg" title="NFD" rel="lightbox[2057]"><img class="aligncenter size-medium wp-image-2058" title="NFD" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/NFD-300x108.jpg" alt="NFD" width="300" height="108" /></a></p>
<p>Ces 2 méthodes peuvent suffire dans la majorité des cas mais il existe d&#8217;autres paramètres disponibles en CLI uniquement :</p>
<blockquote><p>checkSpeed = &#8220;minimum&#8221;<br />
speed = 10<br />
checkDuplex = false<br />
fullDuplex = false<br />
checkErrorPercent = false<br />
percentage = 0</p></blockquote>
<p style="text-align: justify;"><strong>Il est donc possible d&#8217;exclure un uplink en fonction de sa vitesse, de son duplex et du pourcentage d&#8217;erreur CRC</strong>, ce qui peut être une excellente protection contre les mauvaises manipulations sur les switchs et contre les problèmes de câblage. Petite démo :</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2062" title="esxtop_10" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/esxtop_10.jpg" alt="esxtop_10" width="214" height="266" />Extrait d&#8217;esxtop sur un ESXi, 3 uplinks sur le vSwitch dont 1 en 100 half (les 2 autres en 1000 full)</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2069" title="vcenter_1000" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/vcenter_1000.jpg" alt="vcenter_1000" width="425" height="310" />Vue du vSwitch0 en GUI</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2063" title="esxtop_1000" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/esxtop_1000.jpg" alt="esxtop_1000" width="217" height="255" />Résultat après la commande &#8220;<strong>vim-cmd hostsvc/net/vswitch_setpolicy &#8211;failurecriteria-speed=1000 vSwitch0</strong>&#8221; qui a exclu le lien en 100 half</p>
<p style="text-align: left;">Suivi d&#8217;un warning dans le vCenter :</p>
<blockquote>
<p style="text-align: left;">Uplink redundancy degraded on virtual switch &#8220;vSwitch0&#8243;. Physical NIC vmnic1 is down. 2 uplinks still up.</p>
</blockquote>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2010/05/vcenter_warning.jpg" title="vcenter_warning" rel="lightbox[2057]"><img class="aligncenter size-full wp-image-2070" title="vcenter_warning" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/vcenter_warning.jpg" alt="vcenter_warning" width="507" height="40" /></a></p>
<p style="text-align: left;"><span style="text-decoration: line-through;">Dommage que ces paramètres ne soit pas disponible en PowerCLI <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=2057</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
