Even before the availability of vSphere 5’s new Storage DRS feature, there were a number of scenarios where virtual machines (VMs) would move around from different datastores using technologies such as Storage VMotion. It is often complicated to figure out where VMs reside if datastores have been moved around since their initial deployment. Further, it becomes more complicated when a number of datastores of different performance tiers are in place in the same environment and one or more VMs may have mapping across multiple datastores.
In my own practice, I find myself occasionally mapping VMs to multiple datastores. This is for situations where a single VM’s application disk needs a higher performance tier of storage, or it may simply be due to existing datastores being full. With vSphere VMs, the datastore footprint can also be made more complicated by any CD-ROM .ISO mappings that VMs may have.
I’ve used a little trick in the vSphere Client to display datastores and their inventoried VMs. This is helpful when migrating off an old storage array that is going out of service and you need to double-check which VMs are inventoried on which datastore; it will help you find VMs that end up on the wrong datastore. This could be development vs. production, or tier 1 vs. tier 2, etc. Figure A shows how to change the view to datastores and see what VMs are inventoried on a datastore:
Click to enlarge.
A VM will show up in this view if there is a VMDK file on the datastore for the VM, the CD-ROM .ISO mapping is on this datastore, or if the VM configuration file is stored on this datastore. Any or all of these conditions can make it inventoried here. This view works for both VMFS and NFS storage resources.
It is important to note that this is not a filesystem browser. You can browse the file system to see what is on the disk resource, as VMs and files that are not inventoried will not display in the vSphere Client as shown in the figure above.
How have you used the datastore inventory to help you move VMs around different datastores? Share your comments below.