The story of a difficult experience with Hyper-V
If you follow my Twitter feed you knew this article was coming…
After spending about 3 hours on the phone with a customer trying to help them get their CSV (Cluster Shared Volume) for Hyper-V back online (I was on the phone not because I’m a Hyper-V guy but because I implemented the storage they use for Hyper-V) I decided that maybe I should do a deep dive and learn a little more about how CSV’s work so that I can better compare them to VMFS. VMFS is the clustered file system that VMware uses to share SAN LUNs between physical VMware servers. This article also goes on to explain why Hyper-V is an inferior solution due to some of the other issues that I’ve seen in my limited experience with Hyper-V.
Anyhow, before we get to the technical stuff I need to point out that I am obviously biased to VMware… it’s what I do every day. I will try to be as fair as possible, but lets face it if you are just looking for the take away without reading the whole post it is that VMFS is far superior to CSV’s, and that while VMware might look more expensive on a bill of materials it will probably save you time and money in the long run.
The Technical Stuff
Cluster Shared Volumes have been around a long time, Microsoft has been using them for everything from Exchange clusters to SQL clusters. They adapted CSV’s to work with HyperV so that they could allow virtual machines to more easily move from one HyperV host to another, similar to what VMFS allows VMware ESXi servers to do. Both enable high availability for virtual machines because if a host fails, other hosts can access the virtual machines the failed host was running. Additionally CSV’s are needed because under them is NTFS… which was never designed to be accessed by multiple systems at the same time, because of this something had to be put in place to allow that to happen.
Ok so the first article I come across on Technet has this to say:“…the Cluster Shared Volumes feature included in failover clustering is only supported for use with the Hyper-V server role. The creation, reproduction, and storage of files on Cluster Shared Volumes that were not created for the Hyper-V role, including any user or application data stored under the ClusterStorage folder of the system drive on every node, are not supported and may result in unpredictable behavior, including data corruption or data loss on these shared volumes. Only files that are created for the Hyper-V role can be stored on Cluster Shared Volumes. An example of a file type that is created for the Hyper-V role is a Virtual Hard Disk (VHD) file. Before installing any software utility that might access files stored on Cluster Shared Volumes (for example, an antivirus or backup solution), review the documentation or check with the vendor to verify that the application or utility is compatible with Cluster Shared Volumes.” Taken from: http://technet.microsoft.com/en-us/library/dd630633%28v=ws.10%29.aspx
So to me, that means that CSV’s are flaky, to say the least… but let’s continue.
VMFS, on the other hand, can store pretty much anything you can upload to it… zip files, iso files, etc etc… VMFS is almost like LVM in linux, it doesn’t care what you put on it.
My Next Point
All HyperV nodes that are using a CSV are at the mercy of the coordinator node for that CSV. Think of it this way, you need to look for something that is in a filing cabinet, but before you can actually get the folder you need you must first talk to the secretary and ask her if its ok to look at the folder. In more technical terms this means that the coordinator node keeps track of all the metadata and file locking on folders on the CSV, after the coordinator node allows you access to the folder then IO to things in that folder happen directly to the LUN. But don’t take my word for it… Microsoft explains it in this article http://support.microsoft.com/kb/2008795
What scares me about this method is that if something gets hosed with the Coordinator node and the Failover Manager doesn’t fail over properly your CSV is inaccessible. And going by the reliability track record of Microsoft Services I would not bet my job on Failover Manager 🙂
VMFS, on the other hand, is a clustered file system that has no owner… there is not anyone node that controls access to the file system. File locking is done at a file level by a ‘pulse field’, and in this field, a host must periodically update its time stamp and let the file system know that it is still using the file. If a host crashes and another host wants to use the file the host can let the file system know that the timestamp hasn’t been updated lately and that it is taking over ownership…. this means that each host can access files in the event of a node failure without waiting on a response from a centralized management node. If you want the in-depth answer check out this article http://blogs.vmware.com/vsphere/2012/05/vmfs-locking-uncovered.html
Next, let’s talk about how to get HyperV to actually work …. and I’m not talking about just getting a VM to boot up. I’m talking about setting up HA and DRS and automatic load balancing etc. With VMware you group all of your physical servers into a Cluster and then check two boxes… one to turn on HA and one to turn on load balancing. Of course, you need to set up network interfaces for vMotion… but other than that your done. Oh, and by the way, this was all done from the VMware vSphere client.
On to HyperV… lets see where do we start…. no really… which interface do you want to start with. If I want to configure virtual machines I’ll need to use HyperV Manager… or maybe Systems Center Virtual Machine Manager (SCVMM). If I want to set up CSV’s to allow for HA to take place I’ll need to fire up MS Failover Manager. On and if I want to actually format a LUN, well then I’ll need to get into Disk Management.
I’m sure you get my point….
We could talk about virtual switches and distributed virtual switches (or the lack there of), or things like NIC teaming and how it is implemented, but I don’t want to write a book.
The take away
OK so normally the number one reason I hear that people are using HyperV is because it comes with Windows … Its free. But is it really free? I could argue that it takes less time to implement VMware than it does HyperV… and isn’t it known that “Time is Money”… it certainly is if you are paying someone to set it up.
I could also argue that 3+ hours of downtime trying to resolve a CSV issue where VM’s are not accessible is definitely a loss of productivity and in turn a loss of money.
Lastly SCVMM is not free and while it is not required, if you want to compare apples to apples you will want it…
So in the end VMware may be an additional line item on a bill of materials, but in the end it may be the best damn investment you will make for your virtual environment.
If you are not convinced yet here are some other fun stories about the HyperV
- http://www.ms4u.info/2011/05/why-you-should-not-running-domain.html <- Failover manager required AD, if you virtualize all your Domain Controllers Failover Manger wont start.
- http://blogs.technet.com/b/chrad/archive/2010/07/15/cluster-shared-volumes-csv-extending-a-volume.aspx <- Expanding a datastore in vmware is as simple as right clickign the lun to extend, selecting expand, clicking next like 3 times…. check out this link for the process for a CSV 🙂
- do a google search for HyperV live migration using multiple NICs…. you wont find much, so if you buy that server with 128 or 256 GB of ram and need to take it out of production for maintenance… better have 10Gbps networks in place or grab dinner and a movie… (1Gbps network can theoretically move 125MB/sec or 7.5GB/minute so to move 256GB that would be about 34 minutes… so if you want to do a rolling outage multiply the number of hosts you have by 34 minutes to move all that ram…. just one more way VMware costs you less)
- Look up how to do nic teaming in HyperV… Then look up how to do it in VMware
The bottom line
If you want a solution that is straight forward and easy to use then HyperV is probably not the way to go. While it may not be a big line item on a bill of materials, what it saves you there it is certainly to cost you in time and effort (not to mention frustration).