Hello,
For the VMs it will work if you have a Software Assurance or Windows Server Subscriptions,moreover You can use the benefit with Windows Server Datacenter and Standard edition licenses.
For SQL Server allows you to use on-premises licenses to run SQL Server on Azure Virtual Machines. If you have Software Assurance, you can use AHB when deploying a new SQL VM or activate SQL Server AHB for an existing SQL VM with a pay as you go (PAYG) license.
Bring your own license (BYOL) SQL Images on Azure Marketplace should be used to implement SQL Server AHB when deploying a new SQL VM. However, if you already have a SQL VM with a PAYG license, activating AHB currently requires re-deploying the VM with BYOL
SQL image
Suggested Options:
- SQL Database Managed Instance and migrate your SQL Server databases without changing your apps.
- SQL Database Single Database or Elastic Pool and build data-driven applications and websites in the programming language of your choice
As per Microsoft Azure Hybrid Benefit gives customers an entitlement on Azure but
does not ask them to "physically move" a license key to Azure.
Ref:
https://azure.microsoft.com/en-us/blog/azure-hybrid-benefit-for-sql-server-on-azure-virtual-machines/