<?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; SVMotion</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=svmotion" 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>Dual vSAN Datastores</title>
		<link>http://www.hypervisor.fr/?p=5949</link>
		<comments>http://www.hypervisor.fr/?p=5949#comments</comments>
		<pubDate>Thu, 15 Apr 2021 19:24:23 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[VSAN]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[SVMotion]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5949</guid>
		<description><![CDATA[MAJ 30/07/2021 : Sur vSphere 7.0 U2 il est nécessaire de préciser l&#8217;UUID du cluster vSAN dans la commande, très probablement pour le fonctionnement d&#8217;HCI mesh :

Datastore UUID is required when a cluster UUID is specified


Get-VMHost&#124;%{($_&#124;get-esxcli).vsan.datastore.add($null, &#34;vsanDatastore2&#34;, &#34;11111111-1111-1111-1111-111111111111&#34;)}
En utilisant $null pour la propriété ClusterUUID, ca passe crème.
MAJ 18/05/2021 : On me signale dans l&#8217;oreillette que [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;"><strong>MAJ 30/07/2021</strong></span> : Sur vSphere 7.0 U2 il est nécessaire de préciser l&#8217;UUID du cluster vSAN dans la commande, très probablement pour le fonctionnement d&#8217;HCI mesh :</em></p>
<blockquote>
<p style="text-align: justify;">Datastore UUID is required when a cluster UUID is specified</p>
</blockquote>
<p style="text-align: center;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/dual_vsan_vsp7U2.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/dual_vsan_vsp7U2.png" alt="" width="549" height="500" /></a></p>
<pre class="brush: powershell; title: ; notranslate">Get-VMHost|%{($_|get-esxcli).vsan.datastore.add($null, &quot;vsanDatastore2&quot;, &quot;11111111-1111-1111-1111-111111111111&quot;)}</pre>
<p style="text-align: justify;">En utilisant $null pour la propriété ClusterUUID, ca passe crème.</p>
<p style="text-align: justify;"><em><span style="color: #ff0000;"><strong>MAJ 18/05/2021</strong></span> : On me signale dans l&#8217;oreillette que <strong>VMware supporterai officiellement cette méthode</strong> :</em></p>
<blockquote>
<p style="text-align: justify;"><em>Engineering have advised that the procedure you are carrying out is applicable to your specific need and is considered supported from us</em></p>
</blockquote>
<p style="text-align: justify;">Tous les admin VMware le savent, <strong>après renommage d&#8217;une VM</strong> il convient de faire un petit <strong>Storage vMotion</strong> (<a href="https://kb.vmware.com/s/article/1009113" target="_blank">aka d-motion pour les boomers</a>) pour &#8220;propager&#8221; le nouveau nom aux fichiers de la VM en question. Et pour ceux qui l&#8217;ignorait encore, <a href="http://www.yellow-bricks.com/2012/12/21/renaming-virtual-machine-files-using-svmotion-back/" target="_blank">cette feature était un bug jusqu&#8217;à la version 5.0 U2 d&#8217;ESXi</a>.</p>
<p style="text-align: justify;">Évidement, cela nécessite d&#8217;avoir <strong>un 2eme datastore</strong> (idéalement avec des performances identiques et la bonne volumétrie) pour faire l&#8217;aller-retour de la VM (ou un <a href="https://docs.vmware.com/en/vRealize-Operations-Manager/8.0/com.vmware.vcom.core.doc/GUID-82F8390B-8448-40DA-BFF1-30AB6166141D.html" target="_blank">Storage Pod</a>) <strong>ce qui n&#8217;est pas souvent le cas sur un cluster vSAN</strong> pour des raisons évidentes.</p>
<p style="text-align: center;"><img class="aligncenter" title="vSAN HCI Mesh" src="https://files.hypervisor.fr/img/VMware-vSAN-HCI-Mesh.png" alt="" width="498" height="302" /></p>
<p style="text-align: justify;">Jusqu&#8217;à maintenant, les seules solutions étaient de &#8230; ne rien faire ou de connecter un datastore NFS ponctuellement pour faire le svmotion. Mais en cherchant à faire du <strong><a href="https://core.vmware.com/resource/vmware-vsan-hci-mesh-tech-note#" target="_blank">HCI mesh</a></strong> en ligne de commande nous sommes tombé sur la solution (<a href="https://code.vmware.com/docs/12778/esxi-7-0-u1-esxcli-command-reference/namespace/esxcli_vsan.html" target="_blank">très discrètement documenté</a>) : <strong>esxcli vsan datastore add</strong> pour créer <strong>un 2eme datastore sur le vmdk namespace</strong>.<br />
<strong> </strong></p>
<p style="text-align: center;"><a href="http://download3.vmware.com/vmworld/2014/downloads/session-pdfs/STO1279_Final_US.pdf"><strong><img class="aligncenter" title="Architecting_Virtual_SAN" src="https://files.hypervisor.fr//img/Architecting_Virtual_SAN_6.2.2.008.1.png" alt="" width="519" height="398" /></strong></a></p>
<p style="text-align: justify;">Cette feature semble être apparu à partir de la version 6.7 U3 et est évidement accessible en PowerCLI également. Il suffit donc d&#8217;ajouter un &#8220;datastore&#8221; vSAN en précisant le nom et l&#8217;UUID de votre choix si vous le souhaitez. <strong>Il est nécessaire d&#8217;exécuter cette même commande sur tous les ESX du cluster avec le même nom <span style="color: #ff0000;"><span style="text-decoration: underline;">et le même UUID</span></span>.</strong></p>
<p style="text-align: center;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/esxcli_vsan_datastore_add.png" target="_blank"><strong><img class="aligncenter" title="esxcli_vsan_datastore_add" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/esxcli_vsan_datastore_add.png" alt="" width="506" height="582" /></strong></a></p>
<blockquote>
<p style="text-align: justify;"><strong>Add a new datastore to the vSAN cluster</strong>. This operation is only allowed if vSAN is enabled on the host. In general, add should be done at cluster level. Across a vSAN cluster vSAN datastores should be in sync.</p>
</blockquote>
<p style="text-align: justify;">Voila ce que ça donne sur un cluster à 3 noeuds :</p>
<p style="text-align: center;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/Get-EsxCli_vsan_datastore_add.png"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/Get-EsxCli_vsan_datastore_add.png" alt="" width="478" height="294" /></a></p>
<p style="text-align: justify;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vpx_vsandatastore2.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vpx_vsandatastore2.png" alt="" width="487" height="330" /></a></p>
<p style="text-align: justify;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vsan_vm_storage_policies.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vsan_vm_storage_policies.png" alt="" width="486" height="320" /></a>On peut donc maintenant faire notre svmotion aller-retour sans perte de performances.</p>
<p style="text-align: center;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vpx_svmotion.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/vpx_svmotion.png" alt="" width="444" height="260" /></a></p>
<p style="text-align: justify;">Une fois l&#8217;operation terminé on peut utiliser la commande &#8220;<strong>remove</strong>&#8221; en precisant le nom et l&#8217;UUID du datastore ou carrément la commande &#8220;<strong>clear</strong>&#8221; :</p>
<blockquote>
<p style="text-align: justify;"><strong>Remove all but the default datastore from the vSAN cluster</strong>. This operation is only allowed if vSAN is enabled on the host. In general, add should be done at cluster level. Across a vSAN cluster vSAN datastores should be in sync.</p>
</blockquote>
<p style="text-align: justify;">Et aucun risque de se rater, <strong>si une vm est toujours présente sur le datastore, vous aurez droit à une belle erreur</strong>. Après avoir fait du ménage, ça passe crème :</p>
<p style="text-align: center;"><a href="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/esxcli_vsan_datastore_clear.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/Dual_vSAN_Datastores/esxcli_vsan_datastore_clear.png" alt="" width="478" height="313" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5949</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PunchZero online</title>
		<link>http://www.hypervisor.fr/?p=5300</link>
		<comments>http://www.hypervisor.fr/?p=5300#comments</comments>
		<pubDate>Mon, 10 Nov 2014 11:02:37 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[SVMotion]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[vmkfstools]]></category>
		<category><![CDATA[zeroing]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5300</guid>
		<description><![CDATA[Depuis l&#8217;apparition du thin provisioning, la question de la récupération de l&#8217;espace disque libéré après allocation refait surface régulièrement.
Historiquement, il suffisait de &#8220;zeroer&#8221; l&#8217;espace libre inGuest et faire un storage vmotion vers n&#8217;importe quel autre datastore pour récupérer l&#8217;espace &#8220;zeroé&#8221; grâce au datamover fsdm qui zappe les zéros. Malheureusement, depuis l&#8217;apparition du datamover fs3dm dans [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Depuis l&#8217;apparition du <a href="http://kb.vmware.com/kb/1005418" target="_blank">thin provisioning</a>, la question de la <strong>récupération de l&#8217;espace disque libéré après allocation</strong> refait surface régulièrement.</p>
<p style="text-align: justify;">Historiquement, il suffisait de &#8220;zeroer&#8221; l&#8217;espace libre inGuest et faire un storage vmotion vers n&#8217;importe quel autre datastore pour récupérer l&#8217;espace &#8220;zeroé&#8221; grâce au datamover fsdm qui zappe les zéros. Malheureusement, depuis l&#8217;apparition du datamover fs3dm dans vSphere 4.0 cet avantage a disparu <a href="http://www.yellow-bricks.com/2011/02/18/blocksize-impact" target="_blank">comme l&#8217;explique Duncan dans un vieux post de 2011</a>.</p>
<p><a href="http://www.yellow-bricks.com/2011/02/18/blocksize-impact"><img class="aligncenter" src="http://files.hypervisor.fr/img/PunchZero/vmware_datamover.jpg" alt="" width="193" height="240" /></a></p>
<p style="text-align: justify;">A cette époque, il était courant d&#8217;avoir des datastores configurés avec des blocksize différents ce qui permettait de contourner le problème facilement. Aujourd&#8217;hui, VMFS 5 a changé cette approche avec le blocksize unifié à 1M.</p>
<p style="text-align: justify;"><strong>Pour tricker comme avant et forcer fsdm à faire le boulot il faut une rupture technologique VMFS &lt;&gt; NFS ou jouer avec <strong>un paramètre caché de vsish</strong></strong> <a href="http://www.yellow-bricks.com/2011/02/18/blocksize-impact/#comment-22783" target="_blank">comme l&#8217;indique William Lam dans son commentaire</a> :</p>
<blockquote><p>Whether VMFS should handle data movement requests by leveraging FS3DM</p></blockquote>
<p style="text-align: justify;">Et depuis le temps que nous voulions le tester, nous sommes enfin tomber sur une VM <a href="http://www.hypervisor.fr/?p=4857" target="_blank">avec ~60Go à récupérer</a> dans un environnement VMFS5 only:</p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/PunchZero/Zero_Thin_Diff.png" alt="" width="519" height="62" /></p>
<p style="text-align: justify;">Un coup de <a href="http://technet.microsoft.com/en-us/sysinternals/bb897443" target="_blank">sdelete -z</a> plus tard, on change le paramètre <strong>/config/VMFS3/intOpts/EnableDataMovement</strong> dans vsish et on lance un storage vmotion.</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/PunchZero/Zero_sdelete.png" title="Zero_sdelete" rel="lightbox[5300]"><img class="alignnone size-thumbnail wp-image-5303" title="Zero_sdelete" src="http://www.hypervisor.fr/wp-content/uploads/2014/11/Zero_sdelete-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/PunchZero/Zero_vsish_5.png" title="Zero_vsish_5" rel="lightbox[5300]"><img class="alignnone size-thumbnail wp-image-5304" title="Zero_vsish_5" src="http://www.hypervisor.fr/wp-content/uploads/2014/11/Zero_vsish_5-150x150.png" alt="" width="150" height="150" /></a></p>
<p>Au passage on remarque bien la phase de lecture sans écriture pendant le svmotion :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/PunchZero/Zero_svmotion_fsdm.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/PunchZero/Zero_svmotion_fsdm.png" alt="" width="503" height="304" /></a></p>
<p style="text-align: justify;">Après la migration (<a href="http://kb.vmware.com/kb/2008877" target="_blank">qui vous permettra aussi de renommer officiellement les fichiers de votre VM</a>), la VM a maigri comme il faut :</p>
<p style="text-align: left;"><img class="aligncenter" src="http://files.hypervisor.fr/img/PunchZero/Zero_Tango_Before.png" alt="" width="363" height="292" /></p>
<p style="text-align: left;"><img class="aligncenter" src="http://files.hypervisor.fr/img/PunchZero/Zero_Tango_After.png" alt="" width="365" height="309" /></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/PunchZero/Zero_Tango_Before_vmdk.png" title="Zero_Tango_Before_vmdk" rel="lightbox[5300]"><img class="alignnone size-thumbnail wp-image-5307" title="Zero_Tango_Before_vmdk" src="http://www.hypervisor.fr/wp-content/uploads/2014/11/Zero_Tango_Before_vmdk-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/PunchZero/Zero_Tango_After_vmdk.png" title="Zero_Tango_After_vmdk" rel="lightbox[5300]"><img class="alignnone size-thumbnail wp-image-5308" title="Zero_Tango_After_vmdk" src="http://www.hypervisor.fr/wp-content/uploads/2014/11/Zero_Tango_After_vmdk-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;"><a href="http://kb.vmware.com/kb/2004155" target="_blank">Pour ceux qui voudrait tout simplement le faire offline, il y a l&#8217;option <strong>&#8211;punchzero</strong> de vmkfstools.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5300</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zero-G Storage vMotion</title>
		<link>http://www.hypervisor.fr/?p=5188</link>
		<comments>http://www.hypervisor.fr/?p=5188#comments</comments>
		<pubDate>Mon, 16 Jun 2014 10:01:54 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[SVMotion]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[VAAI]]></category>
		<category><![CDATA[zeroing]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5188</guid>
		<description><![CDATA[Notre expérience de Storage vMotion remonte à l&#8217;arrivée d&#8217;ESX 3.0.1 (aka VI3) où DMotion permettait de migrer à chaud de VMFS 2 à VMFS 3 :
Follow the Migrate Virtual Machine Wizard to select the ESX 3.0.1 host and VMFS3 datastore destination. The Wizard validates the destination and moves the configuration files of the virtual machine [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Notre expérience de Storage vMotion remonte à l&#8217;arrivée d&#8217;ESX 3.0.1 (<a href="https://www.vmware.com/support/pubs/vi_pubs.html" target="_blank">aka VI3</a>) où <a href="http://kb.vmware.com/kb/2874895" target="_blank">DMotion permettait de migrer à chaud de VMFS 2 à VMFS 3</a> :</p>
<blockquote><p>Follow the Migrate Virtual Machine Wizard to select the ESX 3.0.1 host and VMFS3 datastore destination. The Wizard validates the destination and <strong>moves the configuration files of the virtual machine and virtual disks to the new VMFS3 datastore</strong>.</p></blockquote>
<p><a href="http://www.vmworld.com/docs/DOC-2140"><img class="aligncenter" src="http://files.hypervisor.fr/img/svmotion_vaai/dmotion_vmworld_2007.png" alt="" width="395" height="296" /></a></p>
<p style="text-align: justify;">Depuis, nous avons étudié, testé, troubleshooté, et utilisé en production (<a href="http://www.hypervisor.fr/?p=3524" target="_blank">de manière parfois intensive</a>) cette fonctionnalité (<a href="http://www.hypervisor.fr/?p=3212" target="_blank">qui a beaucoup évolué depuis 2007</a>) devenue presque banale depuis SDRS.</p>
<p style="text-align: justify;">C&#8217;est au moment où nous croyons tout savoir du mécanisme que nous prenons une grande claque d&#8217;humilité lors d&#8217;une migration de plusieurs centaines de VM et que nous nous apercevons pour la première fois <strong>qu&#8217;un svmotion d&#8217;un vmdk thin (ou Lazy Zeroed) génère 2 fois plus d&#8217;écritures que de lectures</strong> :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_rate.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_rate.png" alt="" width="503" height="304" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_iops.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_iops.png" alt="" width="503" height="304" /></a></p>
<p style="text-align: justify;">Nous n&#8217;avions jamais fait le rapprochement entre un svmotion et <a href="http://www.vmware.com/pdf/vsp_4_thinprov_perf.pdf" target="_blank">un sujet qui a longtemps fait polémique</a> :</p>
<blockquote>
<p style="text-align: left;"><strong>Because zeroing takes place at run-time for a thin disk, there can be some performance impact for write-intensive applications while writing data for the first time.</strong></p>
</blockquote>
<p style="text-align: justify;">Et le pire c&#8217;est qu&#8217;il nous a fallu un temps infini à l&#8217;échelle de Google pour tomber sur <a href="http://www.reddit.com/r/vmware/comments/1z1kt4/vmware_disk_performance_metrics_and_why_does_it/" target="_blank">un thread reddit où un VCDX explique tout d&#8217;une seule phrase</a> :</p>
<blockquote>
<p style="text-align: left;">It has to zero the block before writing the actual data.</p>
</blockquote>
<p style="text-align: justify;">Voila pourquoi <strong><strong>sans VAAI</strong> (ou au moins <a href="http://blogs.vmware.com/vsphere/2012/06/low-level-vaai-behaviour.html" target="_blank">la primitive WRITE_SAME</a>) vos svmotion (thin ou lazy zeroed) prendrons 2 fois plus de temps</strong> car 2 fois plus de données transiterons vers le stockage (<a href="http://www.yellow-bricks.com/2011/02/18/blocksize-impact/" target="_blank">entre 2 VMFS avec le même blocksize</a>).</p>
<p style="text-align: justify;">A titre de démonstration, voici un <a href="https://labs.vmware.com/flings/visualesxtop" target="_blank">visualEsxtop</a> de 2 svmotion consécutifs de <strong>la même VM </strong>entre 2 datastore, avec et sans le setting <a href="http://kb.vmware.com/kb/1021976" target="_blank">DataMover.HardwareAcceleratedInit</a> :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_visualEsxtop.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/svmotion_vaai/svmotion_thin_visualEsxtop_small.png" alt="" width="477" height="284" /></a></p>
<p style="text-align: left;">Ce n&#8217;est pas une défaillance de votre téléviseur, <strong>avec le zeroing offloadé à la baie c&#8217;est presque 2 fois plus rapide</strong> (ou 2 fois moins long si vous préférez&#8230;).</p>
<p style="text-align: left;">Ce comportement n&#8217;a évidement aucun rapport avec <a href="http://kb.vmware.com/kb/2004155" target="_blank">la &#8220;non-récupération&#8221; des zéros lors d&#8217;un svmotion</a>&#8230; Bien qu&#8217;il semble etre possible de <a href="http://www.yellow-bricks.com/2011/02/18/blocksize-impact/#comment-22783" target="_blank">le forcer d&#8217;une manière non supportée</a> !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5188</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>vSphere 5.1 sans le webclient : xvmotion &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=4214</link>
		<comments>http://www.hypervisor.fr/?p=4214#comments</comments>
		<pubDate>Fri, 21 Sep 2012 08:10:33 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[SVMotion]]></category>
		<category><![CDATA[VMotion]]></category>
		<category><![CDATA[webclient]]></category>
		<category><![CDATA[xvmotion]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4214</guid>
		<description><![CDATA[MAJ 01/08/2015 : Depuis vSphere 6.0 et son fameux X-Switch vMotion, il semble nécessaire d&#8217;indiquer le pool de destination:

Qu&#8217;à cela ne tienne :
(get-vm TargetVM&#124;get-view).RelocateVM((new-object Vmware.Vim.VirtualMachineRelocateSpec -property @{datastore=(get-datastore TargetDatastore&#124;get-view).moref;host=(get-vmhost TargetESX&#124;get-view).moref;pool=(get-cluster TargetCluster&#124;get-resourcepool -Name resources&#124;Get-View).moref}),$null)
Comme vous l&#8217;avez certainement lu dans les &#8220;What&#8217;s new&#8221; ou dans les *très* nombreux post traitant du sujet, Ô combien sensible, du Web Client, VMware [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 01/08/2015</span> : Depuis vSphere 6.0 et son fameux <a href="http://files.hypervisor.fr/img/X-Switch%20vMotion/XSvMotion_lic.png" target="_blank">X-Switch vMotion</a>, il semble nécessaire d&#8217;indiquer le pool de destination:</em></p>
<p style="text-align: center;"><em><a href="http://files.hypervisor.fr/img/X-Switch%20vMotion/XSvMotion_pool.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/X-Switch%20vMotion/XSvMotion_pool.png" alt="" width="493" height="15" /></a></em></p>
<p style="text-align: justify;"><em>Qu&#8217;à cela ne tienne :</em></p>
<pre class="brush: powershell; title: ; notranslate">(get-vm TargetVM|get-view).RelocateVM((new-object Vmware.Vim.VirtualMachineRelocateSpec -property @{datastore=(get-datastore TargetDatastore|get-view).moref;host=(get-vmhost TargetESX|get-view).moref;pool=(get-cluster TargetCluster|get-resourcepool -Name resources|Get-View).moref}),$null)</pre>
<p style="text-align: justify;">Comme vous l&#8217;avez certainement lu <a href="http://www.hypervisor.fr/?p=4082" target="_blank">dans les &#8220;What&#8217;s new&#8221;</a> ou dans les *très* nombreux post traitant du sujet, Ô combien sensible, du Web Client, VMware ne lève plus le petit doigt concernant le client C#. Dans cette optique et certainement pour forcer massivement son adoption, <a href="http://www.vmware.com/support/vsphere5/doc/vsphere-esx-vcenter-server-51-release-notes.html" target="_blank"><strong>toutes les nouvelles fonctionnalités de vSphere 5.1 ne sont disponibles que dans le client flex</strong></a> qui ne laisse personne indifférent :</p>
<blockquote>
<p style="text-align: justify;">In vSphere 5.1, all new vSphere features are available only through the vSphere Web Client.</p>
</blockquote>
<p style="text-align: justify;">A contre courant, ce post est le premier d&#8217;une série qui vous permettra de continuer à utiliser le bon vieux client lourd, 10x plus fluide et ergonomique à nos yeux, et bénéficier des nouvelles fonctionnalités via des commandes PowerShell.</p>
<p style="text-align: justify;">On commence par <strong><a href="http://frankdenneman.nl/2012/09/vsphere-5-1-vmotion-deepdive/" target="_blank">xvmotion</a></strong> (le codename du &#8220;<a href="http://technet.microsoft.com/en-us/library/hh831435.aspx" target="_blank">Shared Nothing Live Migration</a>&#8221; de VMware), qui permet de déplacer à chaud <strong>les vdisk ET le state</strong> (cpu &amp; ram) d&#8217;une vm d&#8217;un host à un autre sans avoir besoin d&#8217;un stockage commun :</p>
<pre class="brush: powershell; title: ; notranslate">(get-vm TargetVM|get-view).RelocateVM((new-object Vmware.Vim.VirtualMachineRelocateSpec -property @{datastore=(get-datastore TargetDatastore|get-view).moref;host=(get-vmhost TargetESX|get-view).moref}),$null)</pre>
<p>Il vous suffit de remplacer &#8220;TargetVM&#8221;, &#8220;TargetDatastore&#8221; et &#8220;TargetESX&#8221; par les valeurs de votre choix.</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/xvmotion.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/xvmotion.png" alt="" width="445" height="212" /></a></p>
<p>Pour en savoir plus sur xvmotion, nous vous conseillons vivement la lecture du document &#8220;<a href="http://www.vmware.com/files/pdf/techpaper/VMware-vSphere51-vMotion-Perf.pdf" target="_blank">VMware vSphere 5.1 vMotion Architecture, Performance and Best Practices</a>&#8221; qui précise d&#8217;ailleurs que <strong>lorsque la vm à déplacer a un ou plusieurs snapshot, les fichiers en read only (généralement le plus gros de la vm) sont déplacés en NFC via l&#8217;interface de management (vmk0 donc) et ne bénéficiera donc pas du multi-NIC</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4214</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Storage vMotion : the method is disabled</title>
		<link>http://www.hypervisor.fr/?p=4197</link>
		<comments>http://www.hypervisor.fr/?p=4197#comments</comments>
		<pubDate>Wed, 05 Sep 2012 17:24:49 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[SVMotion]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4197</guid>
		<description><![CDATA[Lors d&#8217;une opération de migration de baie de stockage, nous avons rencontré un problème intéressant durant le storage vmotion d&#8217;une vm. La migration consistant à déplacer les vm de 3 datastores d&#8217;une baie vers 3 datastore d&#8217;une autre baie, nous avons evidement utilisé notre fameux script Datastore-Equalizer. Voici un screenshot de l&#8217;erreur en question :

Une kb vmware couvre le sujet mais [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Lors d&#8217;une opération de migration de baie de stockage, nous avons rencontré un problème intéressant durant le storage vmotion d&#8217;une vm. La migration consistant à déplacer les vm de 3 datastores d&#8217;une baie vers 3 datastore d&#8217;une autre baie, nous avons evidement utilisé notre fameux script <a href="http://www.hypervisor.fr/?p=3524" target="_blank">Datastore-Equalizer</a>. Voici un screenshot de l&#8217;erreur en question :</p>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2012/09/The_method_is_disabled.png" title="The_method_is_disabled" rel="lightbox[4197]"><img class="aligncenter size-full wp-image-4198" title="The_method_is_disabled" src="http://www.hypervisor.fr/wp-content/uploads/2012/09/The_method_is_disabled.png" alt="" width="504" height="56" /></a></p>
<p style="text-align: justify;">Une <a href="http://kb.vmware.com/kb/2008957" target="_blank">kb vmware couvre le sujet</a> mais les 2 workaround sont particulièrement déplaisants. Au choix, <strong>unregister</strong>/register de la vm (arrêtée sinon c&#8217;est pas drôle) ou modifications dans la base du vcenter (arrêté sinon c&#8217;est pas drôle non plus).</p>
<p style="text-align: justify;"><em>Pour rappel, un unregister une vm du vcenter vous fait perdre les stats et les custom fields mais induit aussi <strong>un changement de </strong><a href="http://www.virtuallyghetto.com/2011/11/vsphere-moref-managed-object-reference.html"><strong>moref</strong></a> qui peut également entraîner de conséquences importantes comme une perte des règles d’affinités DRS ou encore une appartenance à un job de backup.</em></p>
<p style="text-align: justify;">N&#8217;ayant pas pour habitude d&#8217;accepter ce genre de solutions sans chercher un moyen de contournement pour éviter un downtime ou une perte d&#8217;information quelconque, nous avons fini par trouver la solution simplement dans la description du problème :</p>
<blockquote>
<p style="text-align: justify;">This issue occurs because the entries from VPX_DISABLED_METHODS are not removed after a virtual machine backup task completes.</p>
</blockquote>
<p style="text-align: justify;">Vous l&#8217;aurez deviné, <strong>un nouveau backup (réussi) de la vm a corrigé le problème</strong> et nous avons pu continuer la migration.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.kulfoto.com/pic/0001/0027/o964426118.jpg" alt="" width="346" height="238" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4197</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Les secrets de Live Storage Migration</title>
		<link>http://www.hypervisor.fr/?p=3212</link>
		<comments>http://www.hypervisor.fr/?p=3212#comments</comments>
		<pubDate>Mon, 25 Jul 2011 23:20:46 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[SVMotion]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=3212</guid>
		<description><![CDATA[Au détour d&#8217;un post sur le VMware vSphere Blog, nous avons repéré un lien vers un pdf qui vaut son pesant de cacahuètes : The Design and Evolution of Live Storage Migration in VMware ESX. Pour faire simple, il s&#8217;agit d&#8217;un document rédigé par un groupe d&#8217;ingénieurs de chez VMware détaillant les différents mécanismes de svmotion depuis ESX 3.0 [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Au détour <a href="http://blogs.vmware.com/vsphere/2011/07/new-vsphere-50-storage-features-part-2-storage-vmotion.html" target="_blank">d&#8217;un post sur le VMware vSphere Blog</a>, nous avons repéré un lien vers un pdf qui vaut son pesant de cacahuètes : <a href="http://www.usenix.org/events/atc11/tech/final_files/Mashtizadeh.pdf" target="_blank">The Design and Evolution of Live Storage Migration in VMware ESX</a>. Pour faire simple, il s&#8217;agit d&#8217;un document rédigé par un groupe d&#8217;ingénieurs de chez VMware détaillant les différents mécanismes de svmotion depuis ESX 3.0 à ESXi 5.0 (<a href="http://www.yellow-bricks.com/2011/07/14/vsphere-5-0-storage-vmotion-and-the-mirror-driver/" target="_blank">y compris le futur Mirror Mode</a>), que du bonheur !</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/svmotions.png" title="svmotions" rel="lightbox[3212]"><img class="aligncenter size-full wp-image-3213" title="svmotions" src="http://www.hypervisor.fr/wp-content/uploads/2011/07/svmotions.png" alt="" width="538" height="343" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=3212</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svmotion switchover time</title>
		<link>http://www.hypervisor.fr/?p=2865</link>
		<comments>http://www.hypervisor.fr/?p=2865#comments</comments>
		<pubDate>Wed, 13 Apr 2011 22:21:48 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[SVMotion]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[VMotion]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2865</guid>
		<description><![CDATA[MAJ 02/02/2012 : remplacement du script par un one-liner  
Lors d&#8217;une tentative de svmotion nous avons été confronté à un timeout sans plus de détails :

C&#8217;est dans le vmware.log de la vm qu&#8217;on trouve la cause de l’échec (c&#8217;est souvent le cas d&#8217;ailleurs&#8230;) :

Migrate_SetFailure: The migration has exceeded the maximum switchover time of 100 second(s).  ESX has [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><strong><strong><span style="color: #ff0000;">MAJ 02/02/2012</span></strong> </strong>: remplacement du script par un one-liner <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p style="text-align: justify;">Lors d&#8217;une tentative de svmotion nous avons été confronté à un timeout sans plus de détails :</p>
<p><img class="aligncenter size-full wp-image-2866" title="switchover_time" src="http://www.hypervisor.fr/wp-content/uploads/2011/04/switchover_time.png" alt="" width="387" height="56" /></p>
<p style="text-align: justify;">C&#8217;est dans le vmware.log de la vm qu&#8217;on trouve la cause de l’échec (c&#8217;est souvent le cas d&#8217;ailleurs&#8230;) :</p>
<blockquote>
<p style="text-align: justify;">Migrate_SetFailure: The migration has exceeded the maximum switchover time of 100 second(s).  ESX has preemptively failed the migration to allow the virtual machine to continue running on the source. To avoid this failure, either increase the maximum allowable switchover time or wait until the virtual machine is performing a less intensive workload.</p>
</blockquote>
<p style="text-align: justify;">Pourtant, depuis vSphere 4.0, <strong>un svmotion ne nécessite plus une phase de recopie de la ram grâce au &#8220;Fast Suspend/Resume&#8221;</strong> <a href="http://mylearn.vmware.com/courseware/50948/TA2623_formatted.pdf" target="_blank">comme détaillé dans une session du vmworld 2009</a>. Il ne nous restait donc plus que la piste de l&#8217;activité des vmdk mais la kb dédié à ce problème (<a href="http://kb.vmware.com/kb/1010045" target="_blank">Using Storage vMotion to migrate a virtual machine with many disks may timeout</a>) fait référence à des messages d&#8217;erreurs aux quels nous n&#8217;avons pas été confrontés.</p>
<p style="text-align: justify;">Dans le doute et n&#8217;ayant pas le temps d&#8217;investiguer d&#8217;avantage, nous avons augmenté les valeurs de &#8220;switchover time&#8221; pour vmotion et svmotion à l&#8217;aide de ce script PowerCLI, ce qui nous a permis de régler le problème :</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>View <span style="color: pink;">-</span>ViewType VirtualMachine<span style="color: pink;">|?</span><span style="color: #000000;">&#123;</span><span style="color: #FF0000;">-not</span> <span style="color: #000080;">$_</span>.Config.Template<span style="color: #000000;">&#125;</span><span style="color: pink;">|%</span><span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span>.ReconfigVM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">New-Object</span> VMware.Vim.VirtualMachineConfigSpec <span style="color: #008080; font-style: italic;">-Property</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>extraconfig<span style="color: pink;">=@</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">New-Object</span> VMware.Vim.optionvalue <span style="color: #008080; font-style: italic;">-Property</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>Key<span style="color: pink;">=</span><span style="color: #800000;">&quot;vmotion.maxSwitchoverSeconds&quot;</span>;Value<span style="color: pink;">=</span><span style="color: #800000;">&quot;200&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;<span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">New-Object</span> VMware.Vim.optionvalue <span style="color: #008080; font-style: italic;">-Property</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span>Key<span style="color: pink;">=</span><span style="color: #800000;">&quot;fsr.maxSwitchoverSeconds&quot;</span>;Value<span style="color: pink;">=</span><span style="color: #800000;">&quot;200&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span></pre></div></div>

<p style="text-align: justify;">Le paramètre &#8221;vmotion.maxSwitchoverSeconds&#8221;, nous l&#8217;avons trouvé dans les commentaires <a href="http://blogs.vmware.com/uptime/2011/02/vmotion-whats-going-on-under-the-covers.html" target="_blank">d&#8217;un post très intéressant du blog VMware Uptime</a> au sujet d&#8217;une fonctionnalité peut connu de vmotion (vSphere 4.1+) : &#8220;<strong>quick resume</strong>&#8220;</p>
<blockquote>
<p style="text-align: justify;">In the event the VM passes the 100 second check, VMotion will stun the source and start running on the destination. <strong>While the destination runs, the source will transmit the remaining pages to the destination</strong> using the “quick resume” capability introduced with vSphere 4.1.</p>
</blockquote>
<p style="text-align: justify;">Vous avez bien lu, <strong>la vm de destination est démarrée alors le vmotion n&#8217;est techniquement pas terminé et les pages restantes sont migrées en tache de fond</strong>. Surpuissant.</p>
<p style="text-align: justify;">Comme le précise <a href="http://www.yellow-bricks.com/2011/04/13/vmotion-and-quick-resume/" target="_blank">Duncan dans son post concernant ce sujet</a>, l&#8217;impact sur les performances en cas d&#8217;accès à une page restée sur la vm source (accès via le réseau donc) compense largement l&#8217;agilité de la solution dans la majorité des cas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=2865</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
