Upgrade azure VM to Azure VM with SQL STD

Alberto Galvani - personal 1 Reputation point

I have a question for you!
I have had an Azure VM without SQL for several months. Now, without having to redo the VM from scratch, I would have to upgrade the VM to an Azure VM with SQL Standard. Is there any way?
Thanks in advance

SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andriy Bilous 10,731 Reputation points MVP

    Hello @Alberto Galvani - personal

    If you have already deployed an Azure virtual machine and installed SQL Server instance to it you need additionaly add SQL IaaS Extension.

    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.

    • 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

    Here is a link how to register your subscription with the resource provider using Portal

    • Register in full mode. 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.
      Azure CLI: az sql vm create --name <vm_name> --resource-group <resource_group_name> --location <vm_location> --license-type <license_type> --sql-mgmt-type Full
      az sql vm update --name <vm_name> --resource-group <resource_group_name> --sql-mgmt-type full

    Here is a link how to register VM with SQL using Azure Portal:

    • Check management mode. Use Azure PowerShell to check what management mode your SQL Server IaaS agent extension is in. $sqlvm = Get-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName


    1 person found this answer helpful.
    0 comments No comments

  2. Alberto Galvani - personal 1 Reputation point

    Hi Andriy,
    thank you so much for your answer!

    0 comments No comments