Troubleshooting Azure Virtual Machine Disk Issues

This guide provides steps and common solutions for diagnosing and resolving disk-related problems with your Azure Virtual Machines (VMs).

Common Disk Issues

Troubleshooting Steps

1. Check Disk Status in Azure Portal

Begin by verifying the status of your VM and its disks in the Azure portal.

  1. Navigate to your Virtual Machine resource in the Azure portal.
  2. Under the "Disks" section, check the status of attached disks (OS disk and data disks). Ensure they are attached and healthy.
  3. Review the VM's "Overview" page for any status messages or alerts.

2. Monitor Disk Performance

Performance issues are often the first sign of disk problems. Use Azure Monitor to track key metrics.

3. Disk Not Appearing or Accessible in OS

If a disk is attached in Azure but not visible in the VM's operating system:

For Windows:
  1. Connect to the VM via RDP.
  2. Open Disk Management (diskmgmt.msc).
  3. Check if the disk is listed. If it is "Offline" or "Unknown," right-click and bring it online.
  4. If it's uninitialized, initialize it and create a new volume.
  5. If a drive letter is missing, right-click the volume and change the drive letter.
For Linux:
  1. Connect to the VM via SSH.
  2. List available disks: lsblk or fdisk -l.
  3. If the disk is not partitioned, use fdisk or parted to create partitions.
  4. Format the partition (e.g., mkfs.ext4 /dev/sdc1).
  5. Create a mount point: sudo mkdir /mnt/mydatadisk.
  6. Mount the disk: sudo mount /dev/sdc1 /mnt/mydatadisk.
  7. Add an entry to /etc/fstab for automatic mounting on boot.

4. Disk Full Errors

If your OS disk or a data disk is full:

5. VM Performance Degradation

If your VM is experiencing slow disk I/O:

6. OS Boot Issues (OS Disk)

If your VM fails to boot and the issue is suspected to be the OS disk:

7. Managed vs. Unmanaged Disks

Azure now strongly recommends using managed disks. If you are still using unmanaged disks, consider migrating.

8. Storage Service Limits

Be aware of Azure Storage service limits for your chosen disk type and VM size. Exceeding these limits can cause performance throttling or errors.

Refer to Azure VM sizes documentation and Azure subscription and service limits for details.

Advanced Diagnostics

For persistent or complex issues, consider using Azure’s advanced diagnostic tools: