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
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm?tabs=bash%2Cazure-cli#register-subscription-with-rp
- 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:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm?tabs=bash%2Cazure-cli#azure-portal-1
- 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
$sqlvm.SqlManagementType
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-iaas-agent-extension-automate-management?tabs=azure-powershell#named-instance-support
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/frequently-asked-questions-faq