Time out when creating Windows VM from an Image

Handinata Tanudjaja 190 Reputation points
2025-04-12T17:47:27.51+00:00

Hi everyone,

I have been having this same issue whenever I am trying to create a Windows VM from an image.
Here's the set up from the beginning (all of these creation reside in the same region)

  1. Created a Windows VM with ADE where the OS disk got encrypted with my created Key Vault (no Key Encryption Key aka KEK). There's no data disk.
    Other specs:
    -VM size Standard B2ats v2 (2 vcpus, 1 GiB memory)
    -No public Inbound Port.
    -Private IP only.
    -Premium SSD
  2. Captured the OS disk snapshot with the following config:
  • Incremental snapshot
  • Platform-managed key as Key management
  • Disable public and private access as Network access
  1. Created a Windows VM Image using the OS disk snapshot with the following config:
  • Encryption at-rest with a platform-managed key as SSE encryption type
  1. Attempted to create a Windows VM from that VM Image using exactly the same specs like the original VM but always ended in an error.
    Error message:
    {"code":"OSProvisioningTimedOut","message":"OS Provisioning for VM 'VM-FromImg-0-4-12' did not finish in the allotted time. The VM may still finish provisioning successfully. Please check provisioning state later. Also, make sure the image has been properly prepared (generalized).\r\n * Instructions for Windows: https://learn.microsoft.com/azure/virtual-machines/windows/prepare-for-upload-vhd-image\r\n * Instructions for Linux: https://learn.microsoft.com/azure/virtual-machines/linux/create-upload-generic\r\n * If you are deploying more than 20 Virtual Machines concurrently, consider moving your custom image to shared image gallery. Please refer to https://aka.ms/movetosig for the same."}

Any idea why this is happening?
Also how to solve this?

Thank you very much!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,681 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mounika Reddy Anumandla 3,995 Reputation points Microsoft External Staff
    2025-04-15T17:07:52.1933333+00:00

    Hi Handinata Tanudjaja,

    Thank you for replying back to us! Happy to assist you further!

    I have investigated more on your ask and the suggestion is that it is not supported to create an image from a VM that is encrypted. You need ALWAYS decrypt the VM that you want to use as image.

    Snapshots in Azure retain the encryption settings of the original OS disk. This means that if the OS disk was encrypted using Azure Disk Encryption or other encryption methods, the snapshot will also be encrypted with the same settings.

    To deploy a new VM from an encrypted VM using snapshots, you typically follow these steps:

    Create a Snapshot of the Encrypted OS Disk and Create a Managed Disk from the Snapshot. The managed disk will retain the ADE encryption, including references to the same Key Vault and encryption keys.

    Create a VM from the Managed Disk

    When creating the new VM, use the managed disk as the OS disk.

    You don’t need to re-enable ADE manually unless:

    You move to a different subscription or region.

    You change the encryption type (e.g., from ADE to disk encryption set).

    User's image

    If the original VM was encrypted, you may need to configure the encryption settings for the new VM, such as providing encryption keys or passwords. You can also disable ADE here like below.

    User's image

    Similar issue: https://stackoverflow.com/questions/56454966/azure-os-disk-encryption-on-vm-creation

    Hope this clarifies!

     

    1 person found this answer helpful.

Your answer

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