Search code examples
azureazure-storageazure-blob-storage

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?


Solution

  • We can use PowerShell to list the information of Azure VM.

    Here is the Unmanaged disks VM output:

    PS C:\Users> (get-azurermvm -ResourceGroupName jasonvn -Name jasonvm1).StorageProfile.OsDisk
     StorageProfile and NetworkProfile, respectively.
    
    
    OsType             : Linux
    EncryptionSettings :
    Name               : jasonvm1
    Vhd                : Microsoft.Azure.Management.Compute.Models.VirtualHardDisk
    Image              :
    Caching            : ReadWrite
    CreateOption       : FromImage
    DiskSizeGB         :
    ManagedDisk        :
    

    Here is the Managed disks VM output:

    PS C:\Users> (get-azurermvm -ResourceGroupName jasonvn -Name jasonvm).StorageProfile.OsDisk
     StorageProfile and NetworkProfile, respectively.
    
    
    OsType             : Linux
    EncryptionSettings :
    Name               : jasonvm
    Vhd                :
    Image              :
    Caching            : ReadWrite
    CreateOption       : FromImage
    DiskSizeGB         : 30
    ManagedDisk        : Microsoft.Azure.Management.Compute.Models.ManagedDiskParameters
    

    Another way, we can use Azure new portal to check automation script to find it:

    enter image description here