Licensing remains a difficult problem in today's virtual infrastructure. Some things are easy to understand and...
some are not. After visiting a session on Microsoft licensing one day, I heard a number of new things that I wanted to share with you. I will give you a few definitions used in Microsoft licensing and a number of examples.
My most important sources can be found here: Microsoft Volume Licensing, I'm giving you a summary of the most important parts*.
Let me first start with the definition of an Instance, which is a set of installed files that make up the OS and the application. A VHD file that includes an installed version of Windows 2008 Server with Exchange 2007, has one Windows 2008 Server instance and one Exchange 2007 instance.
The easy part, the number of licenses needed for virtual Windows Servers
Let's look at some basics on physical and virtual licenses. A Windows 2008 Standard Server license allows you to run one physical and one virtual instance of Windows 2008 Standard Server. A Windows 2008 Enterprise Server license allows you to run one physical instance of Windows 2008 Enterprise Server and four free virtual instances of Windows 2008 Enterprise Server. These virtual licenses, however ,cannot be split. With Windows 2008 Datacenter edition, you are allowed to run as many virtual instances as you can on the CPU that has been licensed with Datacenter edition.
With all three license models, it is not important which hypervisor you want to use. The physical license is assigned to the hardware, whether it is VMware ESX or Hyper-V or XenServer you have running on it.
We have three hosts, each with two physical quad core CPUs. We have 14 virtual machines that we would like to run on these three hosts. Host1 and host2 will each be running four VMs, host3 will be running six VMs. Possible scenarios in which I don't care about prices, it is just to show you how to correctly license this environment.
1) With Windows 2008 Standard licensing, you would need three Windows 2008 Standard licenses to assign to the physical host and they would give you the right to also run one virtual instance for free on each host, which leaves you buying another 11 Windows 2008 Standard licenses. From these extra licenses you can only use the virtual license, since you're not allowed to run the physical license on one and the virtual license on another host.
2) Using Windows 2008 Enterprise licenses, you would buy one Enterprise license for host1 and one for host2. These two enterprise licenses will cover both physical hosts and the four virtual instances running on each host. For host3 you need two Enterprise licenses which will cover eight virtual instances, although you will only have six virtual instances running on that host. Those two unused free instances cannot be reclaimed on another host. In fact, if host1 was running four VMs and host2 and host3 where each running five VMs, you would need a total of five Enterprise licenses, which would leave host2 and host3 each with three unused free licenses.
3) When buying Datacenter edition licenses, you only have to think of the physical CPUs per host. In this case that would be six CPUs that have to be licensed. The number of cores is not important.
Licensing Live Migration and VMotion
This first example wasn't too difficult, was it? Now for a more interesting part, how to handle Live Migration or VMotion. Actually, that isn't too difficult either; it just requires some planning. The easiest way to grasp the concept is to see the virtual instance licenses as slots that allow you to run VMs on that piece of hardware. You must always make sure that all VMs on that host are covered by physical licenses. The most important piece is that you cannot transfer those physical licenses to another host in the same way you do a Live Migration.
In general, as a Microsoft Volume Licensing customer, you may reassign software licenses for products in the Microsoft Servers licensing models, but not on a short-term basis. "Short-term basis" means more frequently than within 90 days of the last assignment (or reassignment). You may, however, reassign software licenses sooner if you retire the server sooner due to permanent hardware failure.
For applications like Microsoft SQL, Exchange and BizzTalk, the "short-term" restriction has been removed and you are allowed to move the application instance multiple times, just as long as you stay within the same server farm. A server farm consists of up to two data centers each physically located in the following areas: In a time zone that is within four hours of the local time zone of the other (Coordinated Universal Time [UTC] and not DST), and/or within the European Union (EU) and/or European Free Trade Association (EFTA).
Back to Live Migration and VMotion. Let's take the same example again with three dual quad-core CPU hosts and 14 VMs. To plan for the number of licenses needed, you need to know how many VMs will be running at a host at the most. If we assume that at the most, two hosts will have to run all VMs because the third host (for example) is not available, each host will have to be licensed to run seven VMs.
1) Buy 21 Windows 2008 Standard licenses and assign each host one physical license and assign seven licenses per host for the VMs.
2) Buy six Windows 2008 Enterprise licenses, assign each host one physical license which allows you to run four VMs per host. Then add another Enterprise license to each host to be able to run another four (actually you would only need three) VMs.
3) Buy six Windows 2008 Datacenter licenses to license each CPU.
In the above scenarios you should keep in mind that if you go even further and want to be able to move all 14 VMs to one host, you will need:
1) 3 x 14 = 42 Windows 2008 Standard licenses,
2) 3 x 4 = 12 Windows 2008 Enterprise licenses or:
3) 6 Windows 2008 Datacenter licenses.
I bet you see a pattern developing there, the more Windows VMs a host can run, the sooner you'll want to buy a Datacenter license.
VMware Fault Tolerance
There is a special case for VMs that are protected with VMware Fault Tolerance (FT). With FT a VM is running in the memory of one host and an identical copy will be running in the memory of a second host. In the VMware community there was some discussion as to how many licenses would be needed to run a FT-protected VM. In my opinion, reading the docs very thoroughly, you will need two Windows server licenses, one for each VM.
Why? Well, first the "Licensing Microsoft Server Products in Virtual Environments" documents specifies: "All products in the Microsoft Servers licensing models are licensed by running instance. Each license gives you the right to run a certain number of instances of the software on a specific server at a time."
Secondly, the argument I often hear that the duplicate VM is not available for other tasks doesn't hold up because Microsoft doesn't care what you use this running instance for. Whether you make it completely isolated or not, it is a running instance using memory, so you will need a license for the duplicate just as you do for the primary.
To properly license all Windows OSes in your virtual infrastructure, determine how many hosts will be unavailable at a given time. Spread all your VMs over the remaining hosts. Count the number of VMs per host, and that is the number of Windows licenses you will need per host. Then think about if Enterprise or Datacenter edition is most suited for you. Now, that wasn't too hard, was it?
*Disclaimer: Remember that I'm not using any legal talk to explain things, so when the Business Software Alliance is on your doorstep, you can't say, "I did it because Gabe told me to."
More on Windows licensing for virtual machines
- Smarter Microsoft licensing can reduce VMware environment costs
|Gabrie van Zanten (VCP) has been in the IT industry for 12 years. Currently he is a virtualization architect for a worldwide consultancy company and has designed and maintained virtual infrastructures for a number of customers. He has written articles for magazines and frequently publishes in-depth articles at his weblog, GabesVirtualWorld.|