Create Managed Disk
This guide walks you through the process of creating a managed disk in Azure. Managed disks are standard disk resources in Azure that are managed by Azure and are recommended for most scenarios.
Prerequisites
- An Azure subscription. If you don't have one, create a free account before you begin.
- An Azure resource group. If you don't have one, you can create one.
Steps to Create a Managed Disk
-
1
Navigate to Azure Portal
Sign in to the Azure portal.
-
2
Search for Disks
In the search bar at the top, type "Disks" and select "Disks" from the services list.
-
3
Create a New Disk
Click the + Create button on the Disks page.
-
4
Configure Basic Settings
- Subscription: Select your Azure subscription.
- Resource group: Choose an existing resource group or create a new one.
- Disk name: Provide a unique name for your managed disk.
- Region: Select the Azure region where you want to create the disk.
- Availability zone: (Optional) Choose an availability zone for redundancy.
-
5
Configure Size and Performance
- Source type: Choose the source for your disk. Common options include:
- None (empty disk): Creates a blank disk.
- Snapshot: Creates a disk from an existing snapshot.
- Storage blob: Creates a disk from a VHD file in a storage blob.
- Custom image: Creates a disk from a custom image.
- Size: Select the desired size for your disk (e.g., 128 GiB, 1 TiB). You can also choose a custom size.
- Performance tier: Select the performance tier (e.g., Standard HDD, Standard SSD, Premium SSD, Ultra Disk).
- Source type: Choose the source for your disk. Common options include:
-
6
Configure Encryption
Choose your encryption settings. By default, disks are encrypted at rest with platform-managed keys. You can also choose customer-managed keys.
-
7
Advanced Options (Optional)
Review and configure advanced options such as host caching, deletion policies, and tags.
-
8
Review and Create
Click Review + create. Azure will validate your configuration. Once validation passes, click Create.
Creating a Managed Disk using Azure CLI
You can also create managed disks using the Azure Command-Line Interface (CLI). Here's an example of creating a basic managed disk:
az disk create --resource-group MyResourceGroup --name MyManagedDisk --sku Standard_LRS --size-gb 128 --location eastus
Replace MyResourceGroup, MyManagedDisk, and eastus with your desired values.
Key Considerations
- Disk Type: Choose the disk type that best suits your workload's performance and cost requirements.
- Size: Ensure the disk size meets your application's needs. You can resize disks later.
- Region: Create disks in the same region as your virtual machines for optimal performance.
- Snapshots: Regularly take snapshots of your disks for backup and disaster recovery.
For more detailed information, refer to the official Azure Managed Disks documentation.