<?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; snapshot</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=snapshot" 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>Alarme vCenter pour les snapshots mal consolidés</title>
		<link>http://www.hypervisor.fr/?p=4089</link>
		<comments>http://www.hypervisor.fr/?p=4089#comments</comments>
		<pubDate>Thu, 30 Aug 2012 22:11:53 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[vmdk]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4089</guid>
		<description><![CDATA[A la sortie de vSphere 5, la fonctionnalité bien sympathique &#8221;consolidate&#8221; faisait son apparition dans le menu snapshot. Destinée à être utilisé lorsque une consolidation de snapshot (delete/delete all) s&#8217;est mal passée, elle est accompagnée d&#8217;un petit message d&#8217;avertissement au niveau de la VM :

Malheureusement il faut être sur la vm pour voir ce message, d&#8217;où l&#8217;idée d&#8217;un ami champion de badminton de faire [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A la sortie de vSphere 5, <a href="http://blogs.vmware.com/vsphere/2011/08/consolidate-snapshots.html" target="_blank">la fonctionnalité bien sympathique &#8221;consolidate&#8221; faisait son apparition dans le menu snapshot</a>. Destinée à être utilisé lorsque une consolidation de snapshot (delete/delete all) s&#8217;est mal passée, elle est accompagnée d&#8217;un petit message d&#8217;avertissement au niveau de la VM :</p>
<p style="text-align: justify;"><img class="aligncenter" src="http://files.hypervisor.fr/img/vmdk_consolidation_issue.png" alt="" width="387" height="155" /></p>
<p style="text-align: justify;">Malheureusement il faut être sur la vm pour voir ce message, d&#8217;où l&#8217;idée d&#8217;un ami champion de badminton de faire une alarme pour remonter cet event !</p>
<p style="text-align: justify;">Ni une, ni deux, un petit oneliner qui va créer la précieuse alarme :</p>
<pre class="brush: powershell; title: ; notranslate">if (!((Get-View AlarmManager).GetAlarm((Get-Folder -NoRecursion |Get-View).MoRef)|?{(get-view $_).info.name -match &quot;VM disks consolidation is needed&quot;})){(Get-View AlarmManager).CreateAlarm((Get-Folder -NoRecursion |Get-View).MoRef,(New-Object VMware.Vim.AlarmSpec -Property @{Name = &quot;VM disks consolidation is needed&quot;;Description = &quot;Custom alarm to monitor com.vmware.vc.VmDiskConsolidationNeeded event&quot;;Enabled = $true;expression = (New-Object VMware.Vim.OrAlarmExpression -Property @{expression = @((New-Object VMware.Vim.EventAlarmExpression -Property @{eventType = &quot;EventEx&quot;;EventTypeId = &quot;com.vmware.vc.VmDiskConsolidationNeeded&quot;;objectType = &quot;VirtualMachine&quot;;status = &quot;red&quot;});(New-Object VMware.Vim.EventAlarmExpression -Property @{eventType = &quot;EventEx&quot;;EventTypeId = &quot;com.vmware.vc.VmDiskConsolidatedEvent&quot;;objectType = &quot;VirtualMachine&quot;;status = &quot;green&quot;}))});Action=(New-Object VMware.Vim.GroupAlarmAction -Property @{Action= (New-Object VMware.Vim.AlarmTriggeringAction -Property @{Action = (New-Object VMware.Vim.SendEmailAction -Property @{ToList = &quot;admin@vmware.local&quot;;Subject = &quot;[vAlarm] {targetName} VM disks consolidation is needed - {newStatus}&quot;;CcList = &quot;&quot;;Body = &quot;&quot;});TransitionSpecs = @((New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec -Property @{StartState = &quot;yellow&quot;;FinalState = &quot;red&quot;;Repeats = $false}))})});ActionFrequency = &quot;1800&quot;}))}</pre>
<p>Comme d&#8217;hab, il faut remplacer &#8220;admin@vmare.local&#8221; par le mail qui vous convient et rajouter (ou remplacer) un envoi de trap snmp si besoin. Cette alarme s&#8217;auto-acquittera lorsque la consolidation sera réussie :</p>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/vmdk_consolidation.png" alt="" width="411" height="187" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4089</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PSH] Raiders of the Lost VM files &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=3612</link>
		<comments>http://www.hypervisor.fr/?p=3612#comments</comments>
		<pubDate>Fri, 24 Feb 2012 08:47:20 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[ZFS]]></category>
		<category><![CDATA[CBT]]></category>
		<category><![CDATA[oneliner]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[vmdk]]></category>
		<category><![CDATA[VMFS]]></category>
		<category><![CDATA[vmx]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=3612</guid>
		<description><![CDATA[MAJ 23/05/2015 : Mise à jours des scripts pour exclure que les fichiers &#8220;.lck&#8221; (VSAN).
MAJ 30/10/2012 : Mise à jours des scripts pour n&#8217;exclure que les vm &#8220;invalid&#8221; ou &#8220;orphaned&#8221;.
MAJ 06/07/2012 : Mise à jour des scripts pour exclure &#8220;*/hostCache/*&#8221; pour ne pas remonter les fichiers vswp de la fonction Host Cache d&#8217;ESXi 5.
MAJ 05/07/2012 [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 23/05/2015</span> : Mise à jours des scripts pour exclure que les fichiers &#8220;.lck&#8221; (VSAN).</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 30/10/2012</span> : Mise à jours des scripts pour n&#8217;exclure que les vm &#8220;invalid&#8221; ou &#8220;orphaned&#8221;.</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 06/07/2012</span> : Mise à jour des scripts pour exclure &#8220;*/hostCache/*&#8221; pour ne pas remonter <a href="http://www.yellow-bricks.com/2011/08/18/swap-to-host-cache-aka-swap-to-ssd/" target="_blank">les fichiers vswp de la fonction Host Cache d&#8217;ESXi 5</a>.</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 05/07/2012</span> : Mise à jour des scripts pour intégrer les fichiers vswp.xxxxxx, <a href="http://vmice.wordpress.com/2012/07/04/vm-swapfiles-leftover-swapfiles/" target="_blank">merci à Larus Hjartarson pour l&#8217;idée</a>.</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 21/03/2012</span> : Mise à jour des scripts pour exclure &#8220;var/tmp/cache&#8221; dans le cas d&#8217;une redirection de la partition scratch sur un datastore.</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 06/03/2012</span> : Mise à jour des scripts pour le support des <strong>multi-datacenter/multi-vcenter</strong>, des snapshot NetApp et des fichiers zdump qui trainent.</em></p>
<p style="text-align: center;"><em><a href="http://files.hypervisor.fr/img/lostvmfilemulti.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/lostvmfilemulti.png" alt="" width="521" height="379" /></a><br />
</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 28/02/2012</span><em> :</em></em><em> Mise à jour des scripts suite à une erreur dans le &#8220;SideIndicator&#8221;</em></p>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 24/02/2012</span><em> : </em></em><em>Et pour ceux qui ont <strong>*<span style="color: #ff0000;">VRAIMENT</span>*</strong> confiance, voici le script pour supprimer les fichiers vswp orphelins (et si vraiment vous en avez, vous pouvez changer le filtrage au niveau du </em><strong>|?{$_.lostfile -match &#8220;vswp&#8221;}</strong>)<em> :</em></p>
<pre class="brush: powershell; title: ; notranslate">foreach ($lost in (compare -passthru -property path $(foreach ($ds in ((get-view -ViewType datastore|sort name -unique|?{$_.summary.accessible}|%{(get-view $_.browser).SearchDatastoreSubFolders($(&quot;[&quot; + $_.Name + &quot;]&quot;),(New-Object VMware.Vim.HostDatastoreBrowserSearchSpec -property @{matchPattern=(&quot;*zdump*&quot;,&quot;*.xml&quot;,&quot;*.vmsn&quot;,&quot;*.vmsd&quot;,&quot;*.vswp*&quot;, &quot;*.vmx&quot;,&quot;*.vmdk&quot;,&quot;*.vmss&quot;,&quot;*.nvram&quot;,&quot;*.vmxf&quot;); details=(New-Object VMware.Vim.FileQueryFlags -property @{filesize=$true;modification=$true})}))})|?{$_.file})){foreach ($files in $ds.file){$files|?{$_.Path -notmatch &quot;-ctk.vmdk|esxconsole.vmdk|esxconsole-flat.vmdk&quot;}|select @{n=&quot;path&quot;;e={$ds.FolderPath + $files.path|%{$_ -replace &quot; &quot;,&quot;&quot;}}},FileSize,Modification|?{$_.path -notmatch &quot;.zfs|.snapshot|var/tmp/cache|/hostCache/|.lck&quot;}}}) $(get-view -ViewType virtualmachine|?{$_.Runtime.ConnectionState -notmatch &quot;invalid|orphaned&quot;}|%{$_.layoutex.file}|?{$_.type -ne &quot;log&quot;}|%{$_.name}|%{$_ -replace &quot; &quot;,&quot;&quot;}|sort -unique|select @{n=&quot;path&quot;;e={$_}})|?{$_.SideIndicator -eq &quot;&lt;=&quot;}|select @{n=&quot;LostFile&quot;;e={$_.Path -replace &quot;]&quot;,&quot;] &quot;}}, @{n=&quot;FileSize&quot;;e={&quot;{0:N0}&quot; -f ($_.FileSize/1MB)}}, Modification|?{$_.lostfile -match &quot;vswp&quot;})){(get-view (Get-View ServiceInstance|select -first 1).content.filemanager|select -first 1).DeleteDatastoreFile($lost.LostFile,(Get-View -ViewType datacenter|?{$_.Datastore -match (get-datastore $lost.LostFile.split(&quot;[]&quot;)[1]|get-view).moref}|select -first 1).moref)}</pre>
<p style="text-align: justify;"><em><span style="color: #ff0000;">MAJ 24/02/2012</span> : Mise à jour du script pour afficher la taille en <strong>MegaBytes</strong> et la date de modification des fichiers.</em></p>
<p style="text-align: justify;">Très fortement inspiré du célèbre <a href="http://www.lucd.info/2011/08/11/vmx-raiders-revisited/" target="_blank">Raiders of the Lost VMX</a> (mais aussi du post <a href="http://www.lucd.info/2011/04/25/orphaned-files-and-folders-spring-cleaning/" target="_blank">Orphaned files and folders – Spring cleaning</a>) de LucD, nous avons enfin fini de finioler un oneliner PowerCLI qui va vous <strong>lister les fichiers .xml, .vmsn, .vmsd, .vswp, .vmx, .vmdk, .vmss, .nvram et .vmxf qui traînent sur vos datastores</strong> et qui ne sont pas rattachés à une quelconque vm du vcenter depuis lequel vous avez exécuté le script.</p>
<pre class="brush: powershell; title: ; notranslate">compare -passthru -property path $(foreach ($ds in ((get-view -ViewType datastore|sort name -unique|?{$_.summary.accessible}|%{(get-view $_.browser).SearchDatastoreSubFolders($(&quot;[&quot; + $_.Name + &quot;]&quot;),(New-Object VMware.Vim.HostDatastoreBrowserSearchSpec -property @{matchPattern=(&quot;*zdump*&quot;,&quot;*.xml&quot;,&quot;*.vmsn&quot;,&quot;*.vmsd&quot;,&quot;*.vswp*&quot;, &quot;*.vmx&quot;,&quot;*.vmdk&quot;,&quot;*.vmss&quot;,&quot;*.nvram&quot;,&quot;*.vmxf&quot;); details=(New-Object VMware.Vim.FileQueryFlags -property @{filesize=$true;modification=$true})}))})|?{$_.file})){foreach ($files in $ds.file){$files|?{$_.Path -notmatch &quot;-ctk.vmdk|esxconsole.vmdk|esxconsole-flat.vmdk&quot;}|select @{n=&quot;path&quot;;e={$ds.FolderPath + $files.path|%{$_ -replace &quot; &quot;,&quot;&quot;}}},FileSize,Modification|?{$_.path -notmatch &quot;.zfs|.snapshot|var/tmp/cache|/hostCache/|.lck&quot;}}}) $(get-view -ViewType virtualmachine|?{$_.Runtime.ConnectionState -notmatch &quot;invalid|orphaned&quot;}|%{$_.layoutex.file}|?{$_.type -ne &quot;log&quot;}|%{$_.name}|%{$_ -replace &quot; &quot;,&quot;&quot;}|sort -unique|select @{n=&quot;path&quot;;e={$_}})|?{$_.SideIndicator -eq &quot;&lt;=&quot;}|select @{n=&quot;LostFile&quot;;e={$_.Path -replace &quot;]&quot;,&quot;] &quot;}}, @{n=&quot;FileSize&quot;;e={&quot;{0:N0}&quot; -f ($_.FileSize/1MB)}}, Modification|ft -autosize</pre>
<p style="text-align: justify;">Les snapshots ZFS (.zfs/snapshot), les fichiers -ctk.vmdk (fichiers CBT) et les vmdk des COS d&#8217;ESX classic (esxconsole-) sont filtrés, n&#8217;hésitez pas à nous remonter d&#8217;autres faux positifs que vous pourriez rencontrer. <span style="text-decoration: line-through;">Prochaine étape : ménage automatique&#8230;</span></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/lostvmfile_full.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/lostvmfiles.png" alt="" width="521" height="287" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/lostvmfilesize.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/lostvmfilesize.png" alt="" width="504" height="125" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=3612</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Snap Me If You Can</title>
		<link>http://www.hypervisor.fr/?p=3588</link>
		<comments>http://www.hypervisor.fr/?p=3588#comments</comments>
		<pubDate>Sun, 05 Feb 2012 23:44:30 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[ZFS]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[VAAI]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=3588</guid>
		<description><![CDATA[En cherchant un paramètre dans la hidden_vmx_params liste extraite par William Lam, nous sommes tombé sur une option bien sympathique pour ceux qui aiment contrôler la situation ou qui détestent les mauvaises surprises en matière de snapshot : snapshot.minFreeSpace
Disons que vous souhaitez limiter la possibilité de faire un snapshot sur vos vm uniquement s&#8217;il y a suffisamment d&#8217;espace sur les datastore, vous utiliseriez notre beau [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">En cherchant un paramètre dans <a href="http://download.virtuallyghetto.com/hidden_vmx_params.html" target="_blank">la hidden_vmx_params liste extraite par William Lam</a>, nous sommes tombé sur une option bien sympathique pour ceux qui aiment contrôler la situation ou qui détestent les mauvaises surprises en matière de snapshot : <strong><a href="http://faq.sanbarrow.com/index.php?solution_id=1060" target="_blank">snapshot.minFreeSpace</a></strong></p>
<p style="text-align: justify;">Disons que vous souhaitez <strong>limiter la possibilité de faire un snapshot sur vos vm uniquement s&#8217;il y a suffisamment d&#8217;espace sur les datastore</strong>, vous utiliseriez notre beau petit one-liner fait main :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType virtualmachine|?{-not $_.Config.Template -and $_.Runtime.ConnectionState -eq &quot;connected&quot;}|?{($_.Config.Hardware.Device|?{$_.GetType().Name -eq&quot;VirtualDisk&quot;}|%{$_.Backing.FileName.split(&quot;[]&quot;)[1]}|sort -Unique|measure-object).count -eq 1}|%{$_.ReconfigVM((New-Object VMware.Vim.VirtualMachineConfigSpec -Property @{extraconfig=@((New-Object VMware.Vim.optionvalue -Property @{Key=&quot;snapshot.minFreeSpace&quot;; Value=&quot;$($($_.Config.Hardware.Device|?{$_.GetType().Name -eq&quot;VirtualDisk&quot;}|%{$_.CapacityInKB*1KB}|measure-object -sum).sum)&quot;}))}))}</pre>
<p style="text-align: justify;">Ce script fixe le snapshot.minFreeSpace à <strong>la somme de la taille des vmdk</strong> (taille max d&#8217;un snapshot) et se limite aux vm dont les <strong>vmdk</strong> résident sur <strong>un seul et unique datastore</strong>.</p>
<p style="text-align: justify;">Mais avant de passer ce script, peut être voudriez vous vérifier que vous n&#8217;avez pas des vm déjà dans cette situation ? Cet autre petit one-liner vous donnera la liste de chaque vm dont la taille totale est supérieure à l&#8217;espace libre du datastore où elle réside :</p>
<pre class="brush: powershell; title: ; notranslate">Get-View -ViewType virtualmachine|?{-not $_.Config.Template}|?{($_.Config.Hardware.Device|?{$_.GetType().Name -eq&quot;VirtualDisk&quot;}|%{$_.Backing.FileName.split(&quot;[]&quot;)[1]}|sort -Unique|measure-object).count -eq 1}|?{($_.Config.Hardware.Device|?{$_.GetType().Name -eq&quot;VirtualDisk&quot;}|%{$_.CapacityInKB*1KB}|measure-object -sum).sum -gt ((get-view -viewtype datastore -property name,summary -filter @{&quot;name&quot; = ($_.Config.Hardware.Device|?{$_.GetType().Name -eq&quot;VirtualDisk&quot;}|%{$_.Backing.FileName.split(&quot;[]&quot;)[1]}|sort -Unique)}).Summary.FreeSpace)}|select name</pre>
<p><img class="aligncenter" src="http://files.hypervisor.fr/img/snapshot.minFreeSpace.png" alt="" width="311" height="39" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=3588</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Seul l&#8217;application-level quiescing est supporté pour la VCDB</title>
		<link>http://www.hypervisor.fr/?p=3249</link>
		<comments>http://www.hypervisor.fr/?p=3249#comments</comments>
		<pubDate>Fri, 26 Aug 2011 21:40:42 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[VCDB]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[veeam]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=3249</guid>
		<description><![CDATA[Pour un patch, test ou une modification quelconque, sachez que le &#8220;quiesced&#8221; snapshot n&#8217;est pas supporté par VMware :
Currently, VMware does not support quiesced snapshot of virtual machines running the vCenter Server database.
[...]
If quiesced snapshots are created by backup software to back up the virtual machine data, either use:

A backup solution that provides application-level quiescing.
Backup Agents in [...]]]></description>
			<content:encoded><![CDATA[<p>Pour un patch, test ou une modification quelconque, sachez que <a href="http://kb.vmware.com/kb/2003674" target="_blank">le &#8220;quiesced&#8221; snapshot n&#8217;est pas supporté par VMware</a> :</p>
<blockquote><p>Currently, <strong>VMware does not support quiesced snapshot of virtual machines running the vCenter Server database</strong>.</p>
<p>[...]</p>
<p>If quiesced snapshots are created by backup software to back up the virtual machine data, either use:</p>
<ul>
<li>A backup solution that provides application-level quiescing.</li>
<li>Backup Agents in the guest operating system.</li>
</ul>
</blockquote>
<p>Il est donc recommandé d&#8217;utiliser un produit comme <a href="http://www.veeam.com/vmware-esx-backup.htm" target="_blank">veeam backup</a> pour faire un backup de votre VCDB avant de tout exploser <img src='http://www.hypervisor.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>De toute façon, les snapshots c&#8217;est mal : <a href="http://www.vmdamentals.com/?p=332" target="_blank">Performance impact when using VMware snapshots</a></p>
<p style="text-align: center;"><a href="http://www.vmdamentals.com/?p=332"><img class="  aligncenter" title="Performance impact when using VMware snapshots" src="http://www.xs4all.nl/~kruimpie/VMdamentals/Snapshots/Snapshot-impact-average-iops.PNG" alt="" width="404" height="268" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=3249</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unable to access file  since it is locked</title>
		<link>http://www.hypervisor.fr/?p=2900</link>
		<comments>http://www.hypervisor.fr/?p=2900#comments</comments>
		<pubDate>Mon, 25 Apr 2011 23:03:10 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[SAN]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[vmdk]]></category>
		<category><![CDATA[VMFS]]></category>
		<category><![CDATA[vmx]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2900</guid>
		<description><![CDATA[Suite a une grosse coupure de SAN, nous avons du faire face à des &#8220;power on&#8221; récalcitrants avec lesquels nous avions déjà eu affaires lors de coupures réseaux sur du stockage NFS ou iSCSI :



N&#8217;importe lequel de ces messages vous mènera aux forums VMware, sur des blogs ou même à cette kb qui précise justement ce que nous allons [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Suite a une grosse coupure de SAN, nous avons du faire face à des &#8220;power on&#8221; récalcitrants avec lesquels nous avions déjà eu affaires lors de coupures réseaux sur du stockage NFS ou iSCSI :</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2901" title="SS-2011-04-25_23.19.25" src="http://www.hypervisor.fr/wp-content/uploads/2011/04/SS-2011-04-25_23.19.25.png" alt="" width="526" height="38" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2905" title="SS-2011-04-25_23.13.41" src="http://www.hypervisor.fr/wp-content/uploads/2011/04/SS-2011-04-25_23.13.41.png" alt="" width="572" height="74" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-2904" title="SS-2011-04-25_23.19.13" src="http://www.hypervisor.fr/wp-content/uploads/2011/04/SS-2011-04-25_23.19.13.png" alt="" width="571" height="72" /></p>
<p style="text-align: justify;">N&#8217;importe lequel de ces messages vous mènera aux <a href="http://communities.vmware.com/message/909582" target="_blank">forums VMware</a>, sur <a href="http://www.zealkabi.com/2008/10/unable-to-start-vm-unable-to-access.html" target="_blank">des blogs</a> ou même à <a href="http://kb.vmware.com/kb/10051" target="_blank">cette kb</a> qui précise justement ce que nous allons prendre à contre pied :</p>
<blockquote><p>Because a virtual machine can be moved between hosts, the host where the virtual machine is currently registered may not be the host maintaining the file lock. The lock must be released by the ESX host that owns the lock</p></blockquote>
<p style="text-align: justify;">Le point commun de ces troubleshooting est l&#8217;objectif de <strong>faire sauter le lock</strong> du ou des fichiers, ce qui parait tout à fait censé et que nous avons d&#8217;ailleurs déjà suivi par le passé en essayant aussi de redémarrer le service hostd en masse grâce à <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">plink</a> (ou esxi.txt est la liste des fqdn) avant de redémarrer l&#8217;ESX en dernier recours :</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">@</span><span style="color: #b1b100; font-weight: bold;">echo</span> off
<span style="color: #00b100; font-weight: bold;">FOR</span> /F <span style="color: #33cc33;">%%</span><span style="color: #448888;">i</span> <span style="color: #00b100; font-weight: bold;">in</span> <span style="color: #33cc33;">(</span>esxi.txt<span style="color: #33cc33;">)</span> <span style="color: #00b100; font-weight: bold;">do</span> <span style="color: #00b100; font-weight: bold;">call</span> :<span style="color: #b100b1; font-weight: bold;">plink</span> <span style="color: #33cc33;">%%</span><span style="color: #448888;">i</span>
:<span style="color: #b100b1; font-weight: bold;">plink</span>
&quot;C:\Program Files <span style="color: #33cc33;">(</span>x86<span style="color: #33cc33;">)</span>\PuTTY\plink.exe&quot; -pw &quot;password&quot; root<span style="color: #33cc33;">@%</span><span style="color: #448888;">1</span> &quot;/sbin/services.sh restart&quot;
<span style="color: #00b100; font-weight: bold;">GOTO</span> End
:<span style="color: #b100b1; font-weight: bold;">Last</span>
:<span style="color: #b100b1; font-weight: bold;">End</span></pre></div></div>

<p style="text-align: justify;">Cette dernière étape est particulièrement longue et fastidieuse alors que, sauf cas exceptionnel, <strong>la solution &#8220;idéale&#8221; est de trouver le dernier ESX ayant fait tourné la vm</strong> (via le vmware.log ou grâce à <a href="http://www.hypervisor.fr/?p=1738" target="_blank">export régulier</a> des infos du vCenter), de passer DRS en manuel pour être prompté au démarrage de la VM et de selectionner le bon ESX :</p>
<p style="text-align: justify;"><a href="http://www.hypervisor.fr/wp-content/uploads/2011/04/SS-2011-04-25_23.14.03.png" title="SS-2011-04-25_23.14.03" rel="lightbox[2900]"><img class="aligncenter size-medium wp-image-2906" title="SS-2011-04-25_23.14.03" src="http://www.hypervisor.fr/wp-content/uploads/2011/04/SS-2011-04-25_23.14.03-300x123.png" alt="" width="300" height="123" /></a></p>
<p style="text-align: justify;">C&#8217;est tout simple mais ça marche très bien <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=2900</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Snapshots are not backups</title>
		<link>http://www.hypervisor.fr/?p=2692</link>
		<comments>http://www.hypervisor.fr/?p=2692#comments</comments>
		<pubDate>Fri, 11 Feb 2011 01:35:44 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2692</guid>
		<description><![CDATA[Petite piqûre de rappel pour les irréductibles (via une belle kb VMware) :

Snapshots are not backups
The maximum supported amount in a chain is 32
VMware recommends that you use only 2-3 snapshots in a chain
Use no single snapshot for more than 24-72 hours

An excessive number of snapshots in a chain or snapshots large in size may cause decreased virtual [...]]]></description>
			<content:encoded><![CDATA[<p>Petite piqûre de rappel pour les irréductibles (<a href="http://kb.vmware.com/kb/1025279" target="_blank">via une belle kb VMware</a>) :</p>
<ul>
<li><strong>Snapshots are not backups</strong></li>
<li>The maximum supported amount in a chain is 32</li>
<li>VMware recommends that you use only 2-3 snapshots in a chain</li>
<li>Use no single snapshot for more than 24-72 hours</li>
</ul>
<blockquote><p>An excessive number of snapshots in a chain or snapshots large in size may cause decreased virtual machine and host performance.</p></blockquote>
<blockquote><p>Increasing the size of a disk with snapshots present can lead to corruption of the snapshots and potential data loss.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=2692</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Snapshot Consolidation depuis ESX 4.0 U2</title>
		<link>http://www.hypervisor.fr/?p=2575</link>
		<comments>http://www.hypervisor.fr/?p=2575#comments</comments>
		<pubDate>Mon, 27 Dec 2010 15:01:36 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2575</guid>
		<description><![CDATA[Comme nous en parlions lors de l&#8217;annonce de la GA, la façon dont les snapshot sont consolidés a beaucoup changée (en mieux évidement) depuis ESX 4.0 U2. Le blog VMware Support Insider a publié la veille de noël un billet avec 2 schéma qui valent plus de 1000 mots :
Avant l&#8217;U2
Après l&#8217;U2
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.hypervisor.fr/?p=2162" target="_blank">Comme nous en parlions lors de l&#8217;annonce de la GA</a>, la façon dont les snapshot sont consolidés a beaucoup changée (en mieux évidement) depuis ESX 4.0 U2. Le blog VMware Support Insider <a href="http://blogs.vmware.com/kb/2010/12/changes-to-snapshot-consolidation.html" target="_blank">a publié la veille de noël un billet avec 2 schéma qui valent plus de 1000 mots</a> :</p>
<p style="text-align: center;"><a href="http://blogs.vmware.com/.a/6a00d8341c328153ef0148c701b41d970c-pi"><img class="aligncenter" src="http://blogs.vmware.com/.a/6a00d8341c328153ef0148c701b41d970c-pi" alt="" width="327" height="266" /></a>Avant l&#8217;U2</p>
<p style="text-align: center;"><a href="http://blogs.vmware.com/.a/6a00d8341c328153ef0148c701b486970c-pi"><img class="aligncenter" src="http://blogs.vmware.com/.a/6a00d8341c328153ef0148c701b486970c-pi" alt="" width="384" height="225" /></a><strong>Après l&#8217;U2</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=2575</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Linked] clone à partir d&#8217;un snapshot en PSH</title>
		<link>http://www.hypervisor.fr/?p=2020</link>
		<comments>http://www.hypervisor.fr/?p=2020#comments</comments>
		<pubDate>Sat, 01 May 2010 22:47:30 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=2020</guid>
		<description><![CDATA[Le linked clone est l&#8217;ultime usage des snapshot. Il démontre parfaitement toute la souplesse et toute la robustesse du vmdk. En environnement VDI, c&#8217;est un atout majeur et malgré l&#8217;absence de GUI dans vCenter, cette fonction est maintenant supportée :
vSphere 4.0 supports linked virtual machines, which are two or more virtual machines that share storage.
Nous [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Le linked clone est l&#8217;ultime usage des snapshot. Il démontre parfaitement toute la souplesse et toute la robustesse du vmdk. En environnement VDI, c&#8217;est un atout majeur et malgré l&#8217;absence de GUI dans vCenter, <a href="http://www.vmware.com/support/developer/vc-sdk/linked_vms_note.pdf" target="_blank">cette fonction est maintenant supportée</a> :</p>
<blockquote><p>vSphere 4.0 supports linked virtual machines, which are two or more virtual machines that share storage.</p></blockquote>
<p style="text-align: justify;">Nous avons concocté un petit script qui permet de créer un clone ou un linked clone à partir du snapshot de votre choix. Compte tenu des risques, de nombreuses vérifications sont faites par le script pour éviter une mauvaise opération. Vous faites le choix d&#8217;un simple linked clone grâce au paramètre <strong>-linkedonly=$true</strong> (l&#8217;opération par défaut est un clone à partir d&#8217;un linked clone temporaire) et avez le choix de transformer le clone en template :</p>
<p><a href="http://hypervisor.free.fr/img/clonefromsnap_cli.jpg" title="clonefromsnap_cli" rel="lightbox[2020]"><img class="aligncenter size-medium wp-image-2025" title="clonefromsnap_cli" src="http://www.hypervisor.fr/wp-content/uploads/2010/05/clonefromsnap_cli-300x283.jpg" alt="clonefromsnap_cli" width="300" height="283" /></a></p>
<p><a href="http://hypervisor.free.fr/img/clonefromsnap_cli.jpg"></a>Évidement, cette opération peut être effectuée VM &#8220;on&#8221; :</p>
<p><img class="aligncenter" src="http://hypervisor.free.fr/img/clonefromsnap_run.jpg" alt="" width="294" height="160" /></p>
<div class="wp-caption aligncenter" style="width: 85px"><a href="http://hypervisor.free.fr/CloneFromSnapshot.ps1"><img title="CloneFromSnapshot.ps1" src="http://hypervisor.free.fr/img/download_icon_300.png" alt="" width="75" height="64" /></a><p class="wp-caption-text">download</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=2020</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pas de backup des snapshot avec les vStorage API</title>
		<link>http://www.hypervisor.fr/?p=1933</link>
		<comments>http://www.hypervisor.fr/?p=1933#comments</comments>
		<pubDate>Wed, 17 Mar 2010 17:15:03 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=1933</guid>
		<description><![CDATA[C&#8217;est toujours lorsque l&#8217;on en a le plus besoin que l&#8217;on découvre des limitation fondamentales : les vStorage API, de même qu&#8217;avec VCB (qui ne sera pas supporté par les futures versions d&#8217;ESX), ne permettent pas le backup d&#8217;une arborescence de snapshot. C&#8217;est Vitaliy Safarov de chez Veeam qui nous le rappel sur son forum [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">C&#8217;est toujours lorsque l&#8217;on en a le plus besoin que l&#8217;on découvre des limitation fondamentales : les vStorage API, de même qu&#8217;avec VCB (<a href="http://app.connect.vmware.com/e/es.aspx?s=524&amp;e=12880125" target="_blank">qui ne sera pas supporté par les futures versions d&#8217;ESX</a>), ne permettent pas le backup d&#8217;une arborescence de snapshot. C&#8217;est Vitaliy Safarov de chez Veeam qui nous le rappel <a href="http://www.veeam.com/forums/viewtopic.php?f=2&amp;t=2892" target="_blank">sur son forum</a> :</p>
<blockquote><p>[...] in vStorage API as well as in VCB modes, all snapshots are committed to the VMDK file, it&#8217;s VMware expected behavior. But If you still want to backup your current snapshot tree, you should use Network mode</p></blockquote>
<p>Il fait évidement allusion au <em>Network mode</em> de Veeam Backup qui ne souffre pas de cette limitation :</p>
<p style="text-align: center;"><a href="http://hypervisor.free.fr/img/snaptree/snap_vapi_01.jpg" title="snap_vapi_01" rel="lightbox[1933]"><img class="size-thumbnail wp-image-1934 alignnone" title="snap_vapi_01" src="http://www.hypervisor.fr/wp-content/uploads/2010/03/snap_vapi_01-150x150.jpg" alt="snap_vapi_01" width="150" height="150" /> </a><a href="http://hypervisor.free.fr/img/snaptree/snap_vapi_02.jpg" title="snap_vapi_02" rel="lightbox[1933]"><img class="alignnone size-thumbnail wp-image-1935" title="snap_vapi_02" src="http://www.hypervisor.fr/wp-content/uploads/2010/03/snap_vapi_02-150x150.jpg" alt="snap_vapi_02" width="150" height="150" /></a></p>
<p style="text-align: center;"><a href="http://hypervisor.free.fr/img/snaptree/snap_netmode_01.jpg" title="snap_netmode_01" rel="lightbox[1933]"><img class="alignnone size-thumbnail wp-image-1936" title="snap_netmode_01" src="http://www.hypervisor.fr/wp-content/uploads/2010/03/snap_netmode_01-150x150.jpg" alt="snap_netmode_01" width="150" height="150" /></a> <a href="http://hypervisor.free.fr/img/snaptree/snap_netmode_02.jpg" title="snap_netmode_02" rel="lightbox[1933]"><img class="alignnone size-thumbnail wp-image-1937" title="snap_netmode_02" src="http://www.hypervisor.fr/wp-content/uploads/2010/03/snap_netmode_02-150x150.jpg" alt="snap_netmode_02" width="150" height="150" /></a> <a href="http://hypervisor.free.fr/img/snaptree/snap_netmode_03.jpg" title="snap_netmode_03" rel="lightbox[1933]"><img class="alignnone size-thumbnail wp-image-1938" title="snap_netmode_03" src="http://www.hypervisor.fr/wp-content/uploads/2010/03/snap_netmode_03-150x150.jpg" alt="snap_netmode_03" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1933</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Augmenter la taille d&#8217;un vmdk avec snapshot</title>
		<link>http://www.hypervisor.fr/?p=1558</link>
		<comments>http://www.hypervisor.fr/?p=1558#comments</comments>
		<pubDate>Sat, 28 Nov 2009 00:25:07 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=1558</guid>
		<description><![CDATA[Officiellement, il n&#8217;est pas possible d&#8217;augmenter la taille d&#8217;un vmdk si un ou plusieurs snapshot en dépendent :
You cannot increase the size of a virtual machine&#8217;s hard disk after you create a snapshot of the virtual machine.
There is no workaround.
Au fil des version d&#8217;ESX, on a droit à plusieurs scénarii. Pour les plus anciennes versions [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kb.vmware.com/kb/1003099" target="_blank">Officiellement</a>, il n&#8217;est pas possible d&#8217;augmenter la taille d&#8217;un vmdk si un ou plusieurs snapshot en dépendent :</p>
<blockquote><p>You cannot increase the size of a virtual machine&#8217;s hard disk after you create a snapshot of the virtual machine.</p>
<p>There is no workaround.</p></blockquote>
<p>Au fil des version d&#8217;ESX, on a droit à plusieurs scénarii. Pour les plus anciennes versions d&#8217;ESX 3.5, le resize est possible en GUI mais la VM refusera de booter après.</p>
<p><a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-gui-new-esx35.jpg" title="snap-gui-esx35" rel="lightbox[1558]"><img class="aligncenter size-medium wp-image-1567" title="snap-gui-esx35" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-gui-new-esx35-300x134.jpg" alt="snap-gui-esx35" width="300" height="134" /></a></p>
<p><a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-old-esx35.jpg" title="snap-old-esx35" rel="lightbox[1558]"><img class="aligncenter size-medium wp-image-1560" title="snap-old-esx35" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-old-esx35-300x36.jpg" alt="snap-old-esx35" width="300" height="36" /></a></p>
<p>Pour les version les plus récentes d&#8217;ESX 3.5, si la VM est OFF il ne se passe strictement rien après le changement de taille mais si la VM est démarrée on a droit à un simple message d&#8217;erreur après tentative.</p>
<p style="text-align: center;"><img class="size-full wp-image-1562 aligncenter" title="snap-err-new-esx35" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-err-new-esx35.jpg" alt="snap-err-new-esx35" width="302" height="119" /></p>
<p>VMware a fini par réagir avec la version 4 en bridant la fonctionnalité via la GUI :</p>
<p><a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-gui-esx4.jpg" title="snap-gui-esx4" rel="lightbox[1558]"><img class="aligncenter size-medium wp-image-1568" title="snap-gui-esx4" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-gui-esx4-300x126.jpg" alt="snap-gui-esx4" width="300" height="126" /></a></p>
<p>La raison de cette limitation semble évidente mais comme nous l&#8217;a habilement fait remarqué un collègue, &#8220;cela pourrai être géré par le système&#8221;. Après un bref googling, nous trouvons la clef de l&#8217;énigme chez <a href="http://sanbarrow.com/" target="_blank">sanbarrow</a>, un vétéran de la communauté vmware et créateur de MOA (aka <a href="http://sanbarrow.com/moa.html" target="_blank">Multi Operating system Administration / Addicts</a>) :</p>
<blockquote><p>fix Extent description to the size after expand</p></blockquote>
<p>Voici la procédure en détail (VM OFF) :</p>
<ul>
<li>Augmenter la taille du vmdk avec vmkfstools</li>
<li>Relever la nouvelle taille dans la section &#8220;Extent description&#8221;</li>
<li>Remplacer l&#8217;ancienne valeur dans le vmdk du (ou des) snapshot</li>
<li>Reloader la vm (vim-cmd ou vmware-cmd)</li>
</ul>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/vmdk-new-size.jpg" title="vmdk-new-size" rel="lightbox[1558]"><img class="alignnone size-thumbnail wp-image-1569" title="vmdk-new-size" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/vmdk-new-size-150x150.jpg" alt="vmdk-new-size" width="150" height="150" /></a> <a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-old-size.jpg" title="snap-old-size" rel="lightbox[1558]"><img class="alignnone size-thumbnail wp-image-1570" title="snap-old-size" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/snap-old-size-150x150.jpg" alt="snap-old-size" width="150" height="150" /></a></p>
<p style="text-align: center;"><a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/resize-snap-before.jpg" title="resize-snap-before" rel="lightbox[1558]"><img class="alignnone size-thumbnail wp-image-1571" title="resize-snap-before" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/resize-snap-before-150x150.jpg" alt="resize-snap-before" width="150" height="150" /></a> <a href="http://www.hypervisor.fr/wp-content/uploads/2009/11/resize-snap-after.jpg" title="resize-snap-after" rel="lightbox[1558]"><img class="alignnone size-thumbnail wp-image-1572" title="resize-snap-after" src="http://www.hypervisor.fr/wp-content/uploads/2009/11/resize-snap-after-150x150.jpg" alt="resize-snap-after" width="150" height="150" /></a></p>
<p style="text-align: left;">Comme toujours, si vous ou l&#8217;un de vos équipiers étiez grillés par VMware, Hypervisor.fr nierait avoir eu connaissance de vos agissements. Ce post s&#8217;autodétruira dans cinq secondes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1558</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vrai &#8220;revert&#8221; de snapshot sous XenServer 5.5</title>
		<link>http://www.hypervisor.fr/?p=1542</link>
		<comments>http://www.hypervisor.fr/?p=1542#comments</comments>
		<pubDate>Wed, 25 Nov 2009 18:51:22 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Citrix XenServer]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=1542</guid>
		<description><![CDATA[Notre très cher confrère CTXBLOG nous aprend aujourd&#8217;hui qu&#8217;un script powershell existe pour ceux qui souhaite faire un vrai revert de snapshot sur une VM hébergée sur XenServer 5.5
Pour les vPowerusers que nous sommes, cela peut paraitre hallucinant mais sous XenServer 5.5, pour faire un revert de snapshot, il faut (dixit l&#8217;admin guide) :

Run the [...]]]></description>
			<content:encoded><![CDATA[<p>Notre très cher confrère <a href="http://ctxblog.fr/index.php?post/2009/11/25/Revert-sous-XenServer-5.5">CTXBLOG</a> nous aprend aujourd&#8217;hui qu&#8217;un script powershell existe pour ceux qui souhaite faire un vrai revert de snapshot sur une VM hébergée sur XenServer 5.5</p>
<p>Pour les vPowerusers que nous sommes, cela peut paraitre hallucinant mais sous XenServer 5.5, pour faire un revert de snapshot, il faut (<a href="http://support.citrix.com/servlet/KbServlet/download/20636-102-641538/reference.pdf">dixit l&#8217;admin guide</a>) :</p>
<ul>
<li>Run the vm-list command to find the UUID of the VM to be destroyed</li>
<li>Shutdown the VM</li>
<li>Destroy the VM</li>
<li>Create a new VM from the snapshot</li>
<li>Start the VM</li>
</ul>
<p>Heureusement pour eux, le script dont il est question évite ce pèlerinage.</p>
<p style="text-align: center;"><a href="http://www.xensource.com/"><img class="aligncenter" src="http://www.archives.gov/exhibits/powers_of_persuasion/its_a_womans_war_too/images_html/images/we_can_do_it.jpg" alt="" width="270" height="353" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1542</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Les snapshot pour les nuls &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=1482</link>
		<comments>http://www.hypervisor.fr/?p=1482#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:45:57 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Kb]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=1482</guid>
		<description><![CDATA[MAJ 16/03/2010 : Pour ceux qui voudrais en savoir plus sur le troubleshooting de snapshot, consultez le guide de Ruben Garcia.
VMware vient de mettre en ligne une kb expliquant en détail le process d&#8217;un snapshot ainsi que des links vers d&#8217;autres kb se rapportant à des best pratices et autres problèmes concernant les snapshots.


]]></description>
			<content:encoded><![CDATA[<p><em><span style="color: #ff0000;">MAJ 16/03/2010</span> : Pour ceux qui voudrais en savoir plus sur le troubleshooting de snapshot, <a href="http://geosub.es/vmutils/Troubleshooting.Virtual.Machine.snapshot.problems/Troubleshooting.Virtual.Machine.snapshot.problems.html" target="_blank">consultez le guide de Ruben Garcia</a>.</em></p>
<p>VMware vient de mettre en ligne une <a href="http://kb.vmware.com/kb/1015180">kb expliquant en détail le process d&#8217;un snapshot</a> ainsi que des links vers d&#8217;autres kb se rapportant à des best pratices et autres problèmes concernant les snapshots.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://kb.vmware.com/Platform/Publishing/images/1015180_diskchain.bmp" alt="" width="389" height="272" /></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1482</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extraire un fichier d&#8217;un snapshot (VM ON)</title>
		<link>http://www.hypervisor.fr/?p=1080</link>
		<comments>http://www.hypervisor.fr/?p=1080#comments</comments>
		<pubDate>Fri, 28 Aug 2009 16:15:03 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[snapshot]]></category>

		<guid isPermaLink="false">http://www.hypervizor.fr/?p=1080</guid>
		<description><![CDATA[Lorsqu&#8217;on a besoin d&#8217;extraire un fichier d&#8217;un snapshot,  il n&#8217;existe que peu de solution. Impossible de cloner la VM car cette fonction &#8220;commit&#8221; les snapshots et le &#8220;revert&#8221; ferait perde les modifications en cours.Voici une méthode simple et rapide :
     

Copie du vmdk comprenant le fichier recherché (vmkfstools -i)
Connexion au [...]]]></description>
			<content:encoded><![CDATA[<p>Lorsqu&#8217;on a besoin d&#8217;extraire un fichier d&#8217;un snapshot,  il n&#8217;existe que peu de solution. Impossible de cloner la VM car cette fonction &#8220;commit&#8221; les snapshots et le &#8220;revert&#8221; ferait perde les modifications en cours.Voici une méthode simple et rapide :</p>
<p style="text-align: center;"><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/vmkfstools.jpg" title="vmkfstools" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1081" title="vmkfstools" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/vmkfstools-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/datastore_browser.jpg" title="datastore_browser" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1082" title="datastore_browser" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/datastore_browser-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/datastore_browser_vmdk.jpg" title="datastore_browser_vmdk" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1083" title="datastore_browser_vmdk" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/datastore_browser_vmdk-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk.jpg" title="winimage_vmdk" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1084" title="winimage_vmdk" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk_part.jpg" title="winimage_vmdk_part" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1085" title="winimage_vmdk_part" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk_part-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk_browse.jpg" title="winimage_vmdk_browse" rel="lightbox[1080]"><img class="alignnone size-thumbnail wp-image-1086" title="winimage_vmdk_browse" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/winimage_vmdk_browse-150x150.jpg" alt="" width="150" height="150" /></a></p>
<ol>
<li>Copie du vmdk comprenant le fichier recherché (vmkfstools -i)</li>
<li>Connexion au host/datastore  avec le &#8220;datastore browser&#8221; du VI Client</li>
<li>Download du vmdk copié</li>
<li>Ouverture du fichier &#8220;flat&#8221; avec winimage</li>
<li>Sélection de la partition</li>
<li>Extraction du fichier/répertoire</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1080</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quelle taille (totale) fait ma VM ? &#8211; MAJ</title>
		<link>http://www.hypervisor.fr/?p=1034</link>
		<comments>http://www.hypervisor.fr/?p=1034#comments</comments>
		<pubDate>Tue, 18 Aug 2009 17:45:58 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[vmsize]]></category>

		<guid isPermaLink="false">http://www.hypervizor.fr/?p=1034</guid>
		<description><![CDATA[MAJ 19/05/2011 : Mise à jour du script pour supporter vCenter 4.1 U1
MAJ 29/03/2011 : Mise à jour du script pour supporter vCenter 4.1
En cherchant un moyen élégant de remonter dans rapport la taille occupée par les différents snapshots d&#8217;une VM, nous sommes tombés sur un script powershell récemment posté par Arnim van Lieshout : [...]]]></description>
			<content:encoded><![CDATA[<p><em><span style="color: #ff0000;">MAJ 19/05/2011</span> : Mise à jour du script pour supporter vCenter 4.1 U1</em></p>
<p><em><span style="color: #ff0000;">MAJ 29/03/2011</span> : Mise à jour du script pour supporter vCenter 4.1</em></p>
<p>En cherchant un moyen élégant de remonter dans rapport la taille occupée par les différents snapshots d&#8217;une VM, nous sommes tombés sur un script powershell récemment posté par <a href="http://www.van-lieshout.com">Arnim van Lieshout</a> : <a href="http://www.van-lieshout.com/2009/07/how-big-is-my-vm/">How big is my VM?</a></p>
<p>Malheureusement, son script n&#8217;est pas compatible avec vCenter 4.0, à cause d&#8217;un petit bug d&#8217;API repéré par plusieurs membres de la <a href="http://communities.vmware.com/message/1330657">communauté VMware lors de l&#8217;adaptation d&#8217;un script peremetant de lister les vmdk orphelins.</a></p>
<p><a href="http://www.hypervizor.fr/wp-content/uploads/2009/08/vmsize_bug.jpg" title="vmsize_bug" rel="lightbox[1034]"><img class="aligncenter size-medium wp-image-1039" title="vmsize_bug" src="http://www.hypervizor.fr/wp-content/uploads/2009/08/vmsize_bug-300x102.jpg" alt="" width="300" height="102" /></a></p>
<p>C&#8217;est grâce à <a href="http://communities.vmware.com/message/1330657#1330657">Yasen Kalchev</a> que nous avons pu modifier ce script et le rendre opérationnel pour vCenter 4.0 :</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #0000FF;">param</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span> <span style="color: #800080;">$vm</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">function</span> Get<span style="color: pink;">-</span>VmSize<span style="color: #000000;">&#40;</span><span style="color: #800080;">$vm</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008000;">#Initialize variables</span>
    <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">=@</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #800080;">$VmSize</span> <span style="color: pink;">=</span> <span style="color: #804000;">0</span>
&nbsp;
		<span style="color: #800080;">$fileQueryFlags</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> VMware.Vim.FileQueryFlags
		<span style="color: #800080;">$fileQueryFlags</span>.FileSize <span style="color: pink;">=</span> <span style="color: #800080;">$true</span>
		<span style="color: #008000;">#$fileQueryFlags.FileType = $true</span>
		<span style="color: #008000;">#$fileQueryFlags.Modification = $true</span>
		<span style="color: #800080;">$searchSpec</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> VMware.Vim.HostDatastoreBrowserSearchSpec
		<span style="color: #800080;">$searchSpec</span>.details <span style="color: pink;">=</span> <span style="color: #800080;">$fileQueryFlags</span>
&nbsp;
    Get<span style="color: pink;">-</span>View <span style="color: pink;">-</span>ViewType VirtualMachine <span style="color: pink;">-</span><span style="color: #0000FF;">Filter</span> <span style="color: pink;">@</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;Name&quot;</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;^$vm$&quot;</span> <span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: pink;">%</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #008000;">#Create an array with the vm's directories</span>
        <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">+=</span> <span style="color: #000080;">$_</span>.Config.Files.VmPathName.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
        <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">+=</span> <span style="color: #000080;">$_</span>.Config.Files.SnapshotDirectory.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
        <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">+=</span> <span style="color: #000080;">$_</span>.Config.Files.SuspendDirectory.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
        <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">+=</span> <span style="color: #000080;">$_</span>.Config.Files.LogDirectory.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
        <span style="color: #008000;">#Add directories of the vm's virtual disk files</span>
        <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$disk</span> <span style="color: #0000FF;">in</span> <span style="color: #000080;">$_</span>.Layout.Disk<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$diskfile</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$disk</span>.diskfile<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
                <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">+=</span> <span style="color: #800080;">$diskfile</span>.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008000;">#Only take unique array items</span>
        <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">=</span> <span style="color: #800080;">$VmDirs</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Sort</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Get-Unique</span>
&nbsp;
        <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$dir</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$VmDirs</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
            <span style="color: #800080;">$ds</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>Datastore <span style="color: #000000;">&#40;</span><span style="color: #800080;">$dir</span>.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;[&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>.split<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;]&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
            <span style="color: #800080;">$dsb</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>View <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$ds</span> <span style="color: pink;">|</span> get<span style="color: pink;">-</span>view<span style="color: #000000;">&#41;</span>.Browser<span style="color: #000000;">&#41;</span>
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$global</span>:DefaultVIServer<span style="color: #000000;">&#41;</span>.Version <span style="color: #FF0000;">-cge</span> <span style="color: #800000;">&quot;4.1&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #800080;">$searchSpec</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim41<span style="color: #000000;">&#40;</span><span style="color: #800080;">$searchSpec</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>
			<span style="color: #0000FF;">elseif</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$global</span>:DefaultVIServer<span style="color: #000000;">&#41;</span>.Version <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;4.0.0&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #800080;">$searchSpec</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim4<span style="color: #000000;">&#40;</span><span style="color: #800080;">$searchSpec</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #800080;">$searchSpec</span>.details.fileOwnerSpecified <span style="color: pink;">=</span> <span style="color: #800080;">$true</span>
&nbsp;
			<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$global</span>:DefaultVIServer<span style="color: #000000;">&#41;</span>.Version <span style="color: #FF0000;">-cge</span> <span style="color: #800000;">&quot;4.1&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #800080;">$dsBrowserMoRef</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim41<span style="color: #000000;">&#40;</span><span style="color: #800080;">$dsb</span>.MoRef<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>
            <span style="color: #0000FF;">elseif</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$global</span>:DefaultVIServer<span style="color: #000000;">&#41;</span>.Version <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;4.0.0&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #800080;">$dsBrowserMoRef</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim4<span style="color: #000000;">&#40;</span><span style="color: #800080;">$dsb</span>.MoRef<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #800080;">$taskMoRef</span>  <span style="color: pink;">=</span> <span style="color: #800080;">$dsb</span>.Client.VimService.SearchDatastoreSubFolders_Task<span style="color: #000000;">&#40;</span><span style="color: #800080;">$dsBrowserMoRef</span><span style="color: pink;">,</span> <span style="color: #800080;">$dir</span><span style="color: pink;">,</span> <span style="color: #800080;">$searchSpec</span><span style="color: #000000;">&#41;</span>
            <span style="color: #800080;">$task</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim<span style="color: #000000;">&#40;</span><span style="color: #800080;">$dsb</span>.WaitForTask<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>VMware.Vim.VIConvert<span style="color: #000000;">&#93;</span>::ToVim<span style="color: #000000;">&#40;</span><span style="color: #800080;">$taskMoRef</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> 
&nbsp;
            <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$result</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$task</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
                <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$file</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$result</span>.File<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
                    <span style="color: #800080;">$VmSize</span> <span style="color: pink;">+=</span> <span style="color: #800080;">$file</span>.FileSize
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0000FF;">return</span> <span style="color: #800080;">$VmSize</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$size</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>VmSize<span style="color: #000000;">&#40;</span><span style="color: #800080;">$vm</span><span style="color: #000000;">&#41;</span>
<span style="color: #800080;">$size</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>math<span style="color: #000000;">&#93;</span>::round<span style="color: #000000;">&#40;</span><span style="color: #800080;">$size</span><span style="color: pink;">/</span>1GB<span style="color: pink;">,</span><span style="color: #804000;">2</span><span style="color: #000000;">&#41;</span>
<span style="color: #008080; font-weight: bold;">WRITE</span> <span style="color: #800000;">&quot;$size Gb&quot;</span></pre></div></div>

<p><strong><span style="color: #ff0000;">/!\ les fichiers de swap (.vswp) ne sont comptabilisés que s&#8217;ils sont dans le répertoire de la VM /!\</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=1034</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
