<?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; Tips &amp; Tricks</title>
	<atom:link href="http://www.hypervisor.fr/?cat=12&#038;feed=rss2" 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>Host.Local.ManageUserGroups = root</title>
		<link>http://www.hypervisor.fr/?p=6005</link>
		<comments>http://www.hypervisor.fr/?p=6005#comments</comments>
		<pubDate>Fri, 30 Jul 2021 14:16:51 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[esxcli]]></category>
		<category><![CDATA[Get-EsxCli]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=6005</guid>
		<description><![CDATA[MAJ 11/01/2023 : William Lam vient de nous faire remarquer qu&#8217;il etait possible d&#8217;hardener vSphere 8 pour limiter cette &#8220;feature&#8221; ainsi que de limiter le shell aux user non root (dcui par exemple&#8230;)

By restricting ESXi Shell access for the vpxuser, you prevent attackers,  which can also be insiders who have access to vCenter Server the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 11/01/2023</span> : <a href="https://williamlam.com/2023/01/applying-additional-security-hardening-enhancements-in-esxi-8-0.html" target="_blank">William Lam vient de nous faire remarquer qu&#8217;il etait possible d&#8217;hardener vSphere 8 pour limiter cette &#8220;feature&#8221; ainsi que de limiter le shell aux user non root (dcui par exemple&#8230;)</a></em></p>
<blockquote>
<p style="text-align: justify;"><em>By restricting ESXi Shell access for the vpxuser, you prevent attackers,  which can also be insiders who have access to vCenter Server <strong>the  ability to just change the ESXi root password without knowing the  original password</strong>.</em></p>
</blockquote>
<p style="text-align: justify;">Après l’énorme succès de notre billet <a href="http://www.hypervisor.fr/?p=5655" target="_blank">Administrators = root</a> qui vous permet de reset le mot de passe root de vos ESX sans le connaître (si vous êtes admin du vCenter) grâce à Get-EsxCli, voici <a href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/790263bc-bd30-48f1-af12-ed36055d718b/e5f17bfc-ecba-40bf-a04f-376bbb11e811/vim.host.LocalAccountManager.html#updateUser" target="_blank">une nouvelle méthode utilisable depuis vSphere 6.7 U2</a> qui nécessite encore moins de droits :</p>
<blockquote><p>Updates a local user account using the parameters defined in the   <a href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/790263bc-bd30-48f1-af12-ed36055d718b/e5f17bfc-ecba-40bf-a04f-376bbb11e811/vim.host.LocalAccountManager.AccountSpecification.html" target="_blank">HostLocalAccountManagerAccountSpecification</a> data object type.</p></blockquote>
<blockquote><p>Required Privileges <a href="https://files.hypervisor.fr/img/HostLocalManageUserGroups.png" target="_blank">Host.Local.ManageUserGroups</a></p></blockquote>
<pre class="brush: powershell; title: ; notranslate">(Get-View (Get-VMHost|Get-View).ConfigManager.AccountManager).UpdateUser($(New-Object VMware.Vim.HostAccountSpec -Property @{id=&quot;root&quot;;password=&quot;VMw4re!&quot;}))</pre>
<p style="text-align: justify;">Attention, contrairement à la méthode Get-EsxCli, cette fois un petit event va vous trahir instantanément :</p>
<p style="text-align: justify;"><img class="aligncenter" src="https://files.hypervisor.fr/img/HostAccountSpec.png" alt="" width="517" height="324" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=6005</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>VCSA to NextCloud</title>
		<link>http://www.hypervisor.fr/?p=5845</link>
		<comments>http://www.hypervisor.fr/?p=5845#comments</comments>
		<pubDate>Fri, 29 Jun 2018 17:16:23 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VCSA]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[nextcloud]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5845</guid>
		<description><![CDATA[Lors d&#8217;une update d&#8217;une VSCA 6.7 de lab, nous avons été amusé par l’étape de backup que VMware à ajouté au workflow d&#8217;update de la VAMI (sublime HTML5 Clarity d&#8217;ailleurs). Il faut à présent certifier que l&#8217;on a bien backupé l&#8217;appliance avant de se lancer dans une update :


la VCSA 6.7 introduit le backup automatique [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Lors d&#8217;une update d&#8217;une VSCA 6.7 de lab, nous avons été amusé par l’étape de backup que VMware à ajouté au workflow d&#8217;update de la VAMI (sublime <a href="https://vmware.github.io/clarity/" target="_blank">HTML5 Clarity</a> d&#8217;ailleurs). Il faut à présent certifier que l&#8217;on a bien backupé l&#8217;appliance avant de se lancer dans une update :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vcsa2nextcloud/vcsa2nextcloud_backup_confirm.png" title="vcsa2nextcloud_backup_confirm_s" rel="lightbox[5845]"><img class="aligncenter size-full wp-image-5882" title="vcsa2nextcloud_backup_confirm_s" src="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_backup_confirm_s.png" alt="" width="509" height="358" /></a></p>
<p style="text-align: center;">
<p style="text-align: justify;"><a href="https://blogs.vmware.com/vsphere/2018/04/introducing-vcenter-server-6-7.html" target="_blank">la VCSA 6.7 introduit le backup automatique programmé</a> mais toujours pas le support du SMB (raison pour laquelle nous avions boudé la feature en 6.5). En fouillant dans la doc, nous nous sommes aperçu que <a href="https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.install.doc/GUID-AFF34FA6-B7CF-4AE0-9C12-C674F160682C.html" target="_blank">le protocole webdav était supporté</a>, c&#8217;est certainement ce que VMware sous-entend par http et https bien que ce ne soit pas extrêmement clair.</p>
<p style="text-align: justify;"><a href="https://nextcloud.com/"><img class="aligncenter" src="http://files.hypervisor.fr/img/vcsa2nextcloud/Nextcloud_Logo.svg.png" alt="" width="320" height="227" /></a></p>
<p style="text-align: justify;">En grand fan et utilisateur intensif de <a href="https://nextcloud.com/" target="_blank">NextCloud</a> que nous sommes, nous avons testé le backup en secure webdav (https) vers un nextcloud avec succès et ce très facilement (on s&#8217;attendait à des histoires d&#8217;url comme c&#8217;est souvent le cas avec le webdav) :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vcsa2nextcloud/vcsa2nextcloud_edit_backup_sched.png" title="vcsa2nextcloud_edit_backup_sched" rel="lightbox[5845]"><img class="alignnone size-thumbnail wp-image-5862" title="vcsa2nextcloud_edit_backup_sched" src="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_edit_backup_sched-150x150.png" alt="" width="150" height="150" /></a> <a href="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_backup_ok.png" title="vcsa2nextcloud_backup_ok" rel="lightbox[5845]"><img class="alignnone size-thumbnail wp-image-5863" title="vcsa2nextcloud_backup_ok" src="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_backup_ok-150x150.png" alt="" width="150" height="150" /></a> <a href="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_onetime_backup.png" title="vcsa2nextcloud_onetime_backup" rel="lightbox[5845]"><img class="alignnone size-thumbnail wp-image-5864" title="vcsa2nextcloud_onetime_backup" src="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_onetime_backup-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_nc_webdav.png" title="vcsa2nextcloud_nc_webdav" rel="lightbox[5845]"><img class="aligncenter size-large wp-image-5865" title="vcsa2nextcloud_nc_webdav" src="http://www.hypervisor.fr/wp-content/uploads/2018/06/vcsa2nextcloud_nc_webdav-1024x524.png" alt="" width="491" height="251" /></a></p>
<p style="text-align: left;">Reste plus qu&#8217;à tester le restore maintenant <img class="superemotions" title="Cool" alt="Cool" border="0" src="http://www.hypervisor.fr/wp-includes/images/smilies/icon_cool.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5845</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VIX &amp; Kerberos Double Hop</title>
		<link>http://www.hypervisor.fr/?p=5815</link>
		<comments>http://www.hypervisor.fr/?p=5815#comments</comments>
		<pubDate>Fri, 07 Jul 2017 11:03:29 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[VIX]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5815</guid>
		<description><![CDATA[Lors d&#8217;une petite session de PowerCLI avec les célèbres (mais bientôt deprecated) VIX APIs, nous nous sommes heurté à une limite de sécurité bien connue des admins Microsoft: le Kerberos Double Hop.
Pour résumer, nous avions besoin d’exécuter un script situé sur un share depuis un ensemble de VM et nous avons bien évidement tenté de [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Lors d&#8217;une petite session de PowerCLI avec les célèbres (<a href="https://www.vmware.com/support/developer/vix-api/VIX-1.15-ReleaseNotes.html" target="_blank">mais bientôt deprecated</a>) VIX APIs, nous nous sommes heurté à une limite de sécurité bien connue des admins Microsoft: le <a href="https://blogs.technet.microsoft.com/askds/2008/06/13/understanding-kerberos-double-hop/" target="_blank">Kerberos Double Hop</a>.</p>
<p style="text-align: justify;">Pour résumer, nous avions besoin d’exécuter un script situé sur un share depuis un ensemble de VM et nous avons bien évidement tenté de profiter du fait que <a href="http://www.hypervisor.fr/?p=5070" target="_blank">VIX supporte le SSO</a>, comme des gros fainéants. Et là, <a href="https://weblogs.asp.net/owscott/iis-windows-authentication-and-the-double-hop-issue" target="_blank">c&#8217;est le drame</a>:</p>
<blockquote>
<p style="text-align: justify;">When using Integrated Security, anonymous access is disabled, and impersonation is turned on, <strong>a security measure kicks in and doesn&#8217;t allow your site to access resources on any network servers.  This includes access to a UNC path</strong> directly from IIS or SQL Server using Windows authentication.</p>
</blockquote>
<p>Il nous a suffit de <strong>passer les credentials à l&#8217;Invoke-VMScript pour que l&#8217;UNC devienne accessible</strong>:</p>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2017/07/VIX_Kerb_2x_Hop.png" title="VIX_Kerb_2x_Hop" rel="lightbox[5815]"><img class="aligncenter size-full wp-image-5816" title="VIX_Kerb_2x_Hop" src="http://www.hypervisor.fr/wp-content/uploads/2017/07/VIX_Kerb_2x_Hop.png" alt="" width="486" height="384" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5815</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RegisterVM_task onliner</title>
		<link>http://www.hypervisor.fr/?p=5798</link>
		<comments>http://www.hypervisor.fr/?p=5798#comments</comments>
		<pubDate>Tue, 09 May 2017 13:54:52 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5798</guid>
		<description><![CDATA[Raiders Of The Lost VMX est l&#8217;un des plus vieux et des plus célèbres script de Luc Dekens. Pour rappel il permet, entre autres, d&#8217;enregistrer en masse des vmx &#8220;perdus&#8221;. Très pratique pour les tests de Disaster Recovery en mode artisanal&#8230;


Apres un crash de carte SD de boot, sans backup du state.tgz (sinon c&#8217;est pas [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.lucd.info/2009/12/02/raiders-of-the-lost-vmx/" target="_blank">Raiders Of The Lost VMX</a> est l&#8217;un des plus vieux et des plus célèbres script de <a href="https://twitter.com/LucD22" target="_blank">Luc Dekens</a>. Pour rappel il permet, entre autres, d&#8217;enregistrer en masse des vmx &#8220;perdus&#8221;. Très pratique pour les tests de Disaster Recovery en mode artisanal&#8230;</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/RegisterVM_Ghetto.png" alt="" width="504" height="230" /></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Apres un crash de carte SD de boot, sans backup du state.tgz (sinon c&#8217;est pas drôle), nous devions ré-enregistrer les VM présentent sur ce host en standalone. Ces VM étant des replicas Veeam, nous ne pouvions pas risquer de perdre le MoRef, donc obligation de les enregistrer en direct sur l&#8217;ESX fraichement redeployé. Et comme il y en avait plus de 150, pas question de le faire à la main donc pourquoi ne pas utiliser le script de Luc ? Oui pourquoi ? Et bien parce que nous voulions le faire avec un oneliner bien sur !</p>
<p style="text-align: justify;">Voici donc <strong>un oneliner qui va chercher les fichiers vmx dans le datastore </strong><strong>&#8220;<strong>datastore1</strong>&#8220;</strong><strong> </strong>(<span style="text-decoration: underline;">à changer au début du oneliner</span>)<strong> et les enregistrer avec leur nom original </strong>(DisplayName dans le vmx)<strong> sur l&#8217;ESX</strong>.</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType Datastore -Property Name,Browser -Filter @{&quot;Name&quot; = &quot;^datastore1$&quot;}|%{(Get-View $_.Browser).SearchDatastoreSubFolders($(&quot;[&quot; + $_.Name + &quot;]&quot;),(New-Object VMware.Vim.HostDatastoreBrowserSearchSpec -Property @{matchPattern=(&quot;*.vmx&quot;)}))}|%{(Get-View -ViewType Folder -Property Name -Filter @{&quot;Name&quot; = &quot;^vm&quot;}).GetType().GetMethod(&quot;RegisterVM_Task&quot;).Invoke($(Get-View -ViewType Folder -Property Name -Filter @{&quot;Name&quot; = &quot;^vm&quot;}),@($($_.FolderPath + &quot;/&quot; + $_.File.Path),$null,$false,(Get-View -ViewType ResourcePool -Property Name -Filter @{&quot;Name&quot; = &quot;Resources&quot;}).MoRef,$null))}
</pre>
<p style="text-align: justify;">1ere chose importante, <strong>ce onliner doit impérativement être exécuté depuis l&#8217;ESX et non le vcenter pour ne pas perde le MoRef</strong> des vm, si toute fois elles existent déjà dans le vCenter. Donc c&#8217;est un connect-viserver sur l&#8217;ESX qu&#8217;il convient d’exécuter dans votre console PowerCLI.</p>
<p style="text-align: justify;">2eme chose, la difficulté de ce oneliner à été de faire passer un $null pour le paramètre &#8220;name&#8221; à la method <a href="https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.Folder.html#registerVm" target="_blank">RegisterVM_Task</a> :</p>
<blockquote><p>If this parameter is not set, the displayName configuration parameter of the virtual machine is used</p></blockquote>
<p style="text-align: justify;">Ca a l&#8217;air de rien mais en l&#8217;état c&#8217;est impossible <a href="https://communities.vmware.com/message/1156581#1156581" target="_blank">et c&#8217;est grâce à un vieux post de Luc</a> (encore lui !) qui retranscrit une solution provenant du support VMware :</p>
<blockquote><p>VMware Support came up with a solution.<br />
Big thanks to Jain</p>
<p><strong>The problem was basically how to &#8220;not set&#8221; the name parameter from within PowerShell</strong>.</p></blockquote>
<p>Nous avons donc pu intégrer ce bout de script au notre. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5798</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The (old) Ladykillers</title>
		<link>http://www.hypervisor.fr/?p=5789</link>
		<comments>http://www.hypervisor.fr/?p=5789#comments</comments>
		<pubDate>Wed, 12 Apr 2017 17:51:49 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[oneliner]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5789</guid>
		<description><![CDATA[Pour bien commencer le printemps et son grand ménage traditionnel, nous vous proposons un petit oneliner qui vous affichera la liste des vm éteintes avec la date du poweroff basée sur la dernière modification du fichier nvram (qui coincide au fameux &#8220;VMX has left the building&#8221; dans le vmware.log) donc pas de dépendance avec la [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Pour bien commencer le printemps et son grand ménage traditionnel, nous vous proposons un petit oneliner qui vous affichera la liste des vm éteintes avec la date du poweroff <strong>basée sur la dernière modification du fichier nvram</strong> (qui coincide au fameux &#8220;VMX has left the building&#8221; dans le vmware.log) donc pas de dépendance avec la stratégie de rétention des tasks et events de votre VCDB.</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/The_old_Ladykillers/ds_browser_nvram.png" title="ds_browser_nvram" rel="lightbox[5789]"><img class="alignnone size-thumbnail wp-image-5790" title="ds_browser_nvram" src="http://www.hypervisor.fr/wp-content/uploads/2017/04/ds_browser_nvram-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/The_old_Ladykillers/vmx_has_left_the_build_log.png" title="vmx_has_left_the_build_log" rel="lightbox[5789]"><img class="alignnone size-thumbnail wp-image-5791" title="vmx_has_left_the_build_log" src="http://www.hypervisor.fr/wp-content/uploads/2017/04/vmx_has_left_the_build_log-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Nous avons ajouté la taille de la VM pour vous motiver à faire un VeeamZIP et à en finir définitivement avec ces VM qui risque d&#8217;être redémarrées après un crash d&#8217;ESX&#8230;</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/The_old_Ladykillers/old_vm_off_ogv.png" alt="" width="495" height="596" /></p>
<pre class="brush: powershell; title: ; notranslate">get-view -viewtype virtualmachine -property name,runtime,layoutex|?{$_.Runtime.PowerState -eq &quot;poweredOff&quot; -and $_.Runtime.ConnectionState -eq &quot;connected&quot; -and !$_.config.template}|?{$_.LayoutEx.File|?{$_.type -match &quot;nvram&quot;}}|%{$_|select Name, @{n=&quot;Modification&quot;;e={((get-view (get-view -viewtype datastore –filter @{&quot;Name&quot;=($_.LayoutEx.File|?{$_.type -eq &quot;nvram&quot;}).name.split(&quot;[]&quot;)[1]}).browser).SearchDatastore(($_.LayoutEx.File|?{$_.type -eq &quot;nvram&quot;}).name.split(&quot;/&quot;)[0],(New-Object VMware.Vim.HostDatastoreBrowserSearchSpec -property @{matchPattern=(&quot;*.nvram&quot;); details=(New-Object VMware.Vim.FileQueryFlags -property @{modification=$true})}))|%{$_.file}).Modification}}, @{n=&quot;SizeGB&quot;;e={[math]::round(($_.LayoutEx.File|measure -Property size -sum).sum/1GB,1)}}}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5789</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ftp.dell.com direct iDRAC update &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=5696</link>
		<comments>http://www.hypervisor.fr/?p=5696#comments</comments>
		<pubDate>Sun, 03 Apr 2016 23:04:53 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VSAN]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[iDRAC]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5696</guid>
		<description><![CDATA[MAJ 19/11/2021 : Dell a coupé le service ftp à partir de février 2021 mais il est possible de passer en https pour les idrac qui le supporte (une maj est parfois nécessaire) :
Dell EMC has retired ftp.dell.com and transitioned exclusively to a global downloads site with regional hosted repositories .Feb 21, 2021


MAJ 27/07/2016 : [...]]]></description>
			<content:encoded><![CDATA[<p><em><span style="color: #ff0000;">MAJ 19/11/2021</span> : Dell a coupé le service ftp à partir de février 2021 mais <a href="https://www.dell.com/support/kbdoc/en-us/000132986/dell-emc-catalog-links-for-poweredge-servers" target="_blank">il est possible de passer en https pour les idrac qui le supporte</a> (une maj est <em>parfois </em>nécessaire) :</em></p>
<blockquote><p>Dell EMC has retired ftp.dell.com and transitioned exclusively to a global downloads site with regional hosted repositories .Feb 21, 2021</p></blockquote>
<p style="text-align: center;"><em><a href="https://files.hypervisor.fr/img/ftp_dell_com/idrac_https.png" target="_blank"><img class="aligncenter" src="https://files.hypervisor.fr/img/ftp_dell_com/idrac_https.png" alt="" width="476" height="330" /></a><br />
</em></p>
<p><em><span style="color: #ff0000;">MAJ 27/07/2016</span> : <a href="https://twitter.com/mindflux/status/753976102394093569" target="_blank">Il semblerait</a> que la valeur &#8220;<strong>/catalog</strong>&#8221; pour la <strong>Catalog Location</strong> offre des versions nettement plus up2date.</em></p>
<p>Parmi <a href="http://www.dell.com/support/article/us/en/19/SLN293301/en" target="_blank">les nombreuses méthodes pour upgrader les firmware des composants d&#8217;un serveur Dell</a>, il y en une qui nous intéressait beaucoup mais que nous n&#8217;arrivions pas à faire fonctionner : <a href="http://en.community.dell.com/techcenter/extras/m/white_papers/20438129/download" target="_blank">la méthode <strong>ftp.dell.com</strong></a></p>
<blockquote><p>The repository could either be <strong>ftp.dell.com</strong> or a user generated repository on the local network share.</p></blockquote>
<p style="text-align: justify;">Sur les serveurs Dell relativement récents, il est en effet possible de &#8220;stager&#8221; et &#8220;scheduler&#8221; toutes les updates matérielles possibles directement depuis l&#8217;iDRAC en live depuis le ftp Dell. Et <strong>depuis la version v.2.21.21.21 les firmwares des HDD/SSD sont complètement supportés</strong> même sur un contrôleur en mode HBA (passthrough).</p>
<p style="text-align: justify;">Malheureusement impossible de trouver dans les docs Dell les informations nécessaires pour y arriver :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ko.png" title="idrac_ftp_ko" rel="lightbox[5696]"><img class="aligncenter size-medium wp-image-5701" title="idrac_ftp_ko" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ko-299x242.png" alt="" width="299" height="242" /></a></p>
<p style="text-align: left;">Mais ça c’était avant de connaitre Lionel, Onsite System Engineer chez Dell, qui nous a donné le trick :</p>
<p style="text-align: left;"><a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ok.png" title="idrac_ftp_ok" rel="lightbox[5696]"><img class="aligncenter size-medium wp-image-5712" title="idrac_ftp_ok" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ok-300x274.png" alt="" width="300" height="274" /></a></p>
<p style="text-align: center;">
<blockquote><p>FTP Address : <strong>ftp.dell.com</strong><br />
User Name : <strong>anonymous</strong><br />
Password : <strong>user@domain.com</strong><br />
Catalog Location : <strong>/</strong><br />
Catalog Filename : <strong>Catalog.xml.gz</strong></p></blockquote>
<p style="text-align: left;">D’après le serveur ftp de Dell, le password doit etre un e-mail : &#8220;<strong>Anonymous access allowed, send identity (e-mail name) as password.</strong>&#8220;</p>
<p style="text-align: left;">Ensuite vous rebootez quand vous voulez et les patchs sont appliqués (rapidement) par le Lifecycle Controler :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ok_install.png" title="idrac_ftp_ok_install" rel="lightbox[5696]"><img class="alignnone size-thumbnail wp-image-5714" title="idrac_ftp_ok_install" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ok_install-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ok_reboot.png" title="idrac_ftp_ok_reboot" rel="lightbox[5696]"><img class="alignnone size-thumbnail wp-image-5715" title="idrac_ftp_ok_reboot" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ok_reboot-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ok_lifecycle.png" title="idrac_ftp_ok_lifecycle" rel="lightbox[5696]"><img class="alignnone size-thumbnail wp-image-5716" title="idrac_ftp_ok_lifecycle" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ok_lifecycle-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/ftp_dell_com/idrac_ftp_ok_flash.png" title="idrac_ftp_ok_flash" rel="lightbox[5696]"><img class="alignnone size-thumbnail wp-image-5717" title="idrac_ftp_ok_flash" src="http://www.hypervisor.fr/wp-content/uploads/2016/04/idrac_ftp_ok_flash-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">Merci Lionel <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5696</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dump ElasticSearch en Powershell</title>
		<link>http://www.hypervisor.fr/?p=5646</link>
		<comments>http://www.hypervisor.fr/?p=5646#comments</comments>
		<pubDate>Tue, 05 Jan 2016 17:20:49 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[SexiLog]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5646</guid>
		<description><![CDATA[Parce que les logs d&#8217;ESXi sont particulièrement éphémères, il est fortement recommandé de les rediriger vers un syslog. Dans le cadre d&#8217;un SR chez VMware, il nous a fallu extraire le contenu d&#8217;une appliance SexiLog pour plusieurs ESX sur une période donnée. On a fait chauffé le notepad++ pour faire un truc en powershell qui [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Parce que les logs d&#8217;ESXi sont particulièrement éphémères, il est fortement recommandé de les rediriger vers un syslog</strong>. Dans le cadre d&#8217;un SR chez VMware, il nous a fallu extraire le contenu d&#8217;une appliance <a href="http://www.sexilog.fr/" target="_blank">SexiLog</a> pour plusieurs ESX sur une période donnée. On a fait chauffé le notepad++ pour faire un truc en powershell qui fait le taff comme il faut :</p>
<pre class="brush: powershell; title: ; notranslate">
$i=0
$pre = '{&quot;fields&quot; : [&quot;message&quot;],&quot;from&quot;:'
$post = ',&quot;size&quot;: 2000,&quot;query&quot;:{&quot;filtered&quot;:{&quot;query&quot;:{&quot;bool&quot;:{&quot;should&quot;:[{&quot;query_string&quot;:{&quot;query&quot;:&quot;hostname.raw:esx.vmware.com&quot;}}]}},&quot;filter&quot;:{&quot;bool&quot;:{&quot;must&quot;:[{&quot;range&quot;:{&quot;@timestamp&quot;:{&quot;from&quot;:1450738800000,&quot;to&quot;:1450997999999}}}]}}}}}'
$msgs=1

while ($msgs) {
$msgs=$false
$body = $pre + $i + $post
$msgs=(Invoke-RestMethod -URI &quot;http://demo.sexilog.fr:9200/_search?pretty=1&quot; -Method 'POST' -ContentType 'application/json' -Body $body -TimeoutSec 5).hits.hits.fields.message
$msgs|%{$_.Trim()}|Out-File -FilePath c:\temp\esx.vmware.com.log -Append
$i=$i+2000
}
</pre>
<p style="text-align: justify;">Il convient de remplacer les FQDN <strong>esx.vmware.com</strong> et <strong>demo.sexilog.fr</strong> par les vôtres et d&#8217;ajuster les valeurs <strong>from/to</strong> en epoch.</p>
<p style="text-align: justify;">Le script extrait tous les messages pour le serveur donné, sur la période donné vers un fichier de log <strong>par batch de 2000</strong> :</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/ElasticDump/ElasticDumpBatch.png" alt="" width="462" height="124" /></p>
<p style="text-align: justify;">Et une fois l&#8217;export terminé, le script se termine par une erreur &#8220;attendue&#8221; :</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/ElasticDump/ElasticDumpStop.png" alt="" width="470" height="156" /></p>
<p style="text-align: left;">A titre indicatif, il a fallut 1h pour extraire 1Go de log. <a href="https://github.com/v-team/powercli-toolbox/blob/master/ElasticDump.ps1" target="_blank">Egalement dispo sur GitHub si besoin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5646</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Failing restore from old Win8 checkpoint</title>
		<link>http://www.hypervisor.fr/?p=5613</link>
		<comments>http://www.hypervisor.fr/?p=5613#comments</comments>
		<pubDate>Fri, 06 Nov 2015 00:19:18 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Active Directory Domain Services]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5613</guid>
		<description><![CDATA[Alors que Windows 2012 R2 est officiellement supporté comme GuestOS depuis ESXi 5.0 U1, un changement de la fameuse feature VM-Generation ID rend impossible le vmotion vers un ESXi de version supérieure comme le détail la kb 2033723:

Due to changes in Microsoft&#8217;s virtual machine generation counter specification that was introduced in the Windows 8 Release [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Alors que <a href="https://blogs.vmware.com/guestosguide/2012/09/windows-server-2012-2.html" target="_blank">Windows 2012 R2 est officiellement supporté comme GuestOS depuis ESXi 5.0 U1</a>, un changement de la fameuse feature <a href="https://blogs.vmware.com/apps/2013/01/windows-server-2012-vm-generation-id-support-in-vsphere.html">VM-Generation ID</a> rend impossible le vmotion vers un ESXi de version supérieure comme le détail la <a href="http://kb.vmware.com/kb/2033723" target="_blank">kb 2033723</a>:</p>
<blockquote>
<p style="text-align: justify;">Due to changes in Microsoft&#8217;s virtual machine generation counter specification that was introduced in the Windows 8 Release Preview and Windows Server 2012 RC, corresponding changes were also required in the virtual machine BIOS. Snapshots, checkpoints and VMotion actions of virtual machines with these versions of Windows are not compatible between ESXi hosts that have implemented different revisions of Microsoft&#8217;s virtual machine generation counter specification.</p>
<p style="text-align: justify;">Snapshots and checkpoints of virtual machines with Windows 8 or Windows Server 2012 that are taken on a host running ESXi 5.0 Update 1 or ESXi 5.0 P03 will not resume on a host running later versions of ESXi ( ESXi 5.0 Update 2, ESXi 5.1, etc.) and the reverse.</p>
<p style="text-align: justify;"><strong>VMotion is prevented between hosts running ESXi 5.0 Update 1 or ESXi 5.0 P03 to and from hosts running later versions of ESXi</strong>.</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/vmGenCounter_50_vmotion.png" alt="" width="500" height="336" /></p>
<blockquote><p>2015-11-05T15:01:32.804Z| vmx| I120: DUMPER: Group &#8216;VMGenCtr&#8217; not found.<br />
2015-11-05T15:01:32.804Z| vmx| I120: CPT: could not find group VMGenCtr<br />
2015-11-05T15:01:32.804Z| vmx| I120: DUMPER: Item &#8216;AddrReg&#8217; [-1, -1] not found.<br />
2015-11-05T15:01:32.804Z| vmx| I120: DUMPER: Item &#8216;CtrCount&#8217; [-1, -1] not found.<br />
2015-11-05T15:01:32.804Z| vmx| I120: DUMPER: Item &#8216;CtrCountX&#8217; [-1, -1] not found.<br />
2015-11-05T15:01:32.804Z| vmx| I120: <strong>VMGenCtrCheckpoint: Failing restore from old Win8 checkpoint</strong><br />
[...]<br />
2015-11-05T15:01:32.804Z| vmx| I120: [msg.checkpoint.migration.failedReceive] Failed to receive migration.<br />
2015-11-05T15:01:32.804Z| vmx| I120: [msg.checkpoint.mrestoregroup.failed] An error occurred restoring the virtual machine state during migration.</p></blockquote>
<p style="text-align: justify;">Evidemment la solution proposée par VMware passe par un shutdown de la VM mais lors d&#8217;une grosse migration ça fait pas sérieux donc nous avons cherché un vrai workaround.</p>
<p style="text-align: justify;">Sachant que <strong>cette feature est exclusivement utilisé par <a href="https://www.vmware.com/files/pdf/solutions/Virtualizing-Active-Directory-Domain-Services-on-VMware-vSphere.pdf" target="_blank">Active Directory Domain Services</a></strong> (pourquoi l&#8217;imposer à toutes les VM d&#8217;ailleurs ?!), nous avons chercher à la désactiver pour que le resume du vmotion sur l&#8217;ESXi de destination ne pose plus de problème. Et pas plus loin que dans <a href="http://kb.vmware.com/kb/2021887" target="_blank">une autre kb vmware</a>, nous avons trouvé la solution:</p>
<blockquote><p>The workaround involving adding the <strong>vmGenCounter.enable</strong> parameter to the virtual machine .vmx file may cause the new snapshot protection for domain controllers introduced in Windows 8/Windows Server 2012 to stop functioning.</p></blockquote>
<p>Un petit coup de PowerCLI pour appliquer le setting à chaud :</p>
<pre class="brush: powershell; title: ; notranslate">Get-VM Windows2012R2|Get-View|%{$_.ReconfigVM((New-Object VMware.Vim.VirtualMachineConfigSpec -Property @{extraconfig=@((New-Object VMware.Vim.optionvalue -Property @{Key=&quot;vmGenCounter.enable&quot;;Value=&quot;FALSE&quot;}))}))}</pre>
<p>Et le vmotion passe en douceur <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=5613</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>visor-thin &amp; vsantraces</title>
		<link>http://www.hypervisor.fr/?p=5592</link>
		<comments>http://www.hypervisor.fr/?p=5592#comments</comments>
		<pubDate>Sat, 10 Oct 2015 21:13:14 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VSAN]]></category>
		<category><![CDATA[scratch]]></category>
		<category><![CDATA[SD card]]></category>
		<category><![CDATA[stateless]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[VisorFS]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5592</guid>
		<description><![CDATA[Sur un cluster VSAN composé d&#8217;ESXi 6.0 bootant sur des cartes SD, nous avons récemment été confronté à ces erreurs :
&#60;14&#62;2015-09-04T22:03:39.616Z esx.vmware.com vobd:  [VisorfsCorrelator] 2274728093499us: [esx.problem.visorfs.ramdisk.full] The ramdisk &#8216;vsantraces&#8217; is full.  As a result, the file /vsantraces/vsantraces&#8211;2015-09-04T21h31m52s079.gz could not be written.
[...]
&#60;14&#62;2015-09-04T21:00:53.492Z esx.vmware.com vobd:  [VisorfsCorrelator] 2269273677949us: [vob.visorfs.ramdisk.full] Cannot extend visorfs file /vsantraces/vsantraces&#8211;2015-09-04T19h34m10s776.gz because its ramdisk (vsantraces) [...]]]></description>
			<content:encoded><![CDATA[<p>Sur un <strong>cluster VSAN composé d&#8217;ESXi 6.0 bootant sur des cartes SD</strong>, nous avons récemment été confronté à ces erreurs :</p>
<blockquote><p>&lt;14&gt;2015-09-04T22:03:39.616Z esx.vmware.com vobd:  [VisorfsCorrelator] 2274728093499us: [esx.problem.visorfs.ramdisk.full] The ramdisk &#8216;vsantraces&#8217; is full.  As a result, the file /vsantraces/vsantraces&#8211;2015-09-04T21h31m52s079.gz could not be written.</p>
<p>[...]</p>
<p>&lt;14&gt;2015-09-04T21:00:53.492Z esx.vmware.com vobd:  [VisorfsCorrelator] 2269273677949us: [vob.visorfs.ramdisk.full] Cannot extend visorfs file /vsantraces/vsantraces&#8211;2015-09-04T19h34m10s776.gz because its ramdisk (vsantraces) is full.</p></blockquote>
<p style="text-align: justify;">La cause de ce problème est assez simple : <a href="http://www.hypervisor.fr/?p=2405"><strong>booter ESXi via USB ou SD card = visor-thin = partition /scratch dans la RAM</strong></a>. Et quand vous n&#8217;avez pas de scratch persistante, <strong>la partition /vsantraces est configurée par défaut à 300MB</strong> comme vous pouvez le constater dans /etc/vmware/vsan/vsantraced.conf :</p>
<blockquote><p># Ramdisk size in MB (do not increase over 300MB without a matching increase<br />
# to coredump size).<br />
#VSANTRACED_RAMDISK_SIZE=300</p></blockquote>
<p>Or comme l&#8217;explique Cormac dans son post <a href="http://cormachogan.com/2015/02/24/vsan-considerations-when-booting-from-usbsd/">VSAN considerations when booting from USB/SD</a> :</p>
<blockquote><p><strong>VSAN traces require ~500MB of disk space.</strong></p></blockquote>
<p style="text-align: justify;">Aprés quelques échanges avec le support VMware, il nous a été confirmé qu&#8217;il était possible et <strong>supporté</strong> de changer la taille de cette partition en modifiant vsantraced.conf, ce que nous avons pu tester et valider en l’augmentant à 500MB pour mettre fin aux erreurs :</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/VSAN/vsantraces_500MB.png" alt="" width="491" height="203" /></p>
<p>GSS nous a cependant mis en garde :</p>
<blockquote><p>Just be aware that if you do so, you also must increase coredump size by the same value.</p></blockquote>
<p>Il nous a également fallu <a href="http://kb.vmware.com/kb/1010611"><strong>rediriger le workingdir de la commande vm-support</strong></a> (lorsque nous en avons besoin) pour éviter l&#8217;erreur suivante :</p>
<blockquote><p>IOError: [Errno 28] No space left on device</p></blockquote>
<p>Une autre info interessante sur le sujet : <a href="http://cormachogan.com/2015/08/14/handling-vsan-trace-files-when-esxi-boots-from-a-flash-device/">Handling VSAN trace files when ESXi boots from a flash device</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5592</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VsanHostDecommissionMode en PowerCLI</title>
		<link>http://www.hypervisor.fr/?p=5581</link>
		<comments>http://www.hypervisor.fr/?p=5581#comments</comments>
		<pubDate>Sat, 08 Aug 2015 00:03:51 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[VSAN]]></category>
		<category><![CDATA[esxcli]]></category>
		<category><![CDATA[Get-EsxCli]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5581</guid>
		<description><![CDATA[Pour les 7 ans d&#8217;Hypervisor.fr (si,si, c&#8217;est aujourd&#8217;hui) nous vous offrons un petit onliner pour mettre en maintenance un des nœuds de votre cluster VSAN en PowerCLI, dans la lignée de nos précédents posts &#8220;vSphere sans le webclient&#8221;.
Nous étions parti pour utiliser le script disponible sur VSANTeam.info mais il est malheureusement faux car il n&#8217;inclus pas l&#8217;objet [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Pour les 7 ans d&#8217;<strong>Hypervisor.fr</strong> (<a href="http://www.hypervisor.fr/?p=1" target="_blank">si,si, c&#8217;est aujourd&#8217;hui</a>) nous vous offrons un petit onliner pour <strong>mettre en maintenance un des nœuds de votre cluster VSAN en PowerCLI</strong>, dans la lignée de nos précédents posts &#8220;vSphere sans le webclient&#8221;.</p>
<p style="text-align: justify;">Nous étions parti pour utiliser le script disponible sur <a href="http://vsanteam.info/maintenance-mode-using-powercli/" target="_blank">VSANTeam.info</a> mais il est malheureusement faux car il n&#8217;inclus pas l&#8217;objet <a href="http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.vsan.host.DecommissionMode.ObjectAction.html" target="_blank">VsanHostDecommissionModeObjectAction</a> et donc <strong>le mode &#8220;ensureObjectAccessibility&#8221; est utilisé par défaut</strong>. Donc pour pouvoir utiliser le mode &#8220;evacuateAllData&#8221; ou &#8220;noAction&#8221; c&#8217;est comme ça qu&#8217;on fait :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType HostSystem -Filter @{&quot;Name&quot; = &quot;esx.vmware.com&quot; }|?{!$_.Runtime.InMaintenanceMode}|%{$_.EnterMaintenanceMode(0, $false, (new-object VMware.Vim.HostMaintenanceSpec -Property @{vsanMode=(new-object VMware.Vim.VsanHostDecommissionMode -Property @{objectAction=[VMware.Vim.VsanHostDecommissionModeObjectAction]::NoAction})}))}</pre>
<p>Sinon vous pouvez aussi le faire avec Get-EsxCli en vous inspirant <a href="http://www.virtuallyghetto.com/2014/07/quick-tip-steps-to-shutdownstartup-vsan-cluster-wvcenter-running-on-vsan-datastore.html" target="_blank">du post de William</a>.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://files.hypervisor.fr/img/vSAN.png" alt="" width="349" height="260" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5581</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>multiple &#8220;esxcli software vib remove&#8221;</title>
		<link>http://www.hypervisor.fr/?p=5571</link>
		<comments>http://www.hypervisor.fr/?p=5571#comments</comments>
		<pubDate>Tue, 28 Jul 2015 10:28:11 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[esxcli]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5571</guid>
		<description><![CDATA[Pour éviter de perdre encore 1/4 d&#8217;heure dessus la prochaine fois, voici comment désinstaller plusieurs vib en une seule commande (contrairement aux vilaines KB VMware) :
esxcli software vib remove -n vib1 -n vib2 -n vib3

Et pour ceux qui veulent du lourd sur esxcli, jetez un un oeil au Quick Tutorial de Steve Jin.
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Pour éviter de perdre encore 1/4 d&#8217;heure dessus la prochaine fois, voici comment <strong>désinstaller plusieurs vib en une seule commande</strong> (<a href="http://kb.vmware.com/kb/2036167" target="_blank">contrairement aux vilaines KB VMware</a>) :</p>
<blockquote><p>esxcli software vib remove -n vib1 -n vib2 -n vib3</p></blockquote>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/esxcli_multiple_remove.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/esxcli_multiple_remove.png" alt="" width="478" height="490" /></a></p>
<p style="text-align: left;">Et pour ceux qui veulent du lourd sur esxcli, jetez un un oeil au <a href="http://www.doublecloud.org/2015/05/vmware-esxi-esxcli-command-a-quick-tutorial/" target="_blank">Quick Tutorial de Steve Jin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5571</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LPoD on VDI</title>
		<link>http://www.hypervisor.fr/?p=5456</link>
		<comments>http://www.hypervisor.fr/?p=5456#comments</comments>
		<pubDate>Thu, 02 Apr 2015 14:32:22 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[deduplication]]></category>
		<category><![CDATA[large pages]]></category>
		<category><![CDATA[overcommit]]></category>
		<category><![CDATA[TPS]]></category>
		<category><![CDATA[Transparent Page Sharing]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5456</guid>
		<description><![CDATA[Nous avons eu l&#8217;opportunité de déployer notre fameuse sauce &#8220;Large Page on Demand&#8220; sur un environnement VDI de 5 stretched cluster de 32 nodes (soit 160 lames HP BL460c Gen8 bi E5 2680 v2 &#8211; 256Go) pour un total de 5000 VM Windows 7. Voici le summary d&#8217;un des cluster :

Sans autre tuning que le [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Nous avons eu l&#8217;opportunité de déployer <a href="http://www.hypervisor.fr/?p=5265">notre fameuse sauce &#8220;<strong>Large Page on Demand</strong>&#8220;</a> sur un environnement VDI de 5 <a href="http://www.hypervisor.fr/?p=4940" target="_blank">stretched cluster</a> de 32 nodes (soit 160 lames HP BL460c Gen8 bi E5 2680 v2 &#8211; 256Go) pour un total de <strong>5000 VM Windows 7</strong>. Voici le summary d&#8217;un des cluster :</p>
<p style="text-align: justify;"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/cluster_sample.png" alt="" width="343" height="352" /></p>
<p style="text-align: justify;">Sans autre tuning que le paramètre <a href="http://pubs.vmware.com/vsphere-60/topic/com.vmware.vsphere.resmgmt.doc/GUID-D98E6EC9-3730-4BC0-A9FC-93B9079E1AEE.html" target="_blank">LPageAlwaysTryForNPT</a>, TPS nous a permis de récupérer <strong>plus de 50% de RAM soit + de 12.5To sans impact sur le ressenti utilisateur</strong> (cliquez sur les graphs pour avoir le détail des compteurs) :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_a000_week.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_a000_small.png" alt="" width="395" height="172" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_b000_week.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_b000_small.png" alt="" width="395" height="172" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_c000_week.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_c000_small.png" alt="" width="395" height="172" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_d000_week.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_d000_small.png" alt="" width="395" height="172" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_e000_week.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_e000_small.png" alt="" width="395" height="172" /></a></p>
<p>Merci qui ? <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5456</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>vSphere 2015 : VMFS on USB</title>
		<link>http://www.hypervisor.fr/?p=5461</link>
		<comments>http://www.hypervisor.fr/?p=5461#comments</comments>
		<pubDate>Sun, 29 Mar 2015 20:38:12 +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[homelab]]></category>
		<category><![CDATA[inception]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5461</guid>
		<description><![CDATA[Alors que nous commençons tout doucement à apprivoiser ESXi 6.0 (aka vSphere 2015), nous tombons sur le post de William qui décrit comment utiliser des clefs USB (et du iSCSI) avec VSAN 6. Entre ça, le support des VMXNET3, les vmtools pour ESXi, le fling Mac Learning dvFilter, le support du Virtual Hardware-Assisted Virtualization et le [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Alors que nous commençons tout doucement à apprivoiser ESXi 6.0 (aka <a href="http://blogs.vmware.com/developer/2014/07/vsphere-2015-beta-is-here.html" target="_blank">vSphere 2015</a>), nous tombons sur le post de William qui décrit <strong>comment utiliser des clefs USB (et du iSCSI) avec VSAN 6</strong>. Entre ça, <a href="http://www.virtuallyghetto.com/2012/09/nested-esxi-51-supports-vmxnet3-network.html" target="_blank">le support des VMXNET3</a>, <a href="http://www.virtuallyghetto.com/2015/02/vmware-tools-is-now-pre-installed-with-nested-esxi-6-0.html" target="_blank">les vmtools pour ESXi,</a> <a href="https://labs.vmware.com/flings/esxi-mac-learning-dvfilter" target="_blank">le fling Mac Learning dvFilter</a>, le support du <a href="http://www.virtuallyghetto.com/2012/08/how-to-enable-nested-esxi-other.html" target="_blank">Virtual Hardware-Assisted Virtualization</a> et le <a href="http://kb.vmware.com/kb/2044876">support d&#8217;Hyper-V en GuestOS</a>, nous nous sommes laisser dire qu&#8217;on pourrait refaire un petit <strong>test de <a href="http://nybbl.blogspot.ae/2013/08/vmfs-formatted-usb-sticks-in-vmware.html" target="_blank">formatage VMFS sur une clef USB</a></strong>&#8230;</p>
<p>Et on a bien fait, parce qu&#8217;on a même réussi à <strong>créer une partition VMFS sur une clef de boot ESXi 6.0</strong> :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb_gui.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb_gui.png" alt="" width="503" height="418" /></a></p>
<p style="text-align: left;"><a href="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb_gui.png" target="_blank"></a><span style="text-align: left;">Pour que ça ait de la gueule, nous avons utilisé ce qui se fait de mieux en la matière : </span><a style="text-align: left;" href="http://www.mx-technology.com/en/product/flash2.php?sid=38#fragment-19" target="_blank">une clef USB 3.0 MX-ES SLC NAND Ultimate Endurance</a><span style="text-align: left;"> capable d&#8217;encaisser 180Mo/s en écriture.</span></p>
<p style="text-align: center;"><a href="https://twitter.com/hypervisor_fr/status/453289057808683008"><img class="aligncenter" src="http://files.hypervisor.fr/img/VMFSonUSB/ATTO_MXES.png" alt="" width="531" height="340" /></a></p>
<p style="text-align: left;">La procédure est la même que pour créer un datastore en cli avec <a href="http://kb.vmware.com/kb/1036609" target="_blank"><strong>partedUtil</strong> </a>et <strong><a href="http://kb.vmware.com/kb/1009829" target="_blank">vmkfstools</a></strong> :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb_cli.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb_cli.png" alt="" width="530" height="325" /></a></p>
<p style="text-align: left;">Et pour le fun, on a aussi essayer sur une clef Kingston/VMware ESXi &#8220;special&#8221; :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb2_cli.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/VMFSonUSB/vsp60_vmfs_usb2_cli.png" alt="" width="530" height="265" /></a></p>
<p>Nous vous laissons imaginer les possibilités que cette nouvelle &#8220;<strong>unsupported</strong>&#8220; feature pendant que nous préparons un post qui n&#8217;attendait que ça pour voir le jour&#8230;</p>
<p style="text-align: center;"><a href="https://twitter.com/hypervisor_fr/status/498542017333710848" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/VMFSonUSB/KingESXi_s.jpg" alt="" width="512" height="384" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5461</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Phucking Salt</title>
		<link>http://www.hypervisor.fr/?p=5298</link>
		<comments>http://www.hypervisor.fr/?p=5298#comments</comments>
		<pubDate>Fri, 13 Feb 2015 07:54:16 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Kb]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Bullshit]]></category>
		<category><![CDATA[overcommit]]></category>
		<category><![CDATA[salt]]></category>
		<category><![CDATA[TPS]]></category>
		<category><![CDATA[Transparent Page Sharing]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5298</guid>
		<description><![CDATA[MAJ 18/05/2016 : Finalement les Large Pages c&#8217;est vraiment pas top&#8230;

These issues are due to bug in large page promotion path on destination host during vMotion.

MAJ 22/10/2015 : Et encore des mecs qui confondent cloud et homelab&#8230;
All experiments run on a dual CPU blade server with two AMD Opteron 6272 CPUs (16 cores each) and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 18/05/2016</span> : <a href="https://kb.vmware.com/kb/2144984" target="_blank">Finalement les Large Pages c&#8217;est vraiment pas top</a>&#8230;</em></p>
<blockquote>
<p style="text-align: justify;"><em>These issues are due to bug in large page promotion path on destination host during vMotion.</em></p>
</blockquote>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 22/10/2015</span> : Et encore des mecs qui <a href="https://www.usenix.org/system/files/conference/woot15/woot15-paper-barresi.pdf" target="_blank">confondent cloud et homelab</a>&#8230;</em></p>
<blockquote><p>All experiments run on a dual CPU blade server with two AMD Opteron 6272 CPUs (16 cores each) and 32 GB of RAM.</p></blockquote>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 26/02/2015</span> : <a href="http://kb.vmware.com/kb/2101903" target="_blank">Le patch pour la 5.0 vient de sortir</a>, la boucle est bouclée.</em></p>
<p style="text-align: justify;">Vous ne vous en êtes peut être pas rendu compte lors de votre dernière campagne de patching mais <a href="http://blogs.vmware.com/security/2014/10/transparent-page-sharing-additional-management-capabilities-new-default-settings.html" target="_blank"><strong>depuis mi-Octobre 2014, tout nouveau patch d&#8217;ESXi ajoute une fonctionnalité de salage pour TPS</strong></a>. <strong>Désactivée lors de son introduction mais bien destinée à être activée de force lors d&#8217;un patch ultérieur</strong>. Jusqu’à fin Janvier, seule la version 5.1 était concernée mais depuis le 27/01 la version 5.5 bénéficie aussi de cette nouvelle &#8220;feature&#8221;. <span style="text-decoration: line-through;">La 5.0 est encore épargnée à ce jour</span>.</p>
<blockquote>
<p style="text-align: justify;">As we noted earlier on Oct 16, Nov 24 and Dec 4, VMware has introduced new TPS (Transparent Page Sharing) management options. Today’s release of ESXi 5.5 U2d restricts TPS to individual VMs and disables inter-VM TPS by default unless an administrator chooses to re-enable it. Please see <a href="http://kb.vmware.com/kb/2097593" target="_blank">KB 2097593</a> for full details on the functionality.</p>
</blockquote>
<p style="text-align: justify;"><strong>Depuis l&#8217;annonce, beaucoup de bullshit</strong>. De nombreux blogeurs ont donné leur avis sur la question en omettant volontairement (aka je-suis-pas-un-expert-en-sécu) d&#8217;analyser les recherches qui ont abouti a cette rustine. Nous ne sommes pas expert en matière de sécurité non plus, par contre on ne va pas se gêner pour décortiquer les résultats de ces recherches et les critiquer. On commence par <a href="http://kb.vmware.com/kb/2080735" target="_blank">la kb 2080735 de VMware</a> :</p>
<blockquote>
<p style="text-align: justify;">Published academic papers have demonstrated that by forcing a flush and reload of cache memory, it is possible to measure memory timings to try and determine an AES encryption key in use on another virtual machine running on the same physical processor of the host server if Transparent Page Sharing is enabled between the two virtual machines. <strong>This technique works only in a highly controlled system configured in a non-standard way that VMware believes would not be recreated in a production environment</strong>.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">Even though VMware believes information being disclosed <strong>in real world conditions is unrealistic</strong>, out of an abundance of caution upcoming ESXi Update releases will no longer enable TPS between Virtual Machines by default</p>
</blockquote>
<p>C&#8217;est pourtant clair mais VMware à quand même choisi de jouer la carte de la sécurité.</p>
<p style="text-align: justify;"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/BeginNoSaltArea.jpg" alt="" width="306" height="203" /></p>
<p style="text-align: justify;">Une petit coup de Google nous a rapidement permis d&#8217;identifier les rapports de recherche à l&#8217;origine du mélodrame : <a href="https://eprint.iacr.org/2014/248.pdf" target="_blank">Fine grain Cross-VM Attacks on Xen and VMware are possible!</a> et <a href="https://eprint.iacr.org/2014/435.pdf" target="_blank">Wait a minute! A fast, Cross-VM attack on AES</a> dont les travaux semble basés sur un autre rapport datant de 2013 : <a href="https://eprint.iacr.org/2013/448.pdf" target="_blank">FLUSH+RELOAD: a High Resolution, Low Noise, L3 Cache Side-Channel Attack</a></p>
<p>Extraits choisis du document de 2013 :</p>
<blockquote>
<p style="text-align: justify;">The technique uses the processor’s clflush instruction to evict the monitored memory locations from the cache, and then tests whether the data in these locations is back in the cache after allowing the victim program to execute a small number of instructions.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">While copy-on-write protects shared pages from modifications, it is not fully transparent. <strong>The delay introduced when modifying a shared page can be detected</strong> by processes, leading to a potential information leak attack.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">An important feature of the LLC in modern Intel processors is that it is an inclusive cache (NDLR : <a href="http://en.wikipedia.org/wiki/CPU_cache#Exclusive_versus_inclusive" target="_blank">Et donc pas AMD</a>). That is, the LLC contains copies of all of the data stored in the lower cache levels. Consequently, flushing or evicting data from the LLC also remove said data from all other cache levels of the processor. Our attack exploits this cache behaviour.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;"><strong>Retrieving data from memory or from cache levels closer to memory takes longer than retrieving it from cache levels closer to the core. This difference in timing has been exploited for side-channel attacks</strong>.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">A round of attack consists of three phases. During the first phase, the monitored memory line is flushed from the cache hierarchy.</p>
<p style="text-align: justify;">The spy, then, waits to allow the victim time to access the memory line before the third phase.</p>
<p style="text-align: justify;">In the third phase, the spy reloads the memory line, measuring the time to load it. If during the wait phase the victim accesses the memory line, the line will be available in the cache and the reload operation will take a short time.</p>
</blockquote>
<p style="text-align: justify;">Maintenant qu&#8217;on en sait un peut plus sur la nature de l&#8217;attaque, voyons un peu les contraintes d&#8217;applications dans la vraie vie :</p>
<blockquote>
<p style="text-align: justify;">For a virtualised environment, <strong>the attacker needs access to a guest co-located on the same host as the victim guest</strong>. <a href="https://cseweb.ucsd.edu/~hovav/dist/cloudsec.pdf" target="_blank">Techniques for achieving co-location are described by Ristenpart et al</a>.<br />
[...]<br />
Identifying the OS and software version in co-resident guests has been dealt with <a href="https://staff.aist.go.jp/c.artho/papers/EuroSec2011-suzaki.pdf" target="_blank">in past research</a>.</p>
</blockquote>
<p>D&#8217;un coup de baguette magique, on se retrouve sur le même ESX avec le même GuestOS. Facile. On continue :</p>
<blockquote>
<p style="text-align: justify;">For the attack to work, <strong>the spy and the victim must execute on the same physical processor</strong>. For our testing, we set the processor affinity on the multi-processor system. However, in a real attack scenario the attack depends on the system scheduler.</p>
</blockquote>
<p style="text-align: justify;">Vous avez bien lu, la VM de l&#8217;attaquant doit résider sur le même processeur que la VM de la victime. Cache L3 oblige. Et c&#8217;est pas fini :</p>
<blockquote>
<p style="text-align: justify;"><strong>When performing the tests, the spy and the victim were the only load on the system</strong>. Such a scenario is not representative of a real system where multiple processes are running. We expect such load to create noise that will affect the quality of capture. Furthermore, for a load that includes multiple parallel instances of GnuPG, the spy will be unable to distinguish between memory access of each instance and will be unable to recover any data.</p>
</blockquote>
<p style="text-align: justify;">Donc, pour que l&#8217;attaque soit réalisable,<strong> il faut que la VM de l&#8217;attaquant se retrouve, avec la VM de la victime, seules sur le même socket du même ESX et avec le même GuestOS !</strong> Et c&#8217;est toujours pas fini.</p>
<p>Extraits choisis du document sur l&#8217;attaque AES :</p>
<blockquote>
<p style="text-align: justify;">We know that VMware implements TPS with large pages (2 MB) or small pages (4 KB). <strong>We decided to use the later one, since it seems to be the default for most systems</strong>. Furthermore, as stated in [<a href="http://www.vmware.com/files/pdf/mem_mgmt_perf_vsphere5.pdf" target="_blank">28</a>], even if the large page sharing is selected, the VMM will still look for identical small pages to share.</p>
</blockquote>
<p style="text-align: justify;">Sachant que <a href="http://www.hypervisor.fr/?p=4401" target="_blank"><strong>TPS ne supporte pas les large pages</strong></a> qui sont la configuration par défaut d&#8217;ESX depuis des années, non seulement <strong>ESX ne serait que partiellement vulnérable uniquement en cas d&#8217;overcommit important</strong> mais de plus le contexte initiale de l’étude est complètement faux.</p>
<blockquote>
<p style="text-align: justify;">Disabling the deduplication would make the attack impossible in the cloud however memory deduplication is highly performance beneficial, especially in cloud where multiple users share the same hardware. This is why we believe that the system designers should restrict the deduplication mechanism rather then completely disabling it.</p>
</blockquote>
<p>Quel dilemme&#8230;</p>
<blockquote><p>We not only performed the attack in native machine, but also in a <strong>cloud-like cross-VM scenario</strong>.</p></blockquote>
<p>&#8220;cloud-like&#8221; et pourtant :</p>
<blockquote><p>All experiments were performed on a machine featuring an Intel i5-3320M four core clocked at 3.2GHz.</p></blockquote>
<p><strong>Ironie du sort, <a href="https://eprint.iacr.org/2014/970.pdf" target="_blank">un récent rapport de recherche décrit un nouveau type d&#8217;attaque sur le cache L3 en exploitant&#8230;les large pages</a> !</strong></p>
<blockquote>
<p style="text-align: justify;"><strong>S$A: A new deduplication free L3 cache side channel technique</strong>: We proposed a new side channel technique that is applied in the L3 cache and therefore can be applied in cross-core scenarios. The new side channel technique bases its methodology in the usage of huge size pages, which give extra information about the position that each memory location occupies in the L3 cache.</p>
</blockquote>
<p>Prochaine étape : désactivation des large pages par défaut ou V2P en masse.</p>
<blockquote>
<p style="text-align: justify;">The relevance of these studies is highlighted by the prompt security update by VMware, making memory deduplication an opt-in feature that was formerly enabled by default.<br />
[...]<br />
We have disclosed our attack to the security teams of VMware, Amazon AWS and Citrix.</p>
</blockquote>
<p style="text-align: justify;">Mais revenons en au salting et à ses effets en cas d&#8217;overcommit. Sur un Dell R730 avec 256Go de RAM, nous nous sommes amusé à démarrer <strong>512 VM</strong> SUSE 11 x64 1vcpu 2Go de vRAM avec des combinaisons de settings Mem.ShareForceSalting et Mem.AllocGuestLargePage différentes. Pour éviter que ça coince pendant le swapout, nous avons <strong>redirigé les vswp sur des SSD NVMe</strong>. On commence en mode défaut (<strong>Mem.ShareForceSalting=2</strong> et <strong>Mem.AllocGuestLargePage=1</strong>) :</p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_2_AllocGuestLargePage_1.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_2_AllocGuestLargePage_1s.png" alt="" width="480" height="254" /></a></p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_2_AllocGuestLargePage_1.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_2_AllocGuestLargePage_1s.png" alt="" width="440" height="94" /></a></p>
<p style="text-align: justify;">La courbe d&#8217;overhead (orange) permet de se rendre compte de la progression du démarrage des 512 VM. On remarque qu&#8217;au 3/4 du bootstorm le premier mécanisme de reclaim est la swap, viennent ensuite la compression, le ballooning et seulement après le sharing (principalement des zéros). Avec 23Go de swap et 43Go de zip, n’espérez pas des temps de réponses de folie même avec du SSD. On continue sans le salting (<strong>Mem.ShareForceSalting=0</strong> et <strong>Mem.AllocGuestLargePage=1</strong>) :</p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_1.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_1s.png" alt="" width="480" height="254" /></a></p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_1.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_1s.png" alt="" width="452" height="92" /></a></p>
<p>Avec plus de 100Go de sharing et seulement 3,6Go de swap les effets de l&#8217;overcommit (3:1 quand même) sont presque imperceptibles dans ce scénario même si on regrette de constater que le swapping est encore le 1er mécanisme à se déclencher. Maintenant passons en full small pages (<strong>Mem.ShareForceSalting=0</strong> et <strong>Mem.AllocGuestLargePage=0</strong>) :</p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_0.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_0s.png" alt="" width="480" height="254" /></a></p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_0.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_0s.png" alt="" width="445" height="92" /></a></p>
<p style="text-align: justify;">Là on est au top, 200Go de sharing et un démarrage tout en douceur sans swap, compression ni balloon. Et pour finir, notre <a href="http://www.hypervisor.fr/?p=5265" target="_blank">fameuse technique du Large Page on Demand</a> (<strong>Mem.ShareForceSalting=0</strong> <strong>Mem.AllocGuestLargePage=1</strong> et <strong>LPage.LPageAlwaysTryForNPT=0</strong>) :</p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_1_LPageAlwaysTryForNPT_0.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/vim_ShareForceSalting_0_AllocGuestLargePage_1_LPageAlwaysTryForNPT_0s.png" alt="" width="480" height="254" /></a></p>
<p style="text-align: justify;"><a href="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_1_LPageAlwaysTryForNPT_0.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/salt/esxtop_ShareForceSalting_0_AllocGuestLargePage_1_LPageAlwaysTryForNPT_0s.png" alt="" width="469" height="92" /></a></p>
<p style="text-align: justify;">Même chose mais avec &#8220;seulement&#8221; 143Go de sharing, la différence étant vraisemblablement attribuée à des large pages.</p>
<p style="text-align: justify;">Moralité, <strong>optez pour un régime sans sel !</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5298</wfw:commentRss>
		<slash:comments>13</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>Large Pages on Demand</title>
		<link>http://www.hypervisor.fr/?p=5265</link>
		<comments>http://www.hypervisor.fr/?p=5265#comments</comments>
		<pubDate>Wed, 03 Sep 2014 12:08:59 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[large pages]]></category>
		<category><![CDATA[MMU]]></category>
		<category><![CDATA[NUMA]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[TPS]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5265</guid>
		<description><![CDATA[Comme nous vous l&#8217;avions promis, voici un retour d’expérience sur l&#8217;implémentation du paramètre LPageAlwaysTryForNPT à &#8220;0&#8243; qui force ESX à n&#8217;allouer une Large Page que lorsque le GuestOS d&#8217;une VM le lui demande explicitement et qui permet de bénéficier de TPS sans attendre que l&#8217;ESX n&#8217;ait à les &#8220;casser&#8221; en cas de contention.
In the cases [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.hypervisor.fr/?p=4401" target="_blank">Comme nous vous l&#8217;avions promis</a>, voici un retour d’expérience sur l&#8217;implémentation du paramètre <a href="http://pubs.vmware.com/vsphere-55/topic/com.vmware.vsphere.resmgmt.doc/GUID-D98E6EC9-3730-4BC0-A9FC-93B9079E1AEE.html" target="_blank">LPageAlwaysTryForNPT</a> à &#8220;0&#8243; qui force ESX à n&#8217;allouer une Large Page que lorsque le GuestOS d&#8217;une VM le lui demande explicitement et qui permet de bénéficier de TPS <a href="http://kb.vmware.com/kb/1021095" target="_blank">sans attendre que l&#8217;ESX n&#8217;ait à les &#8220;casser&#8221; en cas de contention</a>.</p>
<blockquote><p>In the cases where host memory is overcommitted, ESX may have to swap out pages. Since ESX will not swap out large pages, during host swapping, a large page will be broken into small pages.</p></blockquote>
<p style="text-align: justify;">Afin d&#8217;avoir une meilleure visibilité sur ce qui change au moment où nous avons activé le paramètre et lancé une vague de vmotion au sein du cluster pour l&#8217;appliquer, nous avons utilisé les mêmes compteurs que <a href="http://www.hypervisor.fr/?p=4841" target="_blank">le &#8220;dashboard&#8221; Guest Memory</a> (aka <a href="http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.ResourcePool.Summary.QuickStats.html" target="_blank">ResourcePoolQuickStats</a>) pour en faire un rrd sous cacti (avec les même couleurs) :</p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_utilization.png" alt="" width="418" height="321" /></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/LPoD/LPoD_quickstats.png"><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_quickstats.png" alt="" width="476" height="246" /></a></p>
<p style="text-align: justify;"><strong>Un gain immédiat de 20% de RAM sans consommation CPU supplémentaire</strong> ni augmentation manifeste de latence (dans notre cas) :</p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_cpu.png" alt="" width="395" height="172" /></p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/LPoD/LPoD_RAM.png" alt="" width="395" height="172" /></p>
<p style="text-align: justify;">Et pour ceux qui se posent la question, dans ce cluster cumulant 1.5To de RAM attribuée à des VM Windows 2008 R2 et RHEL 6 x64, seulement 40Go de Large Pages sont allouées en moyenne.</p>
<p style="text-align: justify;">Moralité, TPS c&#8217;est bon, mangez-en !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5265</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>storageRM level 1</title>
		<link>http://www.hypervisor.fr/?p=5252</link>
		<comments>http://www.hypervisor.fr/?p=5252#comments</comments>
		<pubDate>Fri, 08 Aug 2014 13:31:57 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[graylog2]]></category>
		<category><![CDATA[oneliner]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[SIOC]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5252</guid>
		<description><![CDATA[Instruit par la kb Troubleshooting Storage I/O Control (1022091), nous nous sommes rendu compte qu&#8217;en fixant le log level à 1, le service storageRM crachait les informations de latency, qdepth et iops des datastores concernés dans les logs d&#8217;ESXi (et donc vers le(s) serveur(s) syslog) toutes les 4 secondes. Sur une grosse infra ça peut faire [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Instruit par la kb <a href="http://kb.vmware.com/kb/1022091" target="_blank">Troubleshooting Storage I/O Control (1022091)</a>, nous nous sommes rendu compte qu&#8217;en fixant le log level à 1, le service storageRM crachait les informations de latency, qdepth et iops des datastores concernés dans les logs d&#8217;ESXi (et donc vers le(s) serveur(s) syslog) <a href="http://cormachogan.com/2013/06/20/storage-io-control-workload-injector-behaviour/" target="_blank">toutes les 4 secondes</a>. Sur une grosse infra ça peut faire beaucoup mais ça offre de belles perspective de monitoring/troubleshooting :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/StorageRM_1/sioc_avglatency_agg.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/StorageRM_1/sioc_avglatency_agg.png" alt="" width="494" height="407" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/StorageRM_1/sioc_datastore.png" title="sioc_datastore" rel="lightbox[5252]"><img class="alignnone size-thumbnail wp-image-5256" title="sioc_datastore" src="http://www.hypervisor.fr/wp-content/uploads/2014/08/sioc_datastore-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/StorageRM_1/sioc_avglatency.png" title="sioc_avglatency" rel="lightbox[5252]"><img class="alignnone size-thumbnail wp-image-5255" title="sioc_avglatency" src="http://www.hypervisor.fr/wp-content/uploads/2014/08/sioc_avglatency-150x150.png" alt="" width="150" height="150" /></a> <a href="http://files.hypervisor.fr/img/StorageRM_1/sioc_iops.png" title="sioc_iops" rel="lightbox[5252]"><img class="alignnone size-thumbnail wp-image-5257" title="sioc_iops" src="http://www.hypervisor.fr/wp-content/uploads/2014/08/sioc_iops-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">Et voici le oneliner PowerCLI pour le faire vite et bien :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType HostSystem|?{$_.Runtime.ConnectionState -eq &quot;connected&quot; -and $_.config.product.ProductLineId -eq &quot;embeddedEsx&quot; -and ($_.Config.Option|?{$_.Key -eq &quot;Misc.SIOControlLogLevel&quot;}).Value -ne &quot;1&quot;}|%{(Get-View $_.ConfigManager.AdvancedOption).UpdateOptions((New-Object VMware.Vim.OptionValue -Property @{Key=&quot;Misc.SIOControlLogLevel&quot;;Value=[Int64]1}))}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5252</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WinBSOD in vmware.log</title>
		<link>http://www.hypervisor.fr/?p=5221</link>
		<comments>http://www.hypervisor.fr/?p=5221#comments</comments>
		<pubDate>Fri, 04 Jul 2014 07:27:39 +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[BSOD]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=5221</guid>
		<description><![CDATA[Lors d&#8217;une petite séance de troubleshooting décontractée, nous avons été agréablement surpris de constater que lors d&#8217;un BSOD sous Windows, le texte affiché était redirigé dans le vmware.log de la VM. Ça évite l&#8217;OCR&#8230;

La seule référence que nous ayons pu trouver à ce sujet est une kb d&#8217;un path pour ESXi 5.0, dommage.
En passant, nous vous [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Lors d&#8217;une petite séance de troubleshooting décontractée, nous avons été agréablement surpris de constater que <strong>lors d&#8217;un BSOD sous Windows, le texte affiché était redirigé dans le vmware.log</strong> de la VM. <a href="http://www.ntpro.nl/blog/archives/1100-Virtual-Machine-Blue-Screen-detector.html" target="_blank">Ça évite l&#8217;OCR</a>&#8230;</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/WinBSOD.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/WinBSOD_small.png" alt="" width="536" height="273" /></a></p>
<p style="text-align: justify;">La seule référence que nous ayons pu trouver à ce sujet est <a href="http://kb.vmware.com/kb/2065700" target="_blank">une kb d&#8217;un path pour ESXi 5.0</a>, dommage.</p>
<p style="text-align: justify;">En passant, nous vous rappelons qu&#8217;<a href="http://www.virtuallyghetto.com/2013/07/a-hidden-vsphere-51-gem-forwarding.html" target="_blank">il est possible de rediriger le log d&#8217;une VM vers le syslog d&#8217;ESXi</a> pour vous éviter de fouiller dans le fichier vmware.log et c&#8217;est bien sûr faisable à chaud en PowerCLI (comme d&#8217;hab, vmotion pour appliquer le setting) :</p>
<pre class="brush: powershell; title: ; notranslate">Get-VM toto|Get-View|?{-not $_.Config.Template -and $_.Runtime.ConnectionState -eq &quot;connected&quot;}|%{$_.ReconfigVM((New-Object VMware.Vim.VirtualMachineConfigSpec -Property @{extraconfig=@((New-Object VMware.Vim.optionvalue -Property @{Key=&quot;vmx.log.destination&quot;; Value=&quot;syslog-and-disk&quot;}))}))}</pre>
<p style="text-align: justify;">Après on peut faire des belles requêtes dans son Graylog2 :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vm2syslog.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vm2syslog_small.png" alt="" width="487" height="564" /></a></p>
<p style="text-align: left;">Un grand merci à <a href="https://twitter.com/lamw" target="_blank">William</a> pour cette pépite.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=5221</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>
	</channel>
</rss>
