How do I license SQL Server in a virtual machine? Under the core model you license each virtual machine by its virtual cores: one core license per assigned virtual core, with at least four core licenses per virtual machine. Since SQL Server 2022, licensing individual virtual machines is only possible with Software Assurance or a subscription license. Alternatively you license all physical cores of the host; with Enterprise plus Software Assurance you may then run any number of virtual machines on it.
Quick decision
| Your situation | Licensing route |
|---|---|
| One or two VMs with SQL Server Standard on a host | license the virtual cores per VM, at least 4 per VM |
| Many VMs with SQL Server on one host | all physical host cores with Enterprise + Software Assurance, then unlimited VMs |
| VM licensing wanted | only possible with Software Assurance or subscription |
| Few users, one VM | consider server license + CAL instead of core licenses |
Licensing per virtual machine
On the per-virtual-machine route, what counts are the virtual cores (also called virtual processors or threads) assigned to the VM.
- One core license per assigned virtual core.
- At least four core licenses per virtual machine, even if the VM has fewer virtual cores.
- If you later assign more virtual cores to the VM, you need correspondingly more licenses.
Important: since SQL Server 2022, licensing individual virtual machines (individual virtual operating system environments) is only open to customers with subscription licenses or active Software Assurance. For SQL Server Standard under the core model, VM licensing is even the only route in virtualized environments. What Software Assurance covers is explained in
What is Software Assurance.
Licensing across all host cores
Instead of individual VMs you license all physical cores of the host. Then, depending on edition and Software Assurance, different rights apply.
| Route | Requirement | Permitted virtual machines |
|---|---|---|
| All host cores with Enterprise + Software Assurance | Software Assurance | any number of VMs with SQL Server |
| All host cores without Software Assurance | — | one VM per core license (highest density, not unlimited) |
| Single VM under the core model | Software Assurance/subscription | only the licensed VM |
For a host running many SQL Server VMs, the route across all host cores with Enterprise and Software Assurance is usually the most economical solution. For one or two VMs, VM licensing is generally cheaper. Microsoft treats containers like virtual machines here: the minimum of four core licenses per container applies to them as well.
Don’t forget the minimums
Regardless of virtualization, minimums apply: when licensing physical cores, Microsoft requires at least four core licenses per physical processor. With VM licensing it is at least four core licenses per virtual machine. The basic rules of the core model and the distinction from the server plus CAL model are in
Licensing SQL Server: per core or server + CAL.
Don’t confuse it with the Windows Server license
The SQL Server license covers only SQL Server. The operating system of the virtual machine, that is Windows Server, you license separately. How to license Windows Server in virtual environments is explained in
Licensing Windows Server and virtualization correctly. What a virtual machine technically is can be found in What is Hyper-V.
At VivaKeys
Core licenses for Standard and Enterprise as well as the matching client access licenses are in the
SQL Server category. The quantities for your hardware are narrowed down by the SQL Server advisor. Further topics are gathered in the
SQL Server guides overview.
Frequently asked questions
How many core licenses do I need at minimum for a VM? At least four core licenses per virtual machine, even if the VM has fewer than four virtual cores.
Do I need Software Assurance to license SQL Server per VM? Yes. Since SQL Server 2022, licensing individual virtual machines is only possible with active Software Assurance or a subscription license.
How do I get an unlimited number of VMs on a host? By licensing all physical cores of the host with SQL Server Enterprise and active Software Assurance. Then you may run any number of SQL Server VMs on this host.
Do I have to license Windows Server for the VM as well? Yes. The SQL Server license covers only SQL Server. The operating system of the VM you license separately.
Do the rules also apply to containers? Yes. Microsoft treats containers like virtual machines, including the minimum of four core licenses per container.
Sources
Checked on 2026-11-30 against the publisher’s information:
- www.microsoft.com/licensing/docs/view/SQL-Server
- download.microsoft.com/download/9/3/d/93d32de6-f268-45ed-ba25-2f9a6756b6af/SQL_Server_2022_Licensing_guide.pdf
- www.microsoft.com/licensing/guidance/Core-based-licensing-models
- learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2022