Azure How To Check If Disk Is Managed Or Unmanaged

Understanding whether a disk is managed or unmanaged is essential for managing your Azure resources. This article will discuss the quick approaches to determine if the disk is managed or unmanaged in your Azure VM.

    How to tell if disk is managed or unmanaged Azure

    Let us dive deep into the two simple approaches to doing this.

    • Approach-1: Using Azure Portal
    • Approach-2: Using Azure CLI

    Approach-1: Using Azure Portal

    Follow the below steps

    1. Log in to Azure Portal.

    2. Search for Virtual Machines and click on the search result Virtual Machines.

    how to tell if disk is managed or unmanaged azure

    3. Click on the Azure Virtual Machines from the list.

    how to identify managed and unmanaged disk in azure

    4. Click on the Disks link from the left navigation and then click on the attached OS disk name, as shown in the screenshot below.

    how to identify managed disk in azure portal

    If you closely look at the URL

    For managed disks, the URL will look like below

    /resource/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/NEWRESGROUP/providers/Microsoft.Compute/disks/AzureLessonsVM_disk1_716204ec2c5a443c8628df74370ac9fd

    So, in my case, it is a managed disk, as shown in the screenshot below.

    azure check if disk is managed or unmanaged

    For unmanaged disks, the URL will look like below

    /storage_account_name.blob.core.windows.net/yourVM_name/yourVM_name.vhd

    Approach-2: Using Azure CLI

    You can use the below Azure CLI command to identify if the disk is managed or unmanaged.

    az vm show -g your resource group name -n your Virtual Machine name

    Example

    az vm show -g NEWRESGROUP -n AzureLessonsVM

    After executing the above command, I got the expected output as below.

    Azure how to check if disk is managed or unmanaged

    If you look closely at the OSDisk section, the “vhd” is null, which means that it is a managed disk.

    "osDisk": {
          "caching": "ReadWrite",
          "createOption": "FromImage",
          "deleteOption": null,
          "diffDiskSettings": null,
          "diskSizeGb": null,
          "encryptionSettings": null,
          "image": null,
          "managedDisk": {
            "diskEncryptionSet": null,
            "id": "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/NEWRESGROUP/providers/Microsoft.Compute/disks/AzureLessonsVM_disk1_716
    204ec2c5a443c8628df74370ac9fd",
            "resourceGroup": "NEWRESGROUP",
            "securityProfile": null,
            "storageAccountType": null
          },
          "name": "AzureLessonsVM_disk1_716204ec2c5a443c8628df74370ac9fd",
          "osType": "Windows",
          "vhd": null,
          "writeAcceleratorEnabled": false
        }
      },

    You may also like following the articles below

    Azure Virtual Machine

    DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

    Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!