ערוך

שתף באמצעות


Register Linux SQL Server VM with SQL IaaS Agent extension

Applies to: SQL Server on Azure VM

Register your SQL Server VM with the SQL IaaS Agent extension to unlock a wealth of feature benefits for your SQL Server on Linux Azure VM.

Overview

Registering with the SQL Server IaaS Agent extension creates the SQL virtual machine resource within your subscription, which is a separate resource from the virtual machine resource. Unregistering your SQL Server VM from the extension removes the SQL virtual machine resource but will not drop the actual virtual machine.

To utilize the SQL IaaS Agent extension, you must first register your subscription with the Microsoft.SqlVirtualMachine provider, which gives the SQL IaaS Agent extension the ability to create resources within that specific subscription.

Important

The SQL IaaS Agent extension collects data for the express purpose of giving customers optional benefits when using SQL Server within Azure Virtual Machines. Microsoft will not use this data for licensing audits without the customer's advance consent. See the SQL Server privacy supplement for more information.

Prerequisites

To register your SQL Server VM with the extension, you'll need:

Register subscription with RP

To register your SQL Server VM with the SQL IaaS Agent extension, you must first register your subscription with the Microsoft.SqlVirtualMachine resource provider (RP). This gives the SQL IaaS Agent extension the ability to create resources within your subscription. You can do so by using the Azure portal, the Azure CLI, or Azure PowerShell.

Azure portal

Register your subscription with the resource provider by using the Azure portal:

  1. Open the Azure portal and go to All Services.
  2. Go to Subscriptions and select the subscription of interest.
  3. On the Subscriptions page, select Resource providers under Settings.
  4. Enter sql in the filter to bring up the SQL-related resource providers.
  5. Select Register, Re-register, or Unregister for the Microsoft.SqlVirtualMachine provider, depending on your desired action.

Modify the provider

Command line

Register your Azure subscription with the Microsoft.SqlVirtualMachine provider using either Azure CLI or Azure PowerShell.

Register your subscription with the resource provider by using the Azure CLI:

# Register the SQL IaaS Agent extension to your subscription 
az provider register --namespace Microsoft.SqlVirtualMachine 

Register VM

The SQL IaaS Agent extension on Linux is only available in lightweight mode, which supports only changing the license type and edition of SQL Server. Use the Azure CLI or Azure PowerShell to register your SQL Server VM with the extension in lightweight mode for limited functionality.

Provide the SQL Server license type as either pay-as-you-go (PAYG) to pay per usage, Azure Hybrid Benefit (AHUB) to use your own license, or disaster recovery (DR) to activate the free DR replica license.

Register a SQL Server VM in lightweight mode with the Azure CLI:

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

Verify registration status

You can verify if your SQL Server VM has already been registered with the SQL IaaS Agent extension by using the Azure portal, the Azure CLI, or Azure PowerShell.

Azure portal

Verify the registration status by using the Azure portal:

  1. Sign in to the Azure portal.
  2. Go to your SQL virtual machines resource.
  3. Select your SQL Server VM from the list. If your SQL Server VM is not listed here, it likely hasn't been registered with the SQL IaaS Agent extension.

Command line

Verify current SQL Server VM registration status using either Azure CLI or Azure PowerShell. ProvisioningState shows as Succeeded if registration was successful.

Verify the registration status by using the Azure CLI:

az sql vm show -n <vm_name> -g <resource_group>

An error indicates that the SQL Server VM has not been registered with the extension.

Automatic registration

Automatic registration is supported for Ubuntu Linux VMs.

Next steps

For more information, see the following articles: