First and foremost, you should ideally be looking to keep your servers in their support lifecycle with Microsoft, purchasing Windows Server 2012 Extended Security Updates (ESUs) should really be a last resort as newer operating systems have more modern security and functionality that you ought to be using.
If you do end up in a situation where you need to extend your security updates for 2012 servers past the end-of-life date (10th October 2023) then the below options are available to keep you.
Migrate your virtual machine to Azure
In this instance you don’t need to do anything to continue to receive updates, there is also no additional cost as long as your servers reside in Azure. Your end of life is extended by 3 years until October 2026.
Using Azure Arc
If your servers cannot yet be migrated to Azure then you can obtain ESUs by enrolling your servers in Azure Arc. Once your servers are enrolled you can purchase ESUs for your servers in the Azure portal and you will be billed monthly with no commitment. You must have Software Assurance through Volume Licenses such as Enterprise Agreement, EAS, EES or SCE.
The pricing for Azure Arc can be found here: https://azure.microsoft.com/en-us/pricing/details/azure-arc/#pricing
At the time of writing this post the pricing is as below in the UK South region.
So in this model you’ll pay Software Assurance licenses per server per year, plus ESU rights in Azure per server per month – this can be quite expensive so check with your license provider to really understand your total cost.
As you’re enrolling the servers in Azure Arc you can also make use of the management features available in Azure Arc, if you were looking in to Azure Arc management anyway, or your servers are already onboarded then this option makes sense.
MAK Keys
You can also choose to purchase and apply MAK keys and apply those to your servers to obtain ESUs. In this case you again need Software Assurance, and you have to purchase the keys via your Microsoft 365 portal. To purchase them you have to have an Enterprise Agreement.