The SQL virtual machine resource is not in a valid state for management

A-T 26 Reputation points
2022-09-27T17:01:04.81+00:00

Through portal.azure.com I am attempting to create a 'SQL Server 2019 Standard on Windows Server 2019' virtual machine. The deployment is in a new subscription so it creates a new RG, networking, IP etc.. for the VM. The deployment succeeds on each step until it reaches the SQL VM and then it fails with an error stating "System Drive returned status not ready for use". At this point I can open the Server 2019 VM and connect to MySql via SSMS. However when looking at the SQL Virtual Machine in the azure portal I see:

245178-image.png

Most of the left side-bar is disabled, including the repair function:

245196-image.png

I'm not a DBA but this looks like something isn't right. Rebooting the Server 2019 VM doesn't resolve the issue. Can anyone advise on how to bring this SQL virtual machine to a healthy state?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Bjoern Peters 8,921 Reputation points
    2022-09-27T17:35:10.16+00:00

    It is the Azure SQL Server IaaS Extension wether not (correctly) installed or some permissions are missing. please check the documentation.

    https://learn.microsoft.com/de-de/azure/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. A-T 26 Reputation points
    2022-09-27T22:18:08.53+00:00

    The solution was to run the following command in the linked page:

    Register Enterprise or Standard self-installed VM in full mode

    az sql vm create --name <vm_name> --resource-group <resource_group_name> --location <vm_location> --license-type <license_type> --sql-mgmt-type Full

    This took a few minutes to run and afterwards my existing SQL Virtual Machine cleared it's errors and reported the Status as online and the Edition as standard as expected.

    Thanks.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.