Introduction

Azure disk snapshots capture point-in-time state of managed disks. When restoring snapshots to create new disks or replace existing ones, failures can occur due to disk type mismatches, region constraints, or VM state conflicts.

Symptoms

Disk type incompatible:

```bash $ az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --sku Standard_LRS

"Error: The snapshot was created from a Premium disk. Cannot create Standard disk from Premium snapshot" ```

Region mismatch:

```bash $ az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --location westus

"Error: Snapshot location 'eastus' does not match target location 'westus'" ```

VM attachment failed:

```bash $ az vm update \ --name my-vm \ --resource-group my-rg \ --attach-data-disks restored-disk

"Error: Cannot attach disk to running VM. VM must be stopped first" ```

Common Causes

  1. 1.Disk SKU mismatch - Premium snapshot can't create Standard disk
  2. 2.Region constraint - Snapshot and target disk must be same region
  3. 3.VM running - Cannot attach disk while VM is running (some scenarios)
  4. 4.Snapshot deleted - Source snapshot no longer exists
  5. 5.Size mismatch - Target disk size differs from snapshot
  6. 6.Encryption mismatch - Encryption settings differ
  7. 7.Storage account limits - Cannot copy to same storage account

Step-by-Step Fix

  1. 1.Check logs for specific error messages
  2. 2.Verify configuration settings
  3. 3.Test network connectivity
  4. 4.Review recent changes
  5. 5.Apply corrective action
  6. 6.Verify the fix

Step 1: Check Snapshot Properties

```bash # Get snapshot details az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query '{Location:location,Size:diskSizeGB,Sku:sku.name,Encryption:encryptionSettingsCollection,Source:creationData.sourceUri}'

# Note the source disk SKU az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'creationData.{SourceResource:sourceResourceId,SourceType:createOption}' ```

Step 2: Create Disk with Matching SKU

```bash # Create disk matching snapshot SKU az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'sku.name'

# If Premium, create Premium disk az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --sku Premium_LRS \ --location eastus

# If Standard, use Standard az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --sku Standard_LRS ```

Step 3: Restore in Same Region

```bash # Snapshot must be restored in same region az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'location'

# Create disk in same region az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --location eastus # Same as snapshot

# To restore in different region, copy snapshot first az snapshot create \ --name copied-snapshot \ --source my-snapshot \ --resource-group my-rg \ --location westus ```

Step 4: Stop VM Before Attachment

```bash # Stop VM before attaching OS disk az vm stop \ --name my-vm \ --resource-group my-rg

# Deallocate for complete detachment az vm deallocate \ --name my-vm \ --resource-group my-rg

# Attach restored disk az vm update \ --name my-vm \ --resource-group my-rg \ --attach-data-disks restored-disk

# For OS disk replacement az vm update \ --name my-vm \ --resource-group my-rg \ --os-disk restored-disk ```

Step 5: Check Snapshot Availability

```bash # Verify snapshot exists az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query '{Name:name,State:provisioningState}'

# List all snapshots az snapshot list \ --resource-group my-rg \ --query '[].{Name:name,Location:location,Size:diskSizeGB}'

# If snapshot deleted, cannot restore # Check activity log for deletion az monitor activity-log list \ --resource-group my-rg \ --resource Microsoft.Compute/snapshots/my-snapshot \ --query "[?operationName.value=='Microsoft.Compute/snapshots/delete']" ```

Step 6: Match Disk Size

```bash # Snapshot size must match target disk az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'diskSizeGB'

# Create disk with exact size az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --size-gb 128 # Match snapshot size

# Cannot change size during restore # Resize after creation if needed az disk update \ --name restored-disk \ --resource-group my-rg \ --size-gb 256 ```

Step 7: Handle Encryption Settings

```bash # Check snapshot encryption az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'encryptionSettingsCollection'

# For encrypted snapshots, preserve encryption az disk create \ --name restored-disk \ --source my-snapshot \ --resource-group my-rg \ --sku Premium_LRS \ --encryption-settings '{"enabled":true,"diskEncryptionSetId":"/subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/diskEncryptionSets/my-des"}' ```

Step 8: Restore OS Disk Snapshot

```bash # For OS disk restore, special handling required # 1. Stop VM az vm deallocate \ --name my-vm \ --resource-group my-rg

# 2. Get current OS disk ID OS_DISK_ID=$(az vm show \ --name my-vm \ --resource-group my-rg \ --query 'storageProfile.osDisk.managedDisk.id' \ -o tsv)

# 3. Create new disk from snapshot az disk create \ --name new-os-disk \ --source my-os-snapshot \ --resource-group my-rg

# 4. Swap OS disk az vm update \ --name my-vm \ --resource-group my-rg \ --os-disk new-os-disk

# 5. Start VM az vm start \ --name my-vm \ --resource-group my-rg ```

Step 9: Copy Snapshot Across Regions

```bash # For cross-region restore # Option 1: Copy snapshot directly az snapshot create \ --name my-snapshot-westus \ --source my-snapshot \ --resource-group my-rg \ --location westus

# Option 2: Create disk, then snapshot az disk create \ --name temp-disk \ --source my-snapshot \ --resource-group my-rg \ --location westus

az snapshot create \ --name my-snapshot-westus \ --source temp-disk \ --resource-group my-rg \ --location westus

az disk delete \ --name temp-disk \ --resource-group my-rg ```

Step 10: Monitor Restore Operations

```bash # Check disk creation status az disk show \ --name restored-disk \ --resource-group my-rg \ --query '{State:provisioningState,Time:timeCreated}'

# Monitor activity log az monitor activity-log list \ --resource-group my-rg \ --resource Microsoft.Compute/disks/restored-disk \ --query "[?contains(operationName.value, 'write')].{Time:eventTimestamp,Operation:operationName,Status:status.value}" ```

Snapshot Restore Scenarios

ScenarioVM StateDisk TypeRequired Steps
Data disk restoreRunning allowedAny SKU matchCreate disk, attach
OS disk replaceDeallocatedSame SKUStop, swap, start
Cross-region restoreN/ACopy firstCopy snapshot, create disk
Encrypted disk restoreAnyDES requiredPreserve encryption

Verification

```bash # After successful restore # Check disk exists and is healthy az disk show \ --name restored-disk \ --resource-group my-rg \ --query '{Name:name,State:provisioningState,Size:diskSizeGB,Sku:sku.name}'

# Should show: # State: Succeeded

# If attached to VM, verify VM running az vm show \ --name my-vm \ --resource-group my-rg \ --query '{PowerState:powerState,OSDisk:storageProfile.osDisk.name}'

# Should show PowerState: running ```

Prevention

To prevent Azure snapshot restore issues from recurring, implement these proactive measures:

1. Test Snapshot Restore Regularly

yaml
groups:
- name: azure-backup
  rules:
  - alert: AzureSnapshotRestoreTestOverdue
    expr: |
      azure_snapshot_restore_test_age_days > 30
    for: 1d
    labels:
      severity: warning
    annotations:
      summary: "Azure snapshot restore test not performed in 30 days"

2. Automate Snapshot Validation

```bash # Weekly snapshot validation script cat << 'EOF' > /usr/local/bin/validate_snapshots.sh #!/bin/bash RG="my-rg" VM="my-vm"

# Get latest snapshot SNAPSHOT=$(az snapshot list --resource-group $RG --query "[?contains(name, '$VM')].{Name:name,Time:timeCreated}" --orderby timeCreated desc -o tsv | head -1)

echo "Latest snapshot: $SNAPSHOT"

# Test restore to temporary disk az disk create \ --name test-restore-disk \ --resource-group $RG \ --source $SNAPSHOT \ --sku Standard_LRS

# Verify disk created STATE=$(az disk show --name test-restore-disk --resource-group $RG --query provisioningState -o tsv)

if [ "$STATE" == "Succeeded" ]; then echo "PASS: Snapshot restore successful" az disk delete --name test-restore-disk --resource-group $RG --yes else echo "FAIL: Snapshot restore failed" # Alert fi EOF

chmod +x /usr/local/bin/validate_snapshots.sh ```

3. Maintain Snapshot Retention Policy

```bash # Set up snapshot lifecycle az snapshot update \ --name my-snapshot \ --resource-group my-rg \ --set properties.creationData.createOption=Copy

# Create policy to delete old snapshots az policy assignment create \ --name snapshot-retention \ --policy /subscriptions/SUB/providers/Microsoft.Authorization/policyDefinitions/snapshot-retention \ --params '{ "retentionDays": { "value": 90 } }' ```

Best Practices Checklist

  • [ ] Test snapshot restore monthly
  • [ ] Automate snapshot validation
  • [ ] Maintain retention policy
  • [ ] Document restore procedures
  • [ ] Test cross-region restores
  • [ ] Verify encryption settings
  • [Fix Azure VM Not Starting](/articles/fix-azure-vm-not-starting)
  • [Fix Azure Disk Encryption Failed](/articles/fix-azure-disk-encryption-failed)
  • [Fix Azure Storage Account Inaccessible](/articles/fix-azure-storage-account-inaccessible)
  • [Technical troubleshooting: Fix Azure Aks Pod Crashloopbackoff Issue in Azure](azure-aks-pod-crashloopbackoff)
  • [Technical troubleshooting: Fix Azure Api Management Policy Expression Runtime](azure-api-management-policy-expression-runtime-error)
  • [Technical troubleshooting: Fix Azure App Configuration Feature Flag Not Refre](azure-app-configuration-feature-flag-not-refreshing)
  • [Technical troubleshooting: Fix Azure App Service 503 Always On Disabled Issue](azure-app-service-503-always-on-disabled)
  • [Technical troubleshooting: Fix Azure Application Gateway Err SSL Unrecognized](azure-application-gateway-err-ssl-unrecognized-name-alert)

<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "TechArticle", "headline": "Fix Azure Snapshot Restore Failed", "description": "Troubleshoot Azure snapshot restore failures. Check disk compatibility, region constraints, and VM attachment requirements.", "url": "https://www.fixwikihub.com/fix-azure-snapshot-restore-failed", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-04-03T11:33:04.335Z", "dateModified": "2026-04-03T11:33:04.335Z" } </script>