The problem having different vms with the same sql server Licence key
That's not a &quot;License Key&quot; it's an &quot;Activation Key&quot;, which simply controls the Edition of SQL Server that is running.  Its only relationship to licensing is that it may help you determine what licenses need to be assigned to the server.
Licenses are assigned to servers using external bookkeeping, like in a Software Asset Management Solution or an Excel Spreadsheet.
For instance, SQL Server on Docker Containers and the Visual Studio Subscription Downloads all come with the key already embedded in the installer.  Both of these can be used for production deployments by simply assigning the appropriate licenses to the servers without changing the key.