Introduction

Azure Compute Gallery (formerly Shared Image Gallery) replicates VM images across regions for deployment scalability. When replication is slow, new VMs cannot be deployed in target regions, delaying application rollout and scaling operations.

Symptoms

Replication pending:

```bash $ az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query 'publishingProfile.targetRegions'

[ { "region": "eastus", "state": "Succeeded" }, { "region": "westus", "state": "Pending", # Still replicating "progress": "45%" } ] ```

Extended replication time:

```bash $ az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query 'publishingProfile.{Started:publishedDate,Regions:targetRegions}'

# Replication started hours ago but still pending ```

VM deployment blocked:

```bash $ az vm create \ --name my-vm \ --image "/subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/galleries/my-gallery/images/my-image/versions/1.0.0" \ --location westus

"Error: Image version 1.0.0 not available in region westus" ```

Common Causes

  1. 1.Large image size - Multi-GB images take longer to replicate
  2. 2.Network bandwidth limits - Cross-region transfer throttled
  3. 3.Target region capacity - Region under heavy load
  4. 4.Replication mode - Shallow vs deep replication differences
  5. 5.Concurrent replications - Multiple images replicating simultaneously
  6. 6.Storage account source - Source blob slow or throttled
  7. 7.Premium vs Standard storage - Replication speed varies by tier

Step-by-Step Fix

Step 1: Check Image Version Status

```bash # Check replication status az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query 'publishingProfile.targetRegions'

# Get detailed replication state az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query '{State:provisioningState,Regions:publishingProfile.targetRegions}' ```

Step 2: Check Image Size

```bash # Check source image size az disk show \ --name my-source-disk \ --resource-group my-rg \ --query '{SizeGB:diskSizeGB,Type:sku.name}'

# Or check snapshot size az snapshot show \ --name my-snapshot \ --resource-group my-rg \ --query 'diskSizeGB'

# Larger images (>50GB) take significantly longer # Consider optimizing image size before creating versions ```

Step 3: Check Target Region Health

```bash # Check target region availability az vm list-skus --location westus --query '[].{Name:name,Type:type,Zone:zones}'

# Check region status az account list-locations \ --query "[?name=='westus'].{Name:name,Status:availabilityStatus}"

# If region has capacity issues, delay replication ```

Step 4: Use Shallow Replication Mode

```bash # Shallow replication is faster (references source blob) az sig image-version create \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.1 \ --resource-group my-rg \ --managed-image /subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/images/my-source-image \ --target-regions eastus=1 westus=1 \ --replication-mode Shallow

# Deep replication copies full image (slower but more reliable) # Shallow references source (faster but requires source availability)

# Check current replication mode az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query 'storageProfile.{Mode:replicationMode,Source:source}' ```

Step 5: Check Source Storage Performance

```bash # Check source storage account az storage account show \ --name sourcestorage \ --resource-group my-rg \ --query '{Type:sku.name,Kind:kind,Location:location}'

# Premium storage has faster replication az storage account update \ --name sourcestorage \ --resource-group my-rg \ --sku Premium_LRS

# Check storage metrics for throttling az monitor metrics list \ --resource /subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Storage/storageAccounts/sourcestorage \ --metric "Ingress" \ --query 'value[].timeseries[].data[].average' ```

Step 6: Limit Concurrent Replications

```bash # Check for concurrent image version operations az sig image-version list \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --resource-group my-rg \ --query "[?provisioningState=='Creating' || provisioningState=='Updating'].{Version:name,State:provisioningState}"

# If multiple versions replicating, wait for completion # Or cancel unnecessary operations az sig image-version delete \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version temp-version \ --resource-group my-rg ```

Step 7: Optimize Image Before Replication

```bash # Reduce image size before creating version

# 1. Use smaller base OS az vm create \ --name build-vm \ --image UbuntuLTS \ --size Standard_B1s \ --resource-group my-rg

# 2. Remove unnecessary packages and files sudo apt-get autoremove sudo apt-get clean sudo rm -rf /var/log/*

# 3. Compact disk before capturing # For Linux: sudo fstrim -av sudo dd if=/dev/zero of=/zero bs=1M; rm /zero

# For Windows: defrag C: /optimize sdelete -z C: ```

Step 8: Set Replication Priority

