Hi @Anonymous
If your VM is using managed disks, then you don't have details of the storage account, just the resource id of the managed disk instance. If your VM is not using managed disks, then you can find this a number of ways.
Using the JSON View
- Select your virtual machine
- Click on the Overview page
- Select JSON View in the upper right corner
- Navigate through the JSON content to properties > storageProfile > osDisk > vhd > uri
- The URI will be "https://yourStorageAccountName.blob.core.windows.net/vhds/yourVMName.vhd
Using the UI
- Select your virtual machine
- Select the Disks page
- Select the OS Disk
- The URI is in the VHD URI box ("https://yourStorageAccountName.blob.core.windows.net/vhds/yourVMName.vhd)
Using Azure Resource Graph Explorer
- Open Azure Resource Graph Explorer
- Run the following query.
resources
| where type =~ "microsoft.compute/virtualmachines"
| extend ManagedDisk = iif(isnotempty(parse_json(properties.storageProfile.osDisk.managedDisk)),true, false)
| extend CreateOption = tostring(parse_json(properties.storageProfile.osDisk.createOption))
| extend OSDiskLocation = case(
ManagedDisk == true, tostring(parse_json(properties.storageProfile.osDisk.managedDisk.id)),
isnotempty(parse_json(properties.storageProfile.osDisk.vhd)), tostring(parse_json(properties.storageProfile.osDisk.vhd.uri)),
"Other (Review Properties)"
)
| project id, name, ManagedDisk, OSDiskLocation
| extend StorageAccountName = iif(OSDiskLocation startswith "Https://", substring(OSDiskLocation,8,indexof(OSDiskLocation,'.',1)- 8), "")
I hope this helps provide you with the information you need. If it does, please make sure to mark the question as answered so it helps other people in future.
Kind regards
Alistair