<?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>108.bz &#187; VMware</title>
	<atom:link href="http://www.108.bz/posts/tag/vmware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Fri, 27 May 2011 09:08:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>About path thrashing and why you should always zone</title>
		<link>http://www.108.bz/posts/it/about-path-thrashing-and-why-you-should-always-zone/</link>
		<comments>http://www.108.bz/posts/it/about-path-thrashing-and-why-you-should-always-zone/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 08:58:36 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[SAN]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=703</guid>
		<description><![CDATA[So, Customer starts updating all of his VMware ESX hosts and things turn out for the worst. VMs are crawling slow (ping response time from 0 to 1000ms), console access through vSphere client doesn&#8217;t always work, and hosts&#8217; CPU percentage is unnaturally high. Cause is apparent: path thrashing. Path thrashing happens when, for some reason, [...]]]></description>
			<content:encoded><![CDATA[<p>So, Customer starts updating all of his VMware ESX hosts and things turn out for the worst. VMs are crawling slow (ping response time from 0 to 1000ms), console access through vSphere client doesn&#8217;t always work, and hosts&#8217; CPU percentage is unnaturally high. Cause is apparent: path thrashing.<br />
Path thrashing happens when, for some reason, SCSI LUNs are being continuously reassinged from a controller (Target) to another one. ESX has a hard time &#8220;bouncing&#8221; I/O back and forth on the right Fibre Channel path. On Active/Passive SAN arrays a LUN can be &#8220;owned&#8221; by just one controller at a time. If the LUN owner has to be changed because of a hardware failure (path, Controller, SFP/GBIC, FC switch, &#8230;) or because the Initiator would like to, the LUN itself has to &#8220;trespass&#8221; (in EMC parlance), transition to another controller. The &#8220;command&#8221; to do so can be issued by the Initiator or internally by the storage subsystem.<br />
Back to today&#8217;s case, I was dealing with an IBM DS4800 where LUNs flipped like mad between controller A and B. How to stop it quickly?</p>
<ul>
<li>If anything, the flipping shows that failover works as expected (VMs don&#8217;t crash despite the chaos).</li>
<li>That said, I could just disconnect a controller. Not really because the same storage system hosts an Oracle RAC cluster, humming along happily, unaffected by the issue.</li>
<li>I need a way to selectively &#8220;hide&#8221; a controller from one or more hosts. I can do it easily by tweaking the SAN zoning configuration.</li>
</ul>
<p>A Zone (much like a VLAN) is basically a group of WWNs (or ports). Objects in the Zone can only talk to each other. While creating Zones, it is common practice to &#8220;go minimal&#8221;: they should contain as few stuff as possible. I usually name them like this:<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Z_HOSTNAME_P1_DS4800_CA1_CB1</span><br />
HBA Port 1 of HOSTNAME can see Controller A/Port 1 and Controller B/Port 1 of the DS4800.<br />
Thus, going through each ESX server&#8217;s Zone, I just remove the Controller that the host shouldn&#8217;t see. Path thrashing is temporarily stopped.<br />
The above rant serves mainly as a pro-zoning argument. &#8220;If every HBA port has to access every Controller&#8217;s port, why implement zoning?&#8221;. As you just read, zoning saved me from serious trouble, today.<br />
About the &#8220;real&#8221; issue, it was ultimately caused by a thing called &#8220;Auto Volume Transfer&#8221; (AVT)<sup class='footnote'><a href='#fn-703-1' id='fnref-703-1'>1</a></sup>. Let&#8217;s say that a LUN is assigned to controller A, but I/O for the LUN is issued to controller B. With AVT switched on the storage system will automatically transfer the LUN from A to B.<br />
The Customer ESX servers are all (correctly) configured to use the &#8220;Most Recently Used&#8221; (MRU) <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1003973">path</a> to a LUN. It seems that ESX, from a certain version on, issues I/O on the standby path, causing havoc if AVT is on. I can&#8217;t tell if that&#8217;s because it is fooled into thinking that the storage is an Active/Active one or if it just sort of periodically &#8220;probes&#8221; standby paths.<br />
How do you switch AVT off? By using the DS &#8220;Storage Manager&#8221; and changing the ESX Hosts&#8217; type from &#8220;Linux&#8221; (or whatever) to &#8220;LNXCLVMWARE&#8221;. This applies to all of the LSI derived Storage Systems (IBM, SUN StorageTek, Engenio, &#8230;). The latter host type is the right one to use when hooking an ESX cluster to an IBM DS Storage System. But &#8220;Linux&#8221; seems to do just fine on not so new ESX hosts version 4.1.x &#8230; When AVT is off, the Storage will decide to trespass LUNs only in the event of an internal hardware failure while, normally, LUN ownership will be handled by the multipathing software on the Host.</p>
<p>More reading on the subject:</p>
<p>[<a href="https://www.ibm.com/developerworks/forums/message.jspa?messageID=14532649">1</a>] Differences between the &#8220;Linux&#8221; and &#8220;LNXCLVMWARE&#8221; host types.<br />
[<a href="http://webcache.googleusercontent.com/search?q=cache:SP6Ytyb4-0YJ:https://selfservice.lsi.com/service/main.jsp%3Bjsessionid%3D0637AE74501C3CB54E44A071BEFF108D%3Ft%3DsolutionTab%26ft%3DsearchTab%26ps%3DsolutionPanels%26locale%3Den_US%26_dyncharset%3DUTF-8%26curResURL%3D%252Fservice%252Fmain.jsp%253Bjsessionid%253D0637AE74501C3CB54E44A071BEFF108D%253F_dyncharset%253DUTF-8%2526_dynSessConf%253D3633170421896306112%2526t%253DsearchTab%2526locale%253Den_US%2526_dyncharset%253DUTF-8%2526topicName%253D%2526sfield%253D%2526dosearch%253Dtrue%2526searchstring%253DQuery%25252520does%25252520not%25252520work%25252520in%25252520WINS%2526useFocusTopic%253Dtrue%2526focusTopic%253D9000029%26solutionId%3DLSI7423%26isSrch%3DYes+site:selfservice.lsi.com+AVT&#038;cd=1&#038;hl=en&#038;ct=clnk&#038;client=opera&#038;source=www.google.com">2</a>] <i>How does Auto Volume Transfer (AVT) work?</i> Courtesy of Google&#8217;s cache. Lists which SCSI commands trigger AVT.<br />
[<a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/VirtuallySpeaking/entry/vmware_scsi_errors_and_conditions_ibm_ds_storage_systems1?lang=en">3</a>] A really nice blog post about the same issue described here. (Found, of course, when I was writing mine)</p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-703-1'>or even &#8220;Auto Disk Transfer&#8221; (ADT) <span class='footnotereverse'><a href='#fnref-703-1'>&#8617;</a></span></li>
</ol>
</div>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=703" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/about-path-thrashing-and-why-you-should-always-zone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remote operations on vmdk disks</title>
		<link>http://www.108.bz/posts/it/remote-operations-on-vmdk-disks/</link>
		<comments>http://www.108.bz/posts/it/remote-operations-on-vmdk-disks/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:43:34 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=275</guid>
		<description><![CDATA[One of the local PCs is using VMware Player to run an (old and small) Windows 2000 Virtual Machine. We need to expand its virtual disk but VMware Player lacks the tools to do that&#8230; I decided to see if it&#8217;s possibile to perform the expansion without moving the VM to a Server/ESXi/vSphere VMware host, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the local PCs is using VMware Player to run an (old and small) Windows 2000 Virtual Machine.<br />
We need to expand its virtual disk but VMware Player lacks the tools to do that&#8230; I decided to see if it&#8217;s possibile to perform the expansion without moving the VM to a Server/ESXi/vSphere VMware host, using the commands (<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmrun</span>, <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmware-vdiskmanager</span>) that come along the VMware Workstation installation I&#8217;ve got on my <i>Linux</i> laptop. The VM is hosted on a <i>Windows XP</i> PC.<br />
Here&#8217;s what I did:</p>
<ul>
<li>Mount the host <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">C$</span> share on the Linux laptop, using <a href="http://linux-cifs.samba.org/">CIFS</a>.</li>
<li>Unexpectedly, the VM has got some active snapshots. Since the whole snapshot machinery is not available in VMware Player, the VM should come out of a VMware Server/ESXi/vSphere host.
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vmrun -T ws listSnapshots &quot;Windows 2000 Professional.vmx&quot;<br />
Total snapshots: 2<br />
Snapshot 1<br />
Snapshot 2</div></div>
</li>
<li>You can&#8217;t expand a disk that underwent some snapshots, they&#8217;ve got to be removed first:
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vmrun -T ws deleteSnapshot &quot;Windows 2000 Professional.vmx&quot; &quot;Snapshot 1&quot;</div></div>
<p>First caveat: the snapshot removal process causes <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmrun</span> to read/write large amount of data, depending on the snapshot&#8217;s size itself, I guess. You&#8217;re running it across the network: you&#8217;ll have to wait a while until it&#8217;s done. I&#8217;ve been monitoring the process with <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">iftop -B -i eth0 -f &#8216;host <i>hostname</i>&#8216;</span> to have an estimate of how long it would take to complete. Each snapshot needs to be removed by means of <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmrun</span>.</li>
<li>Expansion time:
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vmware-vdiskmanager -x 25GB &quot;Windows 2000 Professional.vmdk&quot;<br />
&nbsp; Grow: 100% done.<br />
Disk expansion completed successfully.<br />
<br />
WARNING: If the virtual disk is partitioned, you must use a third-party<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;utility in the virtual machine to expand the size of the<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;partitions. For more information, see:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647</div></div>
<p><span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmware-vdiskmanager</span> appends X bytes of space (where X = new_capacity &#8211; previous_capacity) to the chosen vmdk. Again, those bytes travel through the network, be patient.
</li>
<li>As <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmware-vdiskmanager</span> was so kind to remind us, we just expanded the disk, not the logical partitions contained therein. Some kind of partition manager software is needed to complete the job, my fav being <a href="http://www.acronis.com/enterprise/products/diskdirector/">Acronis Disk Director</a>.</li>
</ul>
<p>Summing things up, it&#8217;s indeed possible to operate remotely on vmdk disks. Did we save any time by doing things this way, that is without copying the VM &#8220;out&#8221; of its host then moving it back onto it? If the snaphots are more than one, no doubt that &#8220;local beats network&#8221;. And what about the expansion? If we add some (empty) data to a vmdk, then need to move it back to the host, then local shouldn&#8217;t be any faster than network. Better would be to use an external drive of sorts. Better yet is to temporarily copy/install VMware workstation on the host, or just <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmrun</span>/<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vmware-vdiskmanager</span> executable files and their dependencies. That&#8217;s what I&#8217;ll try the next time.</p>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=275" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/remote-operations-on-vmdk-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware issues while increasing Datastore capacity</title>
		<link>http://www.108.bz/posts/it/vmware-issues-while-increasing-datastore-capacity/</link>
		<comments>http://www.108.bz/posts/it/vmware-issues-while-increasing-datastore-capacity/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:37:37 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Weirdnesses]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=268</guid>
		<description><![CDATA[VMware vSphere Client/vCenter Server Version 4.0.0 Build 208111. We created a bunch of new LUNs, planning to increase an existing Datastore&#8217;s capacity. VMware side, the operation should be a matter of simply firing up vSphere Client, choosing a host, Configuration tab, viewing the Datastore&#8217;s properties, then clicking on the Increase button. Except that no Extent [...]]]></description>
			<content:encoded><![CDATA[<p>VMware vSphere Client/vCenter Server Version 4.0.0 Build 208111.</p>
<p>We created a bunch of new LUNs, planning to increase an existing Datastore&#8217;s capacity.<br />
VMware side, the operation should be a matter of simply firing up vSphere Client, choosing a host, <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Configuration</span> tab, viewing the Datastore&#8217;s properties, then clicking on the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Increase</span> button. Except that no Extent device seems to be found. That&#8217;s weird because we already did (multiple times) a rescan of each Storage Adapter/HBA. Moreover, selecting &#8220;<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Add Storage</span>&#8221; as if we were to create a new Datastore, indeed shows the expected volumes.<br />
The solution turned out to be this one:</p>
<ul>
<li>Connect vSphere Client directly to the host (thus logging in as root), and not to the vCenter Server.</li>
</ul>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=268" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/vmware-issues-while-increasing-datastore-capacity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

