<?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>VCritical &#187; storage</title>
	<atom:link href="http://www.vcritical.com/tag/storage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vcritical.com</link>
	<description>Informed Virtualization Criticism</description>
	<lastBuildDate>Mon, 30 Aug 2010 12:20:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Register a LUN full of VMs with PowerCLI</title>
		<link>http://www.vcritical.com/2010/08/register-a-lun-full-of-vms-with-powercli/</link>
		<comments>http://www.vcritical.com/2010/08/register-a-lun-full-of-vms-with-powercli/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 11:30:06 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=2669</guid>
		<description><![CDATA[PowerCLI makes it easy to automate vSphere tasks such as registering dormant VMs.  It is also easy to create a hosts file for resolving guest IP addresses when DNS is not available.]]></description>
			<content:encoded><![CDATA[<p>One of the great things about VMware vSphere is <a href="http://www.vcritical.com/2009/02/vm-encapsulation/">virtual machine encapsulation</a> &#8212; a VM is simply a directory of files that can be easily copied around by administrators for a variety of purposes.  Most other platforms <a href="http://www.vcritical.com/2010/06/these-are-not-the-files-you-are-looking-for/">obfuscate virtual machines</a> beyond recognition.</p>
<p>Recently, I was working on a project that required a large number of VMs that I had used previously but were no longer registered on a VMware ESXi host &#8212; they were just waiting patiently on a SAN LUN for their day to come.</p>
<p>Using the vSphere Client to connect the VMFS datastore to a host was a snap.  However, I was not enthusiastic about the several dozen clicks that would have been needed to bring them all back into the inventory for use, so I came up with a simple PowerCLI command to do all the work.</p>
<p>I was so pleased with the <em>power </em>of PowerCLI that I had to share&#8230;</p>
<h2>Register all virtual machines on a datastore</h2>
<p>Connect to vCenter Server with a PowerCLI session and adjust the obvious placeholders to suit your environment:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$esxhost</span><span style="color: pink;">=</span> Get<span style="color: pink;">-</span>VMHost myhost.example.com
<span style="color: #008080; font-weight: bold;">dir</span> <span style="color: #800000;">'vmstores:\myvCenterServer@443\DC1\CX4-02-LUN12\*\*.vmx'</span> <span style="color: pink;">|</span>
 <span style="color: pink;">%</span> <span style="color: #000000;">&#123;</span>New<span style="color: pink;">-</span>VM <span style="color: pink;">-</span>Host <span style="color: #800080;">$esxhost</span> <span style="color: pink;">-</span>VMFilePath <span style="color: #000080;">$_</span>.DatastoreFullPath<span style="color: #000000;">&#125;</span></pre></div></div>

<p>A few moments later, all the VMs are correctly registered and ready for action.</p>
<h2>Build a local hosts file with PowerCLI</h2>
<p>Another issue I encountered was the lack of DNS for guest operating systems at an offsite lab.  There was no way to connect to the various VMs by name, only IP address &#8212; not my favorite approach.  Since <a href="http://www.vcritical.com/2009/12/easily-view-guest-ip-addresses-with-vsphere-client/">vSphere has information about guest networking</a>, I quickly generated a list of IP addresses and VM names in a format suitable for  pasting into my local hosts file:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>VM <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort-object</span> <span style="color: #008080; font-style: italic;">-Property</span> Name <span style="color: pink;">|</span>
 Get<span style="color: pink;">-</span>VMGuest <span style="color: pink;">|</span> <span style="color: pink;">%</span> <span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span>.ipaddress<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span> <span style="color: pink;">+</span> <span style="color: #800000;">&quot;<span style="color: #008080; font-weight: bold;">`t</span>&quot;</span> <span style="color: pink;">+</span> <span style="color: #000080;">$_</span>.VMName<span style="color: #000000;">&#125;</span></pre></div></div>

<p>PowerCLI to the rescue again.  <strong>What are <em>your </em>favorite PowerCLI one-liners?</strong></p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/' rel='bookmark' title='Permanent Link: Easy recovery from a full VMware ESX datastore'>Easy recovery from a full VMware ESX datastore</a></li>
<li><a href='http://www.vcritical.com/2008/12/igt-part-3-one-vm-per-lun-doubters/' rel='bookmark' title='Permanent Link: IGT Part 3: One-VM-per-LUN doubters'>IGT Part 3: One-VM-per-LUN doubters</a></li>
<li><a href='http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/' rel='bookmark' title='Permanent Link: PowerShell Prevents Datastore Emergencies'>PowerShell Prevents Datastore Emergencies</a></li>
<li><a href='http://www.vcritical.com/2009/02/vm-encapsulation/' rel='bookmark' title='Permanent Link: VM Encapsulation'>VM Encapsulation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2010/08/register-a-lun-full-of-vms-with-powercli/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>These are not the files you are looking for</title>
		<link>http://www.vcritical.com/2010/06/these-are-not-the-files-you-are-looking-for/</link>
		<comments>http://www.vcritical.com/2010/06/these-are-not-the-files-you-are-looking-for/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:08:39 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[RHEV]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=2621</guid>
		<description><![CDATA[Red Hat claims that RHEV virtual disks are stored as common files.  In reality, they are obfuscated beyond recognition thanks to LVM volumes.]]></description>
			<content:encoded><![CDATA[<p>If you have been following along on my <a href="http://www.vcritical.com/tag/rhev/">Red Hat Enterprise Virtualization</a> series, you may have noticed that the RHEV marketing hasn&#8217;t matched reality. Red Hat&#8217;s claims about being best in class and equivalent to VMware vSphere are dishonest.  As much as I&#8217;d enjoy writing about something more interesting, I do have a few more important realities to share with the virtualization community about this latecomer.</p>
<h2>RHEV Comparison Whitepaper</h2>
<p>Red Hat published a PDF comparing RHEV to VMware vSphere and Hyper-V.  Here is one of the entries on virtual storage:</p>
<p><img class="alignnone size-full wp-image-2622" title="RHEV Comparison Whitepaper - virtual disk files" src="http://www.vcritical.com/wp-content/uploads/2010/06/rhev-virtual-disk-files.png" alt="" width="567" height="220" /></p>
<p>Okay, so far so good.  Apparently, as with vSphere, virtual disks are simply files and can be stored on any of the various storage domains.  If you missed the last post on how <a href="http://www.vcritical.com/2010/06/multiple-hypervisors-what-about-multiple-sans/">RHEV Data Centers are limited to a single storage technology</a>, please be sure to check it out &#8212; it&#8217;s not like vSphere.</p>
<p>As it turns out, the fact checkers were off the day Red Hat released that handy comparison whitepaper.  Because if you actually went through the effort to set up RHEV and create virtual machines, you would never find anything resembling a virtual disk file on the host.<span id="more-2621"></span></p>
<h2>Logical Volume Manager</h2>
<p>RHEV virtual disks are actually stored in cryptically named logical volumes &#8211; no <a href="http://www.vcritical.com/2009/02/vm-encapsulation/">encapsulation</a> or portability here.</p>
<p><img class="alignnone size-full wp-image-2624" title="RHEV virtual disk &quot;files&quot; are really not" src="http://www.vcritical.com/wp-content/uploads/2010/06/rhev-vgs-lvs.png" alt="" width="566" height="798" /></p>
<p>Did you spot the file?  While it <em>is </em>common to say that &#8220;everything in UNIX is a file&#8221; this is taking that old adage to an extreme, wouldn&#8217;t you say?  Storing virtual disks in this fashion makes it nearly impossible to move VMs between hosts &#8211; even if they are powered off.  And you can forget about easily storing archive or DR copies of important VMs in an alternate location.</p>
<p>Even if you are running Red Hat Enteprise Linux virtual machines, the best and easiest virtualization platform to deploy, configure, and manage is VMware vSphere.  Try for yourself and see.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2010/04/what-is-red-hat-enterprise-virtualization/' rel='bookmark' title='Permanent Link: What is Red Hat Enterprise Virtualization?'>What is Red Hat Enterprise Virtualization?</a></li>
<li><a href='http://www.vcritical.com/2010/06/multiple-hypervisors-what-about-multiple-sans/' rel='bookmark' title='Permanent Link: Multiple hypervisors?  What about multiple SANs?'>Multiple hypervisors?  What about multiple SANs?</a></li>
<li><a href='http://www.vcritical.com/2010/04/rhev-manager-its-not-just-a-clever-name/' rel='bookmark' title='Permanent Link: RHEV Manager &#8212; It&#8217;s not just a clever name'>RHEV Manager &#8212; It&#8217;s not just a clever name</a></li>
<li><a href='http://www.vcritical.com/2010/08/rhev-wrap-up/' rel='bookmark' title='Permanent Link: RHEV Wrap-Up'>RHEV Wrap-Up</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2010/06/these-are-not-the-files-you-are-looking-for/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Multiple hypervisors?  What about multiple SANs?</title>
		<link>http://www.vcritical.com/2010/06/multiple-hypervisors-what-about-multiple-sans/</link>
		<comments>http://www.vcritical.com/2010/06/multiple-hypervisors-what-about-multiple-sans/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 18:40:30 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[RHEV]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=2608</guid>
		<description><![CDATA[Red Hat Enterprise Virtualization does not allow administrators to diversify storage technologies in a data center -- all hosts in a data center must choose between NFS, iSCSI, or Fibre Channel.]]></description>
			<content:encoded><![CDATA[<p>Some of the cool kids are talking about a <em>multi-hypervisor strategy</em> these days.  Mostly journalists and such who could never truly feel the pain of dealing with two vastly different virtualization management platforms.</p>
<p>As you may recall, Red Hat is attempting to bring their new <a href="http://www.vcritical.com/tag/rhev/">RHEV</a> product to market by playing the old &#8220;don&#8217;t get stuck with a single vendor&#8221; trick.  <a href="http://virtualization.info/en/news/2010/03/red-hat-ceo-vmware-customers-want-rhev.html" target="_blank">Red Hat&#8217;s CEO claims</a>:</p>
<blockquote><p>&#8220;&#8230;customers don’t want one platform. They want two.&#8221;</p></blockquote>
<p>Let&#8217;s save the multi-hypervisor discussion for another day, but shift to the topic of <strong>storage diversity</strong>.</p>
<p>While there may be a few environments that can standardize on a single storage area network technology, it typically  makes sense to mix and match iSCSI, NFS, or Fibre Channel SANs to optimize for cost and performance.</p>
<p>During my recent foray into the chaotic world of Red Hat Enterprise Virtualization, I encountered an unbelievable storage limitation with their new KVM hypervisor.</p>
<h2>&#8220;Virtualization diversity&#8230; when and where we say&#8221;</h2>
<p>VMware vSphere customers are free to mix and match supported storage technologies within datacenters, clusters, and even hosts.</p>
<p>I would have thought that a company like Red Hat that is pushing heterogeneous solutions and multiple vendors might feel the same way when it comes to storage.  But that&#8217;s not quite how things go in the land of Red Hat Enterprise Virtualization.</p>
<p>With RHEV, a &#8220;Data Center&#8221; is configured to use a single type of storage;  all clusters and hosts in that Data Center are restricted to that, so choose wisely:</p>
<p><img class="alignnone size-full wp-image-2610" title="New RHEV datacenter - pick yer storage" src="http://www.vcritical.com/wp-content/uploads/2010/06/new-rhev-datacenter.png" alt="" width="362" height="313" /></p>
<h2>Storage Freedom</h2>
<p>VMware vSphere allows administrators to move virtual disks for running VMs from one array to another &#8212; even between different types of arrays &#8212; with zero downtime.  <a href="http://www.vcritical.com/tag/storage-vmotion/">Storage vMotion</a> is a very powerful feature and it is simply not available from Red Hat &#8211; only VMware.</p>
<h2>The Best Choice: VMware vSphere</h2>
<p>Virtual machines have differing storage requirements &#8212; certainly not a one-size-fits-all component of an efficient virtual infrastructure.  The best platform for building your own private cloud is also the one with the broadest support for today&#8217;s storage technologies:  VMware vSphere.</p>
<p>Oh, by the way, did you know that VMware is positioned in the <strong>Leaders Quadrant</strong> of Gartner&#8217;s newly-released <a href="http://www.gartner.com/technology/media-products/reprints/vmware/article4/article4.html" target="_blank">x86 Server Virtualization Magic Quadrant</a>.  Take a look at the full article &#8212; I&#8217;ll give a free subscription to the <a href="http://feedproxy.google.com/vcritical">VCritical RSS feed</a> to the first 10 people that spot Red Hat&#8217;s position.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2010/04/what-is-red-hat-enterprise-virtualization/' rel='bookmark' title='Permanent Link: What is Red Hat Enterprise Virtualization?'>What is Red Hat Enterprise Virtualization?</a></li>
<li><a href='http://www.vcritical.com/2010/06/these-are-not-the-files-you-are-looking-for/' rel='bookmark' title='Permanent Link: These are not the files you are looking for'>These are not the files you are looking for</a></li>
<li><a href='http://www.vcritical.com/2010/04/red-hat-enterprise-linux-is-not-enterprise-virtualization/' rel='bookmark' title='Permanent Link: Red Hat Enterprise Linux is not Enterprise Virtualization'>Red Hat Enterprise Linux is not Enterprise Virtualization</a></li>
<li><a href='http://www.vcritical.com/2010/08/rhev-wrap-up/' rel='bookmark' title='Permanent Link: RHEV Wrap-Up'>RHEV Wrap-Up</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2010/06/multiple-hypervisors-what-about-multiple-sans/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>The Truth About VM SAN Transfers</title>
		<link>http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/</link>
		<comments>http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:05:59 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SCVMM]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1959</guid>
		<description><![CDATA[While Microsoft marketing material claims Hyper-V and SCVMM can transfer large virtual machine files and templates over a SAN, the truth is that all VM transfers are done over the network.  Only VMware ESX leverages high-speed storage area networking for VM migration.]]></description>
			<content:encoded><![CDATA[<p>Most enterprise virtualization deployments make use of a robust shared storage infrastructure.  A high-performance SAN allows multiple hypervisors to access virtual machine disks and is the foundation for amazing virtualization benefits such as VMware vMotion and HA.  There are other benefits, too.</p>
<p>Virtualization management tasks such as cloning existing virtual machines or deploying new ones from templates often involve slinging around multi-gigabyte chunks of data.  It&#8217;s preferable to move or copy data on the SAN instead of the LAN because it can be faster, but more importantly, doing so reduces impact to other services that rely on the LAN.</p>
<h2>Use the SAN, ESX!</h2>
<p>VMware ESX will transfer VMs and templates over a SAN connection whenever possible but, if necessary, it also does a fine job of moving those bits over a standard LAN.  This goes for VMs <em>as well as templates</em> because with VMware vSphere, templates live on SAN datastores, too &#8212; shared among multiple ESX hosts &#8212; not on network file shares.  If templates <em>were </em>stored on a file server, there would be no choice other than to copy those multi-gigabyte files over the LAN and potentially impact other production traffic.</p>
<p>Nice design choice, VMware!  [<em>Actually, if you go back to the early days of VirtualCenter 1.x, templates could also be stored directly on the VC server and deployed over the network.  That option was removed as of VC 2.0.</em>]</p>
<p><strong>So far, so good.  Let&#8217;s take a look at how Hyper-V stacks up.<span id="more-1959"></span></strong></p>
<h2>Obfuscating the Inequalities</h2>
<p>In the tradition of the recent <a href="http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/">storage hot add/remove claims</a>, Microsoft has again gone the extra mile to give the appearance of feature parity.</p>
<p>Take a look at this excerpt from the System Center Virtual Machine Manager 2008 R2 <a href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/whats-new-R2.aspx" target="_blank">What&#8217;s New page</a>:</p>
<p style="padding-left: 30px;"><strong>SAN migration into and out of clustered hosts:</strong> This allows virtual machines to migrate into and out of clusters using a SAN transfer, which saves the time required for copying the virtual machine file over the network.</p>
<p>And the <a href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/features.aspx" target="_blank">features page</a> is even more dramatic, proclaiming:</p>
<p style="padding-left: 30px;">Virtual machine images can be large and difficult to move over the network. VMM auto-detects SAN infrastructure and enables copying of virtual machine images over fiber at fast speeds, thus leveraging SAN investments.</p>
<p>Sounds good, just like VMware &#8212; and at one-sixth the price!  But there is a small problem: <strong>it is not true</strong>.</p>
<p>Hyper-V uses the BITS service to transfer VMs over the LAN in almost all cases.  There <em>is</em> a scenario where SCVMM can orchestrate the disconnection and reconnection of a SAN LUN, &#8220;transferring&#8221; a VM to another host.  Enabling the feature requires additional configuration and some software from your SAN vendor.  Of course, it also means going back to <em>one VM per LUN</em> and foregoing the wonders of <a href="http://www.vcritical.com/tag/csv/" target="_blank">CSV</a>.  Any takers?</p>
<h2>The SCVMM Library Server</h2>
<p>SCVMM 2008 R2 provides VM template functionality for Hyper-V.  Templates  and ISO images are stored in a Library, which uses standard Windows file services.  Obviously, that means no SAN copying for template deployments, either &#8212; kind of like VMware VirtualCenter 1.0.</p>
<h2>Conclusion</h2>
<p>&#8220;SAN LUN disconnect and reconnect&#8221; just doesn&#8217;t have the same ring to it as &#8220;SAN transfer&#8221; but I&#8217;m not sure that is sufficient justification for these misleading marketing claims.  And to use the word &#8220;copying&#8221; is simply dishonest.</p>
<p>Don&#8217;t make the mistake of assuming Hyper-V is just like VMware ESX.  Compare for yourself &#8212; seeing is believing.</p>
<p style="padding-left: 30px;">


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2008/12/igt-part-2-san-misers/' rel='bookmark' title='Permanent Link: IGT Part 2: SAN Misers'>IGT Part 2: SAN Misers</a></li>
<li><a href='http://www.vcritical.com/2008/10/storage-vendors-unanimously-applaud-scvmm-innovation/' rel='bookmark' title='Permanent Link: Storage vendors unanimously applaud SCVMM innovation'>Storage vendors unanimously applaud SCVMM innovation</a></li>
<li><a href='http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/' rel='bookmark' title='Permanent Link: The Truth About Storage Hot Add and Remove'>The Truth About Storage Hot Add and Remove</a></li>
<li><a href='http://www.vcritical.com/2009/01/using-scvmm-to-attach-iso-images-to-vmware-esx-vms/' rel='bookmark' title='Permanent Link: Using SCVMM to attach ISO images to VMware ESX VMs'>Using SCVMM to attach ISO images to VMware ESX VMs</a></li>
</ol></p><div style="font-family:Verdana; color:#000000; background-color: #C0C0C0; padding: 7px;border: dashed thin">

<a href="http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/#comments">Leave a Comment</a> •
<a href="http://feedproxy.google.com/vcritical">Subscribe to RSS</a> •
<a href="http://feedburner.google.com/fb/a/mailverify?uri=vcritical&loc=en_US">Subscribe via Email</a> •
<a href="http://www.twitter.com/eric_gray">Follow Eric Gray on Twitter</a><br/>

More articles on: <a href="http://www.vcritical.com/tag/esx/" rel="tag">ESX</a>, <a href="http://www.vcritical.com/tag/hyper-v/" rel="tag">Hyper-V</a>, <a href="http://www.vcritical.com/tag/pass/" rel="tag">PASS</a>, <a href="http://www.vcritical.com/tag/scvmm/" rel="tag">SCVMM</a>, <a href="http://www.vcritical.com/tag/storage/" rel="tag">storage</a>, <a href="http://www.vcritical.com/tag/templates/" rel="tag">templates</a>, <a href="http://www.vcritical.com/tag/vcenter/" rel="tag">vCenter</a> • <a href="http://www.vcritical.com/category/virtualizationism/">Browse All Virtualization Content</a><br/>

<a href="http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/">The Truth About VM SAN Transfers</a> by <a href="http://www.vcritical.com/about/">Eric Gray</a> © 2009 • <a href="http://www.vcritical.com/">VCritical</a>

</div>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>The Truth About Storage Hot Add and Remove</title>
		<link>http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/</link>
		<comments>http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:34:35 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SCVMM]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[VMFS]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1944</guid>
		<description><![CDATA[VMware vSphere 4 offers multiple options for expanding virtual machine storage with zero downtime, including the ability to grow a running virtual disk.  Hyper-V marketing literature makes a similar claim, but is limited to simply adding another virtual disk.]]></description>
			<content:encoded><![CDATA[<p>VMware vSphere 4 supports a range of hot storage management technologies:</p>
<ul>
<li> vStorage VMFS Volume Grow</li>
<li> Hot Extend for Virtual Disks</li>
<li> Hot Virtual Disk Add/Remove</li>
</ul>
<p>With these capabilities, if space gets tight in your vSphere environment, it is easy to be proactive and address the issue before anyone notices.  The process goes something like this:</p>
<ul>
<li>Allocate additional physical hard disk space on your SAN to an appropriate LUN</li>
<li>Grow your VMFS datastore onto the newly added free space</li>
<li>Extend, or add new, virtual disks for the VMs that need more storage</li>
<li>Expand the volume inside the guest to create more usable space</li>
</ul>
<p>All without a reboot: zero downtime.</p>
<h2>Not All Virtualization Platforms are Created Equal</h2>
<p>Don&#8217;t jump to the conclusion that all hypervisors offer the same flexibility.  Perhaps you are wondering about Hyper-V capabilities?<span id="more-1944"></span></p>
<p>First, let&#8217;s take a look at some Microsoft System Center Virtual Machine Manager 2008 R2 (SCVMM) marketing statements:</p>
<p>The <a href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/whats-new-R2.aspx" target="_blank">What&#8217;s New</a> page announces:</p>
<p style="padding-left: 30px;"><strong>Hot addition/removal of Storage</strong>: Allows the addition and removal of storage to virtualized infrastructure without interruption. Additionally, &#8220;live&#8221; management of virtual hard disk (VHDs) or iSCSI pass through disks, allows administrators to take advantage of additional backup scenarios and readily use mission critical and storage-intensive applications.</p>
<p>The <a href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/top-benefits-R2.aspx" target="_blank">Top Benefits</a> list proclaims:</p>
<p style="padding-left: 30px;"><strong>Hot addition/removal of storage</strong>: With this capability, administrators can quickly and efficiently respond to changing storage requirements of virtual machines. This ability to hot-add additional storage eliminates the previous need to take the host down to upgrade storage thus increasing business continuity for end users and reducing complexity for administrators. Additionally it allows administrators to confidently deploy mission critical applications (in which up-time is of paramount importance) that may have rapidly changing storage requirements such as web, database or other business applications.</p>
<p>An IT decision-maker just might get the impression that both ESX and Hyper-V have essentially the same features. <strong>They do not.</strong></p>
<p>You may be surprised to find out that all of the descriptions above merely refer to <strong>adding a new virtual disk</strong> to a VM &#8212; providing the conditions are right.  You cannot grow an existing VHD, and you can&#8217;t safely remove a VHD with SCVMM.</p>
<h2>Plan Ahead</h2>
<p>First things first.  If your Hyper-V VM does not have a virtual SCSI adapter &#8212; templates and VMs from Hyper-V R1 do not &#8212; you won&#8217;t be able to hot add a new VHD until you correct that shortcoming.  Hello downtime.</p>
<p>SCVMM can add a new blank virtual disk to a VM or it can copy an existing one across the network from the Library &#8212; if you copied it there beforehand, but there is no way to add a VHD that may already be present on your SAN &#8212; even if it is already sitting right next to the destination VM.</p>
<h2>Removal?</h2>
<p>Up-time may be of <em>paramount importance</em>, but preventing data-loss was evidently not part of the original design.  Removing a VHD with SCVMM results in the immediate deletion of the underlying VHD file.  Ouch!  Thankfully, a recent patch improves administrator job security by throwing up a warning before this happens, providing an option to cancel.  There is no way to simply disconnect a VHD using SCVMM.</p>
<p>It turns out that if you really want to take advantage of those &#8220;Additional Backup Scenarios&#8221; by hot adding <em>and removing</em> virtual disks, you need your trusty Hyper-V Manager utility.  Still think System Center is a <a href="http://www.vcritical.com/2009/08/single-pane-of-glass-hyper-v-edition/">single pane of glass</a>?  And that&#8217;s not the only task that requires administrators to switch between Hyper-V interfaces.</p>
<h2>Conclusion</h2>
<p>Microsoft is trying hard to ride the coattails of VMware ESX.  The latest release of Hyper-V R2 still does not have capabilities enjoyed by VMware administrators since the ESX 3.5 days.</p>
<p>Don&#8217;t believe the obfuscated marketing literature.  VMware vSphere is for real.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/' rel='bookmark' title='Permanent Link: vSphere Thin-Provisioned Disk Performance'>vSphere Thin-Provisioned Disk Performance</a></li>
<li><a href='http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/' rel='bookmark' title='Permanent Link: Responsible Thin Provisioning in VMware vSphere'>Responsible Thin Provisioning in VMware vSphere</a></li>
<li><a href='http://www.vcritical.com/2009/12/the-truth-about-vm-san-transfers/' rel='bookmark' title='Permanent Link: The Truth About VM SAN Transfers'>The Truth About VM SAN Transfers</a></li>
<li><a href='http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/' rel='bookmark' title='Permanent Link: Easy recovery from a full VMware ESX datastore'>Easy recovery from a full VMware ESX datastore</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>vSphere Thin-Provisioned Disk Performance</title>
		<link>http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/</link>
		<comments>http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:19:55 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1934</guid>
		<description><![CDATA[A new paper published by the VMware Performance Team shows that virtual disks using  vStorage Thin Provisioning perform nearly as well as fully allocated thick disks.  ]]></description>
			<content:encoded><![CDATA[<p>Thin disk provisioning is a fully-supported feature in vSphere 4 that can save tons of storage space on your SAN by allowing virtual disks to consume storage space <em>as needed</em> instead all at once.</p>
<p>Under the supervision of VMware vCenter Server, ESX 4 thin provisioning is safe and reliable even for production workloads thanks to<a href="http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/"> advanced storage accounting and built-in monitoring</a>.  And even if the worst does happen &#8212; an unexpectedly full datastore &#8212; <a href="http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/">recovery is simple</a>.</p>
<p>Now that <em>you </em>are convinced that VMware vSphere thin provisioning has a place in your data center, you may be wondering about performance tradeoffs.</p>
<p><strong>It turns out that thin disks perform just about as well as thick disks.</strong></p>
<h2>New Performance Results</h2>
<p>In this brand-new <a href="http://www.vmware.com/pdf/vsp_4_thinprov_perf.pdf">VMware vStorage Thin Provisioning performance study</a>, VMware performance engineers compare thick and thin disk performance.  This must-read document covers several important topics, such as:</p>
<ul>
<li>I/O-intensive benchmarking with a 16-node ESX cluster</li>
<li>File copy benchmarking with 2 ESX hosts</li>
<li>Fragmentation impact</li>
<li>Thin provisioning affect on co-located thick disks</li>
</ul>
<p>Now, go forth and provision&#8230; thinly.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/01/finding-thin-provisioned-virtual-disks-with-powershell/' rel='bookmark' title='Permanent Link: Finding thin-provisioned virtual disks with PowerShell'>Finding thin-provisioned virtual disks with PowerShell</a></li>
<li><a href='http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/' rel='bookmark' title='Permanent Link: Responsible Thin Provisioning in VMware vSphere'>Responsible Thin Provisioning in VMware vSphere</a></li>
<li><a href='http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/' rel='bookmark' title='Permanent Link: Easy recovery from a full VMware ESX datastore'>Easy recovery from a full VMware ESX datastore</a></li>
<li><a href='http://www.vcritical.com/2009/11/the-truth-about-storage-hot-add-and-remove/' rel='bookmark' title='Permanent Link: The Truth About Storage Hot Add and Remove'>The Truth About Storage Hot Add and Remove</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easy recovery from a full VMware ESX datastore</title>
		<link>http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/</link>
		<comments>http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:57:37 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[Storage VMotion]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[VMFS]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1757</guid>
		<description><![CDATA[With VMware vSphere, ESX, and VMFS, running out of space on a datastore does not cause damage to virtual machines.  It is easy to recover without even a guest OS reboot.]]></description>
			<content:encoded><![CDATA[<p>This is the third article in a series on VMware vSphere thin-provisioned virtual disks.  Now that we&#8217;ve covered:</p>
<ul>
<li><a href="http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/">Full accounting for all provisioned storage space and complete monitoring</a></li>
<li><a href="http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/">Automatic response to a nearly-full datastore through vCenter Alarms, PowerShell, and Storage VMotion</a></li>
</ul>
<p>You may be <em>nearly </em>convinced to start using thin provisioning, but still wondering&#8230;</p>
<h2>What happens if a datastore fills up?</h2>
<p>When a datastore runs out of space, thin-provisioned virtual disks can no longer dynamically grow to accommodate additional storage demand.  When VMware ESX detects this condition, <strong>virtual machines in need of additional storage are instantly paused</strong> to prevent guest operating systems from failing.  Conversely, VMs that that read and write to existing allocated storage blocks will continue running without issue &#8212; <strong>not all virtual machines will be paused</strong> just because a datastore is out of space.</p>
<p>If you ever find yourself in this situation, it&#8217;s not hard to fix.  Here is one simple approach, step-by-step:</p>
<ol>
<li>Free up some space by deleting or moving files &#8212; ISO images or powered-off VMs would be perfect</li>
<li>Resume one of the paused VMs</li>
<li>Use Storage VMotion to move the disks for that VM to another datastore</li>
<li>Resume the remaining VMs</li>
</ol>
<p><strong>Watch the procedure in action:</strong><br />
<embed src="http://www.youtube.com/v/4G8MEC14eKU&#038;hl=en&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></p>
<p>Depending on the size and storage demand of each VM, additional migrations may be needed.  An alternative resolution would be to add additional space to the SAN LUN and grow the VMFS volume.</p>
<p><span id="more-1757"></span></p>
<h2>The Experiment</h2>
<p>To simulate a sudden storage demand by the thin-provisioned VMs in the above video, I simply copied a large file from a network share to each Windows Server 2003 VM simultaneously.</p>
<p>For the curious, below is a PowerShell script for the task.  Run it from anywhere &#8212; it uses Sysinternals psexec to remotely initiate a file copy on each VM from a network share.</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># VM naming convention combines this string with 2-digit number</span>
<span style="color: #800080;">$vmPrefix</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;VM2003e-&quot;</span>
&nbsp;
<span style="color: #008000;"># UNC path to a large file that will be copied into each VM</span>
<span style="color: #800080;">$iso</span><span style="color: pink;">=</span><span style="color: #800000;">&quot;\\fileserver\ISO\large.iso&quot;</span>
&nbsp;
<span style="color: #008000;"># credentials to download above file from \\fileserver</span>
<span style="color: #800080;">$user</span><span style="color: pink;">=</span><span style="color: #800000;">&quot;domain\username&quot;</span>
<span style="color: #800080;">$pass</span><span style="color: pink;">=</span><span style="color: #800000;">&quot;pa55word&quot;</span>
&nbsp;
<span style="color: #008000;"># pass this function a list of numbers</span>
<span style="color: #0000FF;">function</span> createVmList <span style="color: #000000;">&#40;</span><span style="color: #800080;">$series</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #800080;">$vmList</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
&nbsp;
    <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$id</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$series</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #800080;">$vmList</span> <span style="color: pink;">+=</span>  <span style="color: pink;">%</span><span style="color: #000000;">&#123;</span><span style="color: #800000;">&quot;$vmPrefix{0:00}&quot;</span> <span style="color: #FF0000;">-f</span> <span style="color: #800080;">$id</span><span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #800080;">$vmList</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># make sure Sysinternals psexec is in your path</span>
<span style="color: #0000FF;">function</span> psexecOnVm <span style="color: #000000;">&#40;</span><span style="color: #800080;">$cmd</span><span style="color: pink;">,</span> <span style="color: #800080;">$vmList</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #800080;">$vmList</span> <span style="color: pink;">|</span> <span style="color: pink;">%</span> <span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Invoke-Expression</span> <span style="color: #800000;">&quot;psexec.exe \\$_ -d -u $user -p $pass $cmd&quot;</span><span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
psexecOnVM <span style="color: #800000;">&quot;cmd /c copy /Y $iso c:\&quot;</span> <span style="color: #000000;">&#40;</span>createVMlist <span style="color: #000000;">&#40;</span>31..39<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></pre></div></div>

<h2>VMware ESX is Resilient</h2>
<p>You may have been surprised at how easy it is to recover from a full datastore &#8212; without so much as a guest OS reboot.  It&#8217;s a testament to the rock-solid architecture behind VMware ESX and VMFS.  No other virtualization platform comes close.  Try for yourself.  See what happens if a group of thin-provisioned Hyper-V virtual machines suddenly run out of storage &#8212; it&#8217;s not going to be pretty.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/' rel='bookmark' title='Permanent Link: Responsible Thin Provisioning in VMware vSphere'>Responsible Thin Provisioning in VMware vSphere</a></li>
<li><a href='http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/' rel='bookmark' title='Permanent Link: vSphere Thin-Provisioned Disk Performance'>vSphere Thin-Provisioned Disk Performance</a></li>
<li><a href='http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/' rel='bookmark' title='Permanent Link: PowerShell Prevents Datastore Emergencies'>PowerShell Prevents Datastore Emergencies</a></li>
<li><a href='http://www.vcritical.com/2009/01/finding-thin-provisioned-virtual-disks-with-powershell/' rel='bookmark' title='Permanent Link: Finding thin-provisioned virtual disks with PowerShell'>Finding thin-provisioned virtual disks with PowerShell</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PowerShell Prevents Datastore Emergencies</title>
		<link>http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/</link>
		<comments>http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 10:30:03 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[Storage VMotion]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1713</guid>
		<description><![CDATA[When a datastore in your VMware vSphere environment is about to fill up, you can have vCenter automatically spring into action to prevent downtime by using Storage VMotion.]]></description>
			<content:encoded><![CDATA[<p>In my previous post on <a href="http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/">VMware vSphere thin provisioning</a>, I pointed out the new datastore alarm feature.  You can take advantage of this feature to respond to a sudden storage demand and <strong>automatically take action before end users notice</strong>.</p>
<p>When triggered, vCenter Server alarm actions allow several options, including the ability to run an arbitrary command such as a VMware PowerCLI PowerShell script.  Please see <a href="http://blogs.vmware.com/vipowershell/2009/09/how-to-run-powercli-scripts-from-vcenter-alarms.html" target="_blank">Carter Shanklin&#8217;s in-depth article</a> for more details on how this works &#8212; note that he uses a different technique to launch the scripts.</p>
<h2>Storage VMotion to the Rescue</h2>
<p>When a datastore is about to run out of space, the fastest resolution may be to simply migrate virtual disks to another datastore.   VMware Storage VMotion provides that capability with zero downtime for VMs and no disruption to end users.  Fortunately, PowerCLI can perform this feat with ease, thanks to the Move-VM cmdlet.</p>
<p>Let&#8217;s take a look at a functional prototype PowerCLI PowerShell script:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Add-PSSnapin</span> VMware.Vimautomation.Core
Connect<span style="color: pink;">-</span>VIServer localhost
&nbsp;
<span style="color: #800080;">$vmToMove</span> <span style="color: pink;">=</span> get<span style="color: pink;">-</span>vm <span style="color: pink;">-</span>Datastore <span style="color: #800080;">$env</span>:VMWARE_ALARM_TARGET_NAME <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">select-object</span> <span style="color: #008080; font-style: italic;">-first</span> <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #800080;">$destDS</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>Datastore <span style="color: pink;">|</span> <span style="color: #0000FF;">where</span> <span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span>.FreeSpaceMB <span style="color: #FF0000;">-gt</span> <span style="color: #000000;">50000</span> <span style="color: #FF0000;">-and</span> <span style="color: #000080;">$_</span>.Accessible <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$true</span><span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">select-object</span> <span style="color: #008080; font-style: italic;">-first</span> <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$destDS</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	move<span style="color: pink;">-</span>vm <span style="color: pink;">-</span>VM <span style="color: #800080;">$vmToMove</span> <span style="color: pink;">-</span>Datastore <span style="color: #800080;">$destDS</span> <span style="color: pink;">-</span>RunAsync
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This script is a proof-of-concept that is not ready for your production environment as it is &#8212; it just picks an arbitrary VM from the nearly-full datastore, finds another datastore with at least 50GB free, and moves the VM disks.  More comprehensive selection logic and error checking are needed for a critical task like this.<span id="more-1713"></span></p>
<p>Save your script on the vCenter Server system somewhere, such as C:\scripts\datastore.ps1.</p>
<h2>Create the Datastore Alarm</h2>
<p>Create a new alarm at an appropriate level in the vCenter hierarchy, such as a datacenter, and configure like this:</p>
<p><img class="alignnone size-full wp-image-1717" title="Datastore Alarm" src="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-emergency-general.png" alt="Datastore Alarm" width="404" height="253" /></p>
<p>On the Triggers tab, add a &#8220;Datastore Disk Usage (%)&#8221; trigger to alert at a reasonable percentage &#8212; I opted for 93.</p>
<h2>Run PowerShell Directly from vCenter Server</h2>
<p>For whatever reason, PowerShell.exe does not do well when launched directly by another process &#8212; it tends to hang instead of exiting when it is finished.  As a workaround, it <em>can</em> be launched from cmd.exe as long as it receives something on standard input.  To do all that, the necessary code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">&quot;c:\windows\system32\cmd.exe&quot; &quot;/c <span style="color: #b1b100; font-weight: bold;">echo</span>.|powershell.exe -nologo -noprofile -noninteractive c:\scripts\datastore.ps1&quot;</pre></div></div>

<p>For an alternate approach, take a look at the intermediate batch file solution described by Carter Shanklin in the link above.</p>
<p>On the Actions tab, add a &#8220;Run a command&#8221; action and supply the appropriate command.  You also need to decide whether to run one time or repeat the action.</p>
<p><a href="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-emergency-run-command.png"><img class="alignnone size-medium wp-image-1718" title="Datastore alarm running a PowerShell script" src="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-emergency-run-command-300x191.png" alt="Datastore alarm running a PowerShell script" width="300" height="191" /></a></p>
<h2>Action!</h2>
<p>To test the alarm, either fill up the datastore or temporarily lower the alarm threshold.  When the alarm fires, a Storage VMotion should be seen in the vSphere Client:</p>
<p><img class="alignnone size-full wp-image-1721" title="Storage VMotion in progress" src="http://www.vcritical.com/wp-content/uploads/2009/09/svmotion-inprogress.png" alt="Storage VMotion in progress" width="381" height="39" /></p>
<p>Note the &#8220;Initiated by&#8221; column &#8212; that&#8217;s the machine account for this vCenter Server.  The PowerCLI script is kicked off from vpxd.exe, which is running as LocalSystem.</p>
<p>Additional information is available by looking at the Tasks &amp; Events tab for the datastore.  Here you can see a sample sequence of events, newest on top:</p>
<p><img class="alignnone size-full wp-image-1723" title="Datastore emergency events" src="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-emergency-events.png" alt="Datastore emergency events" width="500" height="418" /></p>
<h2>The Last Resort</h2>
<p>This automated Storage VMotion recovery alarm is a safety valve that could help you avoid suddenly running out of space on a datastore.  It should not take the place of more proactive storage management, but it sure beats VM downtime.</p>
<p style="padding-left: 30px;">In case you are wondering: No, you can&#8217;t do the same thing with Hyper-V because Hyper-V does not have zero-downtime Storage VMotion.  Just another reason to choose VMware vSphere &#8212; as if you needed <em>another</em> reason.</p>
<p><strong>Have you used vCenter alarms to automate any recovery processes in your environment?<br />
</strong></p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/' rel='bookmark' title='Permanent Link: Easy recovery from a full VMware ESX datastore'>Easy recovery from a full VMware ESX datastore</a></li>
<li><a href='http://www.vcritical.com/2010/08/register-a-lun-full-of-vms-with-powercli/' rel='bookmark' title='Permanent Link: Register a LUN full of VMs with PowerCLI'>Register a LUN full of VMs with PowerCLI</a></li>
<li><a href='http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/' rel='bookmark' title='Permanent Link: Responsible Thin Provisioning in VMware vSphere'>Responsible Thin Provisioning in VMware vSphere</a></li>
<li><a href='http://www.vcritical.com/2009/02/vi-toolkit-for-windows-15-and-the-powershell-prompt/' rel='bookmark' title='Permanent Link: VI Toolkit (for Windows) 1.5 and the PowerShell prompt'>VI Toolkit (for Windows) 1.5 and the PowerShell prompt</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/10/powershell-prevents-datastore-emergencies/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Responsible Thin Provisioning in VMware vSphere</title>
		<link>http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/</link>
		<comments>http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 13:49:04 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[thin provisioning]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1684</guid>
		<description><![CDATA[VMware vSphere 4 offers thin provisioned virtual disks backed by management that enables safe use in a production environment thanks to advanced accounting of all provisioned space.]]></description>
			<content:encoded><![CDATA[<p>A cost-saving feature introduced in VMware vSphere 4 is <strong>fully supported</strong> <a href="http://www.vmware.com/products/vstorage-thin-provisioning/overview.html" target="_blank">thin-provisioned virtual disks</a>. Thin-provisioning decreases demand for SAN storage space by permitting virtual disks to consume just the space they actually use &#8212; and grow as needed &#8212; instead of pre-allocating all space up front.</p>
<p>What&#8217;s new is not necessarily the <em>technology</em> &#8212; it&#8217;s the <a href="http://www.youtube.com/watch?v=FRZh-mzchnM&amp;NR=1" target="_blank"><em>management</em></a>.  In fact, veteran VMware ESX admins have been creating thin provisioned virtual disks for years &#8212; for controlled scenarios &#8212; by way of the <strong>vmkfstools</strong> command.</p>
<p>Before vSphere and ESX 4, however, thin disks came with risk &#8212; there was no simple way of accounting for the overcommitted storage on each LUN.  Even with multiple gigabytes of free space, a small gang of thin-provisioned virtual machines could quickly quickly grow to exceed datastore capacity during a sudden demand spike.</p>
<h2>Complete Storage Accounting</h2>
<p>Now in vSphere 4 there is a new element in the capacity section of the datastore summary tab that shows total provisioned space &#8212; the maximum potential growth of all virtual machines if thin provisioned disks were fully utilized:</p>
<p><img class="alignnone size-full wp-image-1686" title="Datastore summary tab shows committed capacity" src="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-summary-tab-capacity.png" alt="Datastore summary tab shows committed capacity" width="350" height="127" /></p>
<p>Virtual machines with snapshots have the potential of consuming <strong>even more</strong> datastore space, so vSphere accounts for this condition, too. <span id="more-1684"></span> Take a look at this VM Summary tab, where the total provisioned storage includes:</p>
<ul>
<li>Virtual hard disk (40GB)</li>
<li>Snapshot (another 40GB potential, worst-case)</li>
<li>VM swap file (1GB &#8212; sized according to RAM in theVM)</li>
</ul>
<p><img class="alignnone size-full wp-image-1692" title="Storage resources for VM with snapshot" src="http://www.vcritical.com/wp-content/uploads/2009/09/vm-resources-with-snapshot-poweredon.png" alt="Storage resources for VM with snapshot" width="374" height="207" /></p>
<p>As you can see, a VM with a 40GB virtual disk can actually consume up to 81GB of space on your SAN because of a forgotten snapshot!  Use the  <a href="http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/" target="_self">snapshot alarm</a> to stay in control.  And don&#8217;t forget that VMware vSphere snapshots are perfectly <a href="http://www.vcritical.com/2009/04/hyper-v-snapshots-not-for-production/">suitable for production</a>.</p>
<h2>New Datastore Alarms</h2>
<p>New alarms in vSphere prevent out-of-space surprises.  Administrators can monitor not only the free space on a datastore, but also the percentage overallocated &#8212; making it easy to adhere to policies concerning thin provisioning aggressiveness in your environment.</p>
<p><img class="alignnone size-full wp-image-1699" title="Datastore alarm for disk overallocation" src="http://www.vcritical.com/wp-content/uploads/2009/09/datastore-disk-overalloc-alarm.png" alt="Datastore alarm for disk overallocation" width="397" height="137" /></p>
<h2>Flexible Virtual Disk Re-configuration</h2>
<p>When creating a new VM, opting for thin-provisioned disks is as easy as checking a box.  If you change your mind later, you don&#8217;t have to start over &#8212; during a Storage VMotion operation, administrators can opt to change the VM disk format on the fly (see below).  It is also possible to inflate thin disks into thick via a new menu in the Datastore Browser.</p>
<p><img class="alignnone size-full wp-image-1687" title="VM disk format selection during Storage VMotion" src="http://www.vcritical.com/wp-content/uploads/2009/09/vm-disk-format-selection.png" alt="VM disk format selection during Storage VMotion" width="512" height="256" /></p>
<h2>Danger!</h2>
<p>You&#8217;ve probably heard the now-famous quote by Tom Bittman from Gartner:</p>
<blockquote><p>Virtualization without good management is more dangerous than not using virtualization in the first place.</p></blockquote>
<p>That goes <em>double </em>for thin-provisioned virtual disks.  Without comprehensive accounting and monitoring in place, your virtual infrastructure may be heading for disaster.  <strong>This level of insight is only available with VMware vSphere 4 &#8212; and it&#8217;s built right into the platform.</strong></p>
<p>What about Microsoft virtualization?  Hyper-V R2 thin provisioning &#8212; known as &#8220;dynamic disks&#8221; &#8212; is not a <a href="http://blogs.technet.com/mghazai/archive/2009/09/04/hyper-v-dynamic-expanding-or-fixed-size-vhd.aspx" target="_blank">best practice</a>.  Perhaps due to the lack of accounting and monitoring of storage overcommitment &#8212; especially critical now with Cluster Shared Volumes and multiple VMs per LUN.</p>
<p><strong>Are <em>you</em> using vSphere thin provisioning?</strong></p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/11/vsphere-thin-provisioned-disk-performance/' rel='bookmark' title='Permanent Link: vSphere Thin-Provisioned Disk Performance'>vSphere Thin-Provisioned Disk Performance</a></li>
<li><a href='http://www.vcritical.com/2009/10/easy-recovery-from-a-full-vmware-esx-datastore/' rel='bookmark' title='Permanent Link: Easy recovery from a full VMware ESX datastore'>Easy recovery from a full VMware ESX datastore</a></li>
<li><a href='http://www.vcritical.com/2009/01/finding-thin-provisioned-virtual-disks-with-powershell/' rel='bookmark' title='Permanent Link: Finding thin-provisioned virtual disks with PowerShell'>Finding thin-provisioned virtual disks with PowerShell</a></li>
<li><a href='http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/' rel='bookmark' title='Permanent Link: VMware vSphere 4 has a Snapshot Alarm'>VMware vSphere 4 has a Snapshot Alarm</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>VMware vSphere 4 has a Snapshot Alarm</title>
		<link>http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/</link>
		<comments>http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:16:03 +0000</pubDate>
		<dc:creator>Eric Gray</dc:creator>
				<category><![CDATA[Virtualizationism]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://www.vcritical.com/?p=1222</guid>
		<description><![CDATA[Snapshots have always been a powerful feature of VMware ESX &#8212; even in production deployments.  There are tons of innovative tools and scripts out there to monitor snapshots &#8212; just check out this new one from Virtu-Al.
If you happen to want a simple, built-in way to monitor your snapshots in VMware vSphere 4, look no [...]]]></description>
			<content:encoded><![CDATA[<p>Snapshots have always been a powerful feature of VMware ESX &#8212; <a href="http://www.vcritical.com/2009/04/hyper-v-snapshots-not-for-production/">even in production deployments</a>.  There are tons of innovative tools and scripts out there to monitor snapshots &#8212; just check out this <a href="http://www.virtu-al.net/2009/06/22/powercli-snapreminder/" target="_blank">new one from Virtu-Al</a>.</p>
<p>If you happen to want a simple, built-in way to monitor your snapshots in VMware vSphere 4, look no further than this new alarm:</p>
<p><img class="alignnone size-full wp-image-1223" title="VM Alarm for Snapshot Size" src="http://www.vcritical.com/wp-content/uploads/2009/06/vm_alarm_snapshot_size.png" alt="VM Alarm for Snapshot Size" width="406" height="219" /></p>
<p>Very nice addition.</p>


<p>Related posts:<ol><li><a href='http://www.vcritical.com/2009/10/responsible-thin-provisioning-in-vmware-vsphere/' rel='bookmark' title='Permanent Link: Responsible Thin Provisioning in VMware vSphere'>Responsible Thin Provisioning in VMware vSphere</a></li>
<li><a href='http://www.vcritical.com/2008/12/half-the-vm-reboots-on-patch-tuesday/' rel='bookmark' title='Permanent Link: Half the VM reboots on Patch Tuesday'>Half the VM reboots on Patch Tuesday</a></li>
<li><a href='http://www.vcritical.com/2010/02/taking-snapshots-of-vmware-esx-4-running-in-a-vm/' rel='bookmark' title='Permanent Link: Taking snapshots of VMware ESX 4 running in a VM'>Taking snapshots of VMware ESX 4 running in a VM</a></li>
<li><a href='http://www.vcritical.com/2009/04/hyper-v-snapshots-not-for-production/' rel='bookmark' title='Permanent Link: Hyper-V snapshots: not for production'>Hyper-V snapshots: not for production</a></li>
</ol></p><div style="font-family:Verdana; color:#000000; background-color: #C0C0C0; padding: 7px;border: dashed thin">

<a href="http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/#comments">Leave a Comment</a> •
<a href="http://feedproxy.google.com/vcritical">Subscribe to RSS</a> •
<a href="http://feedburner.google.com/fb/a/mailverify?uri=vcritical&loc=en_US">Subscribe via Email</a> •
<a href="http://www.twitter.com/eric_gray">Follow Eric Gray on Twitter</a><br/>

More articles on: <a href="http://www.vcritical.com/tag/esx/" rel="tag">ESX</a>, <a href="http://www.vcritical.com/tag/snapshots/" rel="tag">snapshots</a>, <a href="http://www.vcritical.com/tag/storage/" rel="tag">storage</a>, <a href="http://www.vcritical.com/tag/vcenter/" rel="tag">vCenter</a>, <a href="http://www.vcritical.com/tag/vsphere/" rel="tag">vSphere</a> • <a href="http://www.vcritical.com/category/virtualizationism/">Browse All Virtualization Content</a><br/>

<a href="http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/">VMware vSphere 4 has a Snapshot Alarm</a> by <a href="http://www.vcritical.com/about/">Eric Gray</a> © 2009 • <a href="http://www.vcritical.com/">VCritical</a>

</div>]]></content:encoded>
			<wfw:commentRss>http://www.vcritical.com/2009/06/vmware-vsphere-4-has-a-snapshot-alarm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