```bash # Create image version with priority regions first az sig image-version create \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.2 \ --resource-group my-rg \ --managed-image my-source-image \ --target-regions eastus=1 westus=2 # eastus has priority 1 (first)

# Add more regions after initial replication completes az sig image-version update \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.2 \ --resource-group my-rg \ --add publishingProfile.targetRegions '{"region":"centralus","replicationCount":1}' ```

Step 9: Monitor Replication Progress

```bash # Query replication progress az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query "publishingProfile.targetRegions[?region=='westus'].progress"

# Create alert for replication completion az monitor activity-log alert create \ --name image-replication-complete \ --resource-group my-rg \ --condition category='ResourceManagement' and operationName='Microsoft.Compute/galleries/images/versions/write/action'

# Check replication in activity log az monitor activity-log list \ --resource-group my-rg \ --caller Microsoft.Compute \ --query "[?contains(operationName.value, 'gallery')].{Time:eventTimestamp,Operation:operationName,Status:status.value}" ```

```bash # For publicly shared images, use community gallery # Images are pre-replicated across regions

# List community gallery images az sig list-community --location eastus \ --query '[].{Name:name,Publisher:publisher,Description:description}'

# Use community image directly az vm create \ --name my-vm \ --image "/communityGalleries/gallery-name/images/image-name/versions/latest" \ --location westus ```

Replication Time Estimates

Image SizeShallow ReplicationDeep Replication
<10 GB5-15 minutes15-30 minutes
10-50 GB15-30 minutes30-60 minutes
50-100 GB30-60 minutes1-3 hours
>100 GB1-2 hours2-6 hours

Verification

```bash # After replication completes az sig image-version show \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --query 'publishingProfile.targetRegions'

# All regions should show "Succeeded"

# Test VM creation in target region az vm create \ --name test-vm-westus \ --image "/subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/galleries/my-gallery/images/my-image/versions/1.0.0" \ --location westus \ --resource-group my-rg \ --size Standard_D2s_v3

# Should succeed without image unavailable error ```

Prevention

To prevent Azure Shared Image Gallery replication slow issues from recurring, implement these proactive measures:

1. Monitor Replication Status

yaml
groups:
- name: azure-image-gallery
  rules:
  - alert: AzureImageReplicationSlow
    expr: |
      azure_image_replication_progress_percent < 100
    for: 2h
    labels:
      severity: warning
    annotations:
      summary: "Azure image replication taking longer than 2 hours"

2. Use Appropriate Replication Mode

```bash # Use shallow replication for faster copies az sig image-version create \ --gallery-name my-gallery \ --gallery-image-definition my-image \ --gallery-image-version 1.0.0 \ --resource-group my-rg \ --managed-image /subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/images/my-source-image \ --target-regions westus=1 eastus=1 \ --replication-mode Shallow # Faster than Standard

# Standard mode copies all data # Shallow mode creates references to source ```

3. Pre-Replicate to Critical Regions

bash
# Create image version with prioritized regions
az sig image-version create \
  --gallery-name my-gallery \
  --gallery-image-definition my-image \
  --gallery-image-version 1.0.0 \
  --resource-group my-rg \
  --managed-image /subscriptions/SUB/resourceGroups/my-rg/providers/Microsoft.Compute/images/my-source-image \
  --target-regions westus=1=standard eastus=2=standard \
  --storage-account-type Premium_LRS

Best Practices Checklist

  • [ ] Monitor replication status
  • [ ] Use shallow replication when possible
  • [ ] Pre-replicate to critical regions
  • [ ] Schedule replications during off-peak
  • [ ] Optimize image size
  • [ ] Document replication timelines
  • [Fix Azure VM Not Starting](/articles/fix-azure-vm-not-starting)
  • [Fix Azure Image Builder Pipeline Failed](/articles/fix-azure-image-builder-pipeline-failed)
  • [Fix Azure VM Extension Failed](/articles/fix-azure-vm-extension-failed)
  • [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 Shared Image Gallery Replication Slow", "description": "Troubleshoot Azure Compute Gallery replication delays. Check network bandwidth, target region status, and replication settings.", "url": "https://www.fixwikihub.com/fix-azure-shared-image-gallery-replication-slow", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-04-03T15:56:46.547Z", "dateModified": "2026-04-03T15:56:46.547Z" } </script>