<?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; lock</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=lock" 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>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>
	</channel>
</rss>
