Create Azure Managed Disks

This document guides you through the process of creating Azure Managed Disks, essential components for Azure Virtual Machines.

Prerequisites

Methods for Creating Disks

You can create Azure Managed Disks using various methods, including the Azure portal, Azure CLI, Azure PowerShell, and SDKs.

1. Using the Azure CLI

The Azure CLI provides a powerful command-line interface for managing Azure resources. Here's how to create a managed disk:

az disk create --resource-group MyResourceGroup --name MyManagedDisk --sku Standard_LRS --size-gb 100
            

Explanation:

Tip: You can also create a disk from an existing snapshot or VHD by specifying the --source parameter.

2. Using the Azure Portal

The Azure portal offers a user-friendly graphical interface for creating managed disks.

  1. Navigate to the Azure portal and search for "Disks".
  2. Click on "+ Create".
  3. Fill in the required details:
    • Subscription
    • Resource group
    • Disk name
    • Region
    • Availability zone (optional)
    • Source type (None, Snapshot, Storage blob, Disk)
    • Size (GB)
    • Performance tier (Standard HDD, Standard SSD, Premium SSD, Ultra Disk)
    • Encryption options
  4. Review your settings and click "Create".

3. Using Azure PowerShell

Azure PowerShell is another robust option for scripting and automating disk creation.

New-AzDiskConfig -SkuName "Standard_LRS" -CreateOption Empty -DiskSizeGB 100
            New-AzDisk -DiskName "MyManagedDisk" -DiskConfig $diskConfig -ResourceGroupName "MyResourceGroup"
            

Disk Types and SKUs

Azure Managed Disks offer various performance tiers (SKUs) to meet different workload requirements:

SKU Name Description Performance Use Case
Standard HDD Uses hard disk drives. Lower IOPS/throughput, higher latency. Development/test, non-critical workloads.
Standard SSD Uses Solid State Drives. Balanced IOPS/throughput, lower latency than HDD. Web servers, lightly used applications, dev/test.
Premium SSD Uses high-performance Solid State Drives. High IOPS/throughput, very low latency. Production and performance-sensitive applications.
Ultra Disk Offers highest performance with configurable IOPS and throughput. Extremely high IOPS/throughput, lowest latency. Mission-critical, high-performance databases, I/O intensive workloads.
Important: Choose the disk SKU that best matches your application's performance and cost requirements. Migrating between certain disk types can involve downtime and data movement.

Next Steps

After creating your managed disk, you can attach it to an Azure Virtual Machine or use it for other Azure storage purposes.