An Azure service that is used to provision Windows and Linux virtual machines.
To verify and correctly apply SQL Server licensing (Azure Hybrid Benefit vs PAYG) on the new VM, use these steps and checks.
- Confirm how SQL Server was installed
- Original VM: Likely an Azure Marketplace SQL Server on Azure VM image with Azure Hybrid Benefit (AHB) enabled.
- New VM: SQL Server was installed manually from ISO on a plain Windows Server 2022 VM. In this case, Azure doesn’t automatically know about the SQL Server license; it must be registered and AHB explicitly enabled.
- Register the new VM with the SQL IaaS Agent extension For self-installed SQL Server on an Azure VM, registration with the SQL IaaS Agent extension is required so Azure can manage and bill SQL correctly and allow AHB:
- Follow: Register with the SQL IaaS Agent Extension for a self-installed SQL Server VM.
- Once registered, the VM appears as a SQL virtual machines resource in the Azure portal.
- Check and set the license model (AHB vs PAYG) After the VM is registered as a SQL VM, verify and configure the license model:
Via Azure portal
- Open the Azure portal and go to the SQL virtual machines resource for the new VM.
- Under Settings, select Configure.
- Check the License type / Azure Hybrid Benefit setting:
- If AHB is already enabled, it will show that Azure Hybrid Benefit is selected.
- If not, select Azure Hybrid Benefit and confirm that there is a qualifying SQL Server license with Software Assurance.
- Select Apply.
Changing this setting:
- Incurs no downtime.
- Does not restart the VM or SQL Server service.
- Takes effect immediately and reduces cost when AHB is activated.
Via Azure CLI (alternative) If the SQL VM resource exists, the license type can be set with:
az sql vm update -n <VMName> -g <ResourceGroupName> --license-type AHUB
Where AHUB = Azure Hybrid Benefit, PAYG = pay-as-you-go, DR = free HA/DR replica.
Via PowerShell (alternative)
Update-AzSqlVM -ResourceGroupName <resource_group_name> -Name <VM_name> -LicenseType AHUB
- Understand what AHB covers on the new VM With AHB enabled for SQL Server on the VM:
- Existing SQL Server licenses (with Software Assurance) are applied to the SQL instance.
- Azure still charges for:
- Underlying compute (base VM rate),
- Storage and backups,
- I/O as applicable.
- Confirm that licensing is correctly handled To validate that licensing is correctly applied on the new VM:
- Ensure the VM is registered as a SQL virtual machine (via SQL IaaS Agent extension).
- Verify the license model is set to
AHUB(orPAYGif using pay-as-you-go) in the SQL VM resource’s Configure blade or via CLI/PowerShell. - If the subscription uses centrally managed Azure Hybrid Benefit, license changes at the individual VM level may be blocked and a message like “Your organization manages licenses assigned to Azure at a scope level…” will appear. In that case, the billing admin must manage AHB at the subscription scope under Cost Management + Billing.
These steps ensure that the manually installed SQL Server on the new Windows Server 2022 VM is correctly registered and that Azure Hybrid Benefit (or PAYG) is explicitly and verifiably applied for billing.
References: