Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find if a Virtual Machine is using managed/Unmanaged disks in Azure

Is there a way in Azure to find if a VM in azure created to with Managed/Unmanaged disks?

like image 786
Gudda Bhoota Avatar asked Apr 14 '17 19:04

Gudda Bhoota


People also ask

Where is the unmanaged disk in Azure portal?

Unmanaged disks: Find and delete unattached disksSign in to the Azure portal. Search for and select Disks (Classic). You are presented with a list of all your unmanaged disks. Any disk that has "-" in the Attached to column is an unattached disk.

What is managed and unmanaged disks in Azure?

Difference Between Managed Disks and Unmanaged DisksIn Unmanaged Disk storage, you must create a storage account in resources to hold the disks (VHD files) for your Virtual Machines. With Managed Disk Storage, you are no longer limited by the storage account limits. You can have one storage account per region.

How do I make an Azure VM with unmanaged disk?

Click on New >> Storage and then select the Storage account. You have to provide a fully qualified domain name for storage account that lives under core.windows.net. Then, we have to select the deployment model which I am selecting Resource Manager, the default one and recommended.


2 Answers

This information is available in another area of the Azure portal as well. Go to the 'Virtual machines' list in the portal, click the 'Columns' button, and add a column called "Uses Managed Disks".

like image 110
Scottge Avatar answered Oct 18 '22 22:10

Scottge


To add to Jason Ye's answer, you can also run a similar command in Azure CLI 2.0. The command is:

az vm show -g rg_name -n vm_name

And the output for non-managed disk is:

  ...
  "osDisk": {
      "caching": "ReadWrite",
      "createOption": "fromImage",
      "diskSizeGb": 32,
      "encryptionSettings": null,
      "image": null,
      "managedDisk": null,
      "name": "rhel-un",
      "osType": "Linux",
      "vhd": {
        "uri": "https://storageaccountname.blob.core.windows.net/vhds/....vhd"
      }

And for managed disk:

...
"osDisk": {
  "caching": "ReadWrite",
  "createOption": "fromImage",
  "diskSizeGb": 32,
  "encryptionSettings": null,
  "image": null,
  "managedDisk": {
    "id": "/subscriptions/sub_id/resourceGroups/rg_name/providers/Microsoft.Compute/disks/rhel_OsDisk_1...",
    "resourceGroup": "rg_name",
    "storageAccountType": "Standard_LRS"
  },
  "name": "rhel_OsDisk_1...",
  "osType": "Linux",
  "vhd": null
}
like image 42
DivineOps Avatar answered Oct 18 '22 21:10

DivineOps