Blog Post

SQL Server Blog
6 MIN READ

Managing SQL Server on Linux Azure VMs with the SQL IaaS Agent Extension

Attinder_Pal_Singh's avatar
Aug 18, 2026

A practical guide to what the extension is, why it matters, the benefits it unlocks, and how to switch your SQL Server license from pay-as-you-go to Azure Hybrid Benefit.

If you run SQL Server on a Linux virtual machine in Azure, the SQL Server IaaS Agent extension is the piece that connects your SQL Server instance to Azure’s management plane. Registering with the extension is what lets you manage licensing, stay compliant, and gain visibility into your SQL Server estate directly from the Azure portal, the Azure CLI, or Azure PowerShell. This post explains the concept in plain terms, walks through the benefits, and shows you how to change your license model from pay-as-you-go (PAYG) to Azure Hybrid Benefit (AHUB).

What is the SQL IaaS Agent extension?

The SQL Server IaaS Agent extension (its resource name is SqlIaasExtension) is an Azure virtual machine extension that runs on your SQL Server on Linux VM and integrates it with Azure. When you register your VM with the extension, Azure creates a dedicated SQL virtual machine resource in your subscription. This resource is separate from the underlying VM resource - and if you ever unregister, you remove only the SQL virtual machine resource; the actual VM keeps running untouched.

Think of the extension as a bridge. On one side sits your self-installed SQL Server running on Linux. On the other side is Azure’s control plane - the portal, CLI, and PowerShell tooling you already use to govern your cloud resources. The extension is what carries licensing and management signals across that bridge.

Figure 1 — The SQL IaaS Agent extension acts as a bridge between your SQL Server on Linux VM and the Azure management plane, creating a separate SQL virtual machine resource.

Good to know: There’s no additional cost for using the extension itself, and it works with SQL Server 2017 and later on Linux VMs. Registration is now available across all supported Ubuntu and Red Hat Enterprise Linux versions - earlier it was limited to the Ubuntu free edition - so the same experience applies regardless of which of these distributions you run.

Why would you need it?

SQL Server will run perfectly well on a Linux VM without the extension. So why register? Because registration is what turns your VM into a managed, discoverable, licensing-aware resource in Azure. Without it, Azure has limited visibility into your SQL Server’s licensing state, and you lose the ability to manage licensing options centrally.

The extension exists to solve three recurring needs:

Figure 2 — The extension centers on three needs: simplified licensing, compliance, and visibility across your SQL Server estate.

1. Simplified license management

The extension lets you manage SQL Server licensing directly through Azure and quickly identify which VMs have Azure Hybrid Benefit enabled - using the portal, PowerShell, or the CLI. 

2. Compliance made simple

Microsoft’s product terms require customers to indicate when they are using Azure Hybrid Benefit for SQL Server. The extension offers a simplified method to fulfill this notification requirement, removing the need to manage licensing registration forms for each individual resource.

3. Better visibility and telemetry

Because registration creates a SQL virtual machine resource in Azure, your SQL Server deployments become discoverable and trackable. That means clearer license-type visibility, subscription-level tracking, and improved operational insight into your SQL Server workloads.

The three license models

Once your VM is registered, you can choose from three license models for SQL Server on an Azure VM. Switching between them incurs no downtime, doesn’t restart the VM or SQL Server service, adds no extra cost, and takes effect immediately.

Figure 3 — The three license models available once a SQL Server on Azure VM is registered with the extension.
License modelWhat it means
PAYG (Pay-As-You-Go)The per-second cost of running the Azure VM includes the cost of the SQL Server license.
AHUB (Azure Hybrid Benefit)Allocate your own SQL Server licenses (with Software Assurance) to the VM for a discount — you still pay for the underlying compute, storage, and backups.
HA/DRFree license type used for an eligible high availability / disaster recovery replica in Azure [1].

[1] Eligible high availability / disaster recovery replicas are passive secondary SQL Server instances used for HA or DR. When configured as HA/DR replicas, customers pay only for the underlying Azure VM compute, storage, and networking, while the SQL Server license cost for the passive replica is waived. This applies to one free HA replica and one free DR replica in supported architectures, helping reduce business-continuity costs. Learn more: High Availability, Disaster Recovery, Business Continuity - SQL Server on Azure VMs | Microsoft Learn

Common use cases

  • Bring existing licenses to Azure: Self-install SQL Server on a Linux VM, register with the extension, and activate Azure Hybrid Benefit to apply licenses you already own.
  • Optimize cost on running VMs: Move an existing PAYG deployment to AHUB without redeploying - the switch is immediate and downtime-free.
  • Support HA/DR architectures: Apply the free HA/DR license model to eligible replicas in high availability and disaster recovery designs.
  • Improve governance: Make SQL Server workloads discoverable so teams can track license consumption and identify AHUB-enabled resources across subscriptions.

Registering your VM with the extension

Before you can change license models, your VM needs to be registered. At a high level, the flow is: register the resource provider, then register the VM, then choose your license type.

Figure 4 — The end-to-end path: register the provider, register the VM, pick a license type, and adjust it whenever you need.

Register the resource provider (Azure CLI)

# Register your subscription with the SQL virtual machine resource provider
az provider register --namespace Microsoft.SqlVirtualMachine

Or with Azure PowerShell:

Register-AzResourceProvider -ProviderNamespace Microsoft.SqlVirtualMachine

Prerequisites: an Azure subscription, a Linux VM running SQL Server 2017 or later (in the public or Azure Government cloud), and the latest Azure CLI or Azure PowerShell (5.0 minimum).

Register VM (Azure CLI)

# Register Enterprise or Standard self-installed VM
az sql vm create --name <vm_name> --resource-group <resource_group_name> --location <vm_location> --license-type <license_type>

Or with Azure PowerShell:

New-AzSqlVM -Name <vm_name> -ResourceGroupName <resource_group_name> -Location <vm_location> -LicenseType <license_type>

 

How to change the license model from PAYG to AHUB

One of the most common tasks is converting an existing SQL Server VM from pay-as-you-go to Azure Hybrid Benefit - for example, when you already own eligible licenses and want to reduce cost. You can do this without redeploying the VM. The change requires no VM restart, causes no downtime, and takes effect immediately.

Prerequisites

  • An Azure subscription.
  • A SQL Server on Azure VM already registered with the SQL IaaS Agent extension.
  • Eligible SQL Server licenses with active Software Assurance for Azure Hybrid Benefit.

Azure CLI

# Switch the license type to Azure Hybrid Benefit
az sql vm update -n <VM_NAME> -g <RESOURCE_GROUP> --license-type AHUB

Or Azure PowerShell

Update-AzSqlVM -ResourceGroupName <resource_group_name> -Name <VM_name> -LicenseType <license-type>

Or Azure portal

  1. Sign in to the Azure portal and open your SQL virtual machines resource.
  2. Under Settings, select Configure.
  3. Choose Azure Hybrid Benefit and confirm you have eligible licenses with Software Assurance.
  4. Select Apply — the change takes effect immediately with no downtime.

Verify the extension and license type

You can confirm the extension is installed and quickly list which VMs are using Azure Hybrid Benefit with Azure PowerShell:

# List SQL VMs that have Azure Hybrid Benefit (AHUB) enabled
Get-AzSqlVM | Where-Object {$_.SqlServerLicenseType -eq 'AHUB'}

Tip: To check the extension itself on a specific VM, look under Extensions on the Virtual machine resource in the portal (not the SQL virtual machines resource) - you should see SqlIaasExtension listed.

Wrapping up

The SQL IaaS Agent extension is the connective tissue between SQL Server running on your Linux VM and Azure’s management experience. Registering unlocks simplified license management, straightforward compliance for Azure Hybrid Benefit, and better visibility across your SQL Server estate - all at no additional cost. Whether you are deploying something new or optimizing an existing workload, registering with the extension and choosing the right license model (PAYG, AHUB, or HA/DR) is a simple, high-value step.

Official documentation & references

  1. SQL Server IaaS Agent extension for Linux — Microsoft Learn
  2. Change the license model for a SQL virtual machine in Azure — Microsoft Learn
  3. Register a Linux SQL Server VM with the SQL Server IaaS Agent extension — Microsoft Learn
Updated Aug 19, 2026
Version 3.0
No CommentsBe the first to comment