Create Azure Managed Disks
This document guides you through the process of creating Azure Managed Disks, essential components for Azure Virtual Machines.
Prerequisites
- An Azure subscription.
- Permissions to create resources in your subscription.
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:
--resource-group: The name of the resource group to create the disk in.--name: The desired name for your managed disk.--sku: The performance tier of the disk (e.g.,Standard_LRS,Premium_LRS,StandardSSD_LRS).--size-gb: The size of the disk in GiB.
--source parameter.
2. Using the Azure Portal
The Azure portal offers a user-friendly graphical interface for creating managed disks.
- Navigate to the Azure portal and search for "Disks".
- Click on "+ Create".
- 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
- 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. |
Next Steps
After creating your managed disk, you can attach it to an Azure Virtual Machine or use it for other Azure storage purposes.