Is there a way in Azure to find if a VM in azure created to with Managed/Unmanaged disks?
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.
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.
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.
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".
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
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With