The concept of Datastores in virtualization is really a VMware “thing” and not so much a Hyper-V thing. The reason is that the two products do things slightly different and terminology is also different. For those of you who are coming from a VMware environment into a Hyper-V environment, you are probably wondering how to access the datastore or what the equivalent is on the Hyper-V side. In Part 4 of the Server Virtualization Series, Tommy Patterson explains this concept / difference.
As usual, I am including a brief snippet of Tommy’s original article below. However, you will definitely want to go directly to Tommy’s blog post to read the full article.
Virtualization Experts Series – Part 4 arrives today. I originally wrote this article in answer to many requests during my Pro Camp events, but felt it needed added to our series this month.
During my Pro Camp events I often get asked about Hyper-V “Datastores,” in that VMware administrators want to know how to access them, search through the contents, and move files around. Since Hyper-V doesn’t really use the term “Datastores” I will often take a tangent at this point in the conversation to discuss the differences, as well as point out some of the similarities.
So for sake of this article I will use the term “Datastores” rather loosely. Datastores hold not only the virtual disk files that a VM utilizes as virtual hard drives, but also the configuration file for the virtual machine itself(in VMware: the VMX file). Sometimes the configuration files are held on different datastores than the virtual hard drives(in VMware: the VMDK files). So there are definitely occasions where the disk files and config file may not reside together which can make for a somewhat difficult time understanding the full make up of the virtual machine you might be investigating at the time. Various third party utilities have emerged in the market to help with this process for VMware admins, like vKernel, Veeam, vFoglight, and Solarwinds for example. However for those without these third party tools, the manual process of browsing must be followed.
In VMware you normally browse datastores via the VI Client connected to an ESX host or Virtual Center. In Virtual Center you can get to this screen in multiple ways, by click on the ESX host then clicking on the Browse Datastores links found on the summary page or in the Storage tabs. There is a utility built into Virtual Center that allows for uploading disk files into the datastores, or downloading/moving files between datastores and the hosts. What is important to remember here, when you move a VMDK file somewhere else you must also remember that the corresponding config file must be updated either through a text editor or the VI Client menus so that the VM will know where the disk files are now located.
In Hyper-V, the config files and virtual disk files also reside in separate containers(by default) however these are labeled. Take for instance the screenshot below. Since Hyper-V does not require a different formatting of the underlying physical disk structure like VMFS(VMware’s proprietary disk format) we are able to browse the “datastore” with File Explorer(In Windows 8/Server2012…formerly known as Windows Explorer).
You can see the Virtual Hard Disks folder is separate from the Virtual Machines folder. Also the Snapshots and Planned Virtual Machines folders are found on the physical drive as well. Notice also that I manually created a VM and placed it in it’s own folder outside of this default structure. We will not focus on that too much today, the point of this article is to look at the folder and file structures to better understand them.
Looking inside the Virtual Hard Disks folder we will see the disk files, in this case I have only one disk file, but I also see another file. The HRL file extension is something the system creates to track Replication. So when I turned on replication this file got created in the same folder as my virtual machine’s disk file.