so, it depends on which licensing model you are on.
for instance, if you are on some subscription licenses it is like what you can find here: https://www.microsoft.com/licensing/docs/view/Windows-Server
Which states:
Server licensing and feature overview
Windows Server 2022 Datacenter and Windows Server 2022 Standard are licensed under a core-based license
model. For both Datacenter and Standard , the number of core licenses required depends on whether a
customer is licensing based on the physical cores on the server or by virtual machine. The option to license
Windows Server by virtual machine was added in October 2022, and is available to customers with subscription
licenses or licenses with active Software Assurance only.
• When licensing based on the physical cores on the server, the number of core licenses required equals
the number of physical cores on the licensed server, subject to a minimum of 8 core licenses per
physical processor and a minimum of 16 core licenses per server.
• When licensing by virtual machine, the number of core licenses required equals the number of virtual
cores in the virtual operating system environment (i.e., virtual machine), subject to a minimum of 8
core licenses per virtual machine and 16 core licenses per customer.
Core licenses are sold in 2-packs and 16-packs. For complete details and information on licensing, refer to the
Product Terms. To learn more about core licensing see the Introduction to Microsoft Core Licensing licensing
brief.
it all depends on how many cores you hand out to your virtual servers, and if you have subscription licenses with Software Assurance.
If you have licenses with SA, it depends on how many cores you hand out to your virtual servers.
you need to use minimum 8 core lisenses pr VM and a minimum of 16 core licenses total.
you said that you need to license 4 MVs, that means minimum 8cores*4VMs is 32core licenses.
But if your VMs have more than 8 cores, you need to license all the cores.
if your VMs are: vm1(4cores), vm2(10cores),vm3(12cores),vm4(2cores) you would have to license them like this:
vm1(8cores), vm2(10cores, vm3(12cores), vm4(8cores)= 38cores
at some point it might make sense to change to datacenter licensing, but that calculation gets complex when you can license the virtual machines by virtual CPU.
If you are on SPLA Licenses: (https://www.microsoft.com/licensing/spur/productoffering/WindowsServer/all#UseRights) Server Licenses (per core)
- Customer may use the server software on a Licensed Server, provided it acquires sufficient Server licenses as described below.
- The number of Licenses required equals the number of Physical Cores on the Licensed Server, subject to a minimum of 8 Licenses per Physical Processor.
- Standard edition
- Standard edition permits use of the server software in one OSE on the Licensed Server.
- Standard edition permits use of one Running Instance of the server software in the Physical OSE on the Licensed Server (in addition to one Virtual OSE), if the Physical OSE is used solely to host and Manage the Virtual OSE.
- Customer may assign additional Standard edition Licenses to the Licensed Server equal to the number specified in 2 above and run the server software in one additional OSE on the Licensed Server.
- Datacenter edition permits use of the server software in any number of OSEs on the Licensed Server.
Server Licenses (per processor)
- Customer may use the server software on a Licensed Server as described in the Product-Specific License Terms, provided it acquires sufficient Licenses as described below.
- One License is required for each Physical Processor on a Licensed Server.
- Each License permits use of one Running Instance of the server software in one OSE.
which means you have to license according to the physical cores or processors.
Then it means you would need to license each VM for all the potential cores it might run on.
If the ESXi's are set up with HA and vMotion, that means all the cores in each hypervisor.
If your servers have 80 physical cores pr server, that means you need to license each VM for 160cores.
so that makes it 640cores for standard licenses for 4 VMs.
At some point it makes more sense to buy 160core datacenter licenses. From what I remember the price cutover used to be at about 7 VMs
So first you need to figure out which license plan you're on, and then read the documentation for that plan
hope this is helpfull :D
-Ole