Deploying VM Images to Azure Local extremely slow

Pawel Niemczyk 40 Reputation points
2026-05-08T22:14:28.57+00:00

We are using commands that are published at  Create Azure Local VM from Azure Compute Gallery Images via Azure CLI - Azure Local | Microsoft Learn to create VM Images on Azure Local cluster using our own Compute Gallery image as a source.

We observed that download speeds (Azure Blob to Azure Local Cluster) using this approach are extremely slow. When troubleshooting, we noticed that using either Invoke-WebRequest or cURL to download vhdx file from Azure Blob Container is extremely slow - sub 1Mbps on a 5Gbps link.

However, using azcopy to download the same disk via same URI gives us expected download speed at approx. 2.5Gbps.

We ruled out firewalls and network stack – all network pathing and applied firewall rules are the same. No special routing to Azure Blob occurs.

For an image size of approx. 250GB , the expected or experienced download times are:

  • using az stack-hci-vm image create: ~6h
  • using cURL or Invoke-WebRequest: ~10D (!)
  • using azcopy: ~5m

This happens only to downloads from Azure Container Blobs. We tested other object-oriented storage services with cURL and Invoke-WebRequest and don't experience the same issues.

We don't know what mechanism is being used by az stac-hci-vm image create command to execute the download, but the result is that deploying and updating custom images programmatically seems nearly impossible. Is this expected behavior? Are there any workarounds available?

Azure Local

Answer accepted by question author
Manish Deshpande 8,215 Reputation points Microsoft External Staff Moderator
2026-05-09T01:35:26.5466667+00:00

Hi @Pawel Niemczyk ,

Thank you for the detailed description and the comparison of download behaviors that’s very helpful.

Based on your observations, this behavior is not expected from a raw Azure Storage performance perspective, but it can occur due to how the image creation workflow is implemented in Azure Local / Azure Stack HCI.

The command:

az stack-hci-vm image create

does not directly stream data like AzCopy or CURL. Instead, it relies on internal image provisioning workflows that:

  • Use Azure Compute Gallery image ingestion mechanisms
  • May involve buffered copy operations, service-side validation, and chunked transfers
  • Do not leverage the optimized data-plane transfer path used by AzCopy

As a result, throughput can be significantly lower compared to AzCopy, which is specifically optimized for high-performance data transfer to/from Azure Storage.

AzCopy is the recommended tool for high-performance data movement to/from Azure Storage:

https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-connect-to-secure-cluster

Secure or managed cluster operations often use certificate-based or service-layer workflows rather than direct data streaming

https://docs.azure.cn/en-us/service-fabric/service-fabric-cluster-security

To achieve expected performance, the recommended approach is:

Stage the image locally using AzCopy (best practice)

  1. Download the VHDX from Blob Storage using AzCopy:
       azcopy copy "https://<storage-account>.blob.core.windows.net/<container>/<file>.vhdx" "C:\localpath\image.vhdx"
    
  2. Verify that the download is completed at expected speed (as you observed ~Gbps range).
  3. Use the local file as the image source:
       az stack-hci-vm image create --path "C:\localpath\image.vhdx" ...
    
  4. Ensure the storage account and Azure Local cluster are in the same region/network proximity
  5. Validate that the VHDX is fixed-size (not dynamic) for better ingestion performance
  6. Avoid repeated downloads via control-plane commands

your testing is absolutely valid the large difference in throughput clearly indicates that this is not a network issue, but a difference in how the tooling performs the data transfer internally.

For practical deployments, we strongly recommend using AzCopy for initial image transfer, as this aligns with Microsoft best practices for high-throughput data movement.

Thanks,
Manish.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author
Alex Burlachenko 25,290 Reputation points MVP Volunteer Moderator
2026-05-20T08:54:14.2333333+00:00

hi Pawel Niemczyk & thanks for join me here at Q&A portal,

So what i see Blob is fine, AzCopy proves it, the Azure Local image create download path is the bottleneck. Azure Local image import path is using a simple single-stream download, not AzCopy-style parallel block transfer. That explains the huge difference curl / Invoke-WebRequest are basically one stream and can be awful against Blob for large VHDX files, while azcopy splits the blob into chunks and downloads in parallel. So the slow part is probably not ur 5Gbps link, firewall, or Blob itself. It is the download implementation used by az stack-hci-vm image create. For now I would not treat this as expected “network performance”, it is a tooling or performance limitation. Best workaround is to pre-stage the VHDX locally on the Azure Local cluster using azcopy, then create/import the VM image from local storage if the command path supports local source in ur version. If not, use the Azure Local image creation workflow that points to an already-local VHDX or create the gallery artifact after staging. Also test with the newest az stack-hci-vm extension because this may be improved between versions. If the command only supports blob URI and still downloads single-threaded, open support ticket with exact timings and ask whether image create supports AzCopy/parallel transfer or local staged VHDX import.

rgds,

Alex

&

If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.