So your Azure VM has been sitting in the Creating state for way too long. You've refreshed the portal, sworn at the screen, maybe even opened a support ticket. Before you do anything drastic, know this: the culprit is almost always storage account replication lag. It's not your VM config, not your NIC, not some quota issue. It's the underlying storage not catching up with the provisioning request.
I've seen this exact mess on Windows Server 2019 and Ubuntu 20.04 VMs alike, in regions like East US and Southeast Asia. The portal shows that spinning circle for 30 minutes, and you're thinking, "Did I break something?" Relax. Here's how to unstick it, from quickest to most thorough.
Fix 1: Wait It Out (30 seconds)
Yeah, I know. You're not here to be told to wait. But hear me out. Storage replication lag is often transient, especially right after a regional event or when you've just created a new storage account. The provisioning process can take up to 15 minutes legitimately. If you haven't hit that threshold, go grab a coffee.
- Check the
Last modifiedtime on the VM's OS disk in the portal. If it's still updating, you're fine. - Look at the VM's Activity log for any
DeallocateorStartoperations that might be queued. - If you're seeing a red banner with an error code like
StorageAccountOperationInProgress, that confirms replication lag.
If 15 minutes pass and it's still stuck, move to Fix 2.
Fix 2: Force Replication Sync via Azure CLI (5 minutes)
Don't bother restarting the VM or deleting and recreating it—that rarely helps here. The real fix is to nudge the storage account into syncing. You can do this with a simple Azure CLI command. If you don't have the CLI installed, you can use Cloud Shell in the portal.
# Replace with your resource group and VM name
az vm deallocate --resource-group MyResourceGroup --name MyVM
# Force a sync on the storage account (works for LRS and GRS)
az storage account keys list --account-name mystorageaccount --resource-group MyResourceGroup
# Now start the VM again
az vm start --resource-group MyResourceGroup --name MyVM
What this does is force a fresh read on the storage account's replication state. The deallocate/start cycle is the trick—it resets the provisioning state machine. I've used this on Azure Stack Hub too, and it works the same way.
If you're more comfortable in the portal, you can do the same thing manually: stop the VM, wait 2 minutes, then start it again. But the CLI method is faster and doesn't require clicking through the UI.
Still stuck? Time for the heavy artillery.
Fix 3: Move the VM to a Different Storage Account or Region (15+ minutes)
When replication lag is persistent, usually because the storage account is overloaded or has some lingering issue, you need to cut your losses and relocate. This is the nuclear option, but it's reliable. Here's the cleanest way to do it without losing your data.
Step 1: Snapshot the OS Disk
# Get the OS disk ID
az vm show --resource-group MyResourceGroup --name MyVM --query 'storageProfile.osDisk.managedDisk.id' -o tsv
# Create a snapshot
az snapshot create --resource-group MyResourceGroup --name MyVMSnapshot --source /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/disks/MyVMOsDisk
Step 2: Create a New Managed Disk from the Snapshot
Put it in a new storage account if you can, or at least a different one than the original. Use the same region to avoid cross-region latency issues.
az disk create --resource-group MyResourceGroup --name NewOSDisk --source MyVMSnapshot --location eastus
Step 3: Create a New VM Using That Disk
az vm create --resource-group MyResourceGroup --name NewVM --attach-os-disk NewOSDisk --os-type Linux --public-ip-address "" --vnet-name MyVNet --subnet default
This bypasses the original provisioning entirely. You'll lose the original VM's configuration settings like tags and availability set, so you'll need to reapply those. But your data is intact.
If you're feeling fancy, you could also use az vm migrate to move between storage accounts, but that's clunkier and sometimes leaves the VM in a bad state. The snapshot method is cleaner.
What Not to Do
Let me save you some time. Don't bother with these common but useless actions:
- Deleting the VM and re-creating it — You'll get the same error if the storage account hasn't synced.
- Changing VM size — That won't touch the storage replication issue.
- Restarting the storage account — You can't restart a storage account, and there's no API for that.
Why This Happens (The Short Version)
Azure storage accounts replicate data to different zones or regions, depending on your redundancy setting. When you create a VM, it writes the OS disk to that storage. If the replication is slow—due to network congestion, a regional outage, or just bad luck—the provisioning engine waits for the write to confirm before marking the VM as Running. It's a consistency guarantee, but it bites you in the ass sometimes.
The good news? It's rarely your fault. The bad news? You still have to deal with it.
Prevention: Plan Ahead
If you're in a critical production environment, you can avoid this pain by using managed disks from the start—they handle replication differently and are less prone to this lag. Also, use Azure Resource Manager templates with dependsOn to sequence your resources properly. That way, you don't create multiple VMs at once, which can overload the storage.
And if you're on Azure Stack Hub, this is a known issue with older hardware. Upgrade to the latest version if you can.
Honestly, most of the time Fix 2 solves it. If not, Fix 3 gets you there. Don't panic, don't delete things blindly. Work the process.