Create a Reusable Windows 10 Enterprise Image in Azure: Compute Gallery Hands-On Lab

Lab: Create a custom Windows 10 image from VM1 and deploy new VMs from it (Azure portal)

Lab goal

Build a reusable image from a generalized Windows 10 VM (VM1) using Azure Compute Gallery, then deploy a new VM from that image.

Estimated time

30–60 minutes (depends on image version creation time)

Prerequisites

  • Azure subscription with Contributor (or Owner) on the target resource group
  • Existing VM named VM1 running Windows 10 Enterprise
  • VM1 is already generalized (Sysprep) and stopped (ideally Deallocated)
  • You know whether VM1 is Gen1 or Gen2 (you can check in VM properties)

Part 0: Verify VM1 is ready (generalized + deallocated)

Step 0.1: Confirm VM is stopped (and deallocated)

  1. Azure portal > Virtual machines
  2. Open VM1
  3. On the Overview page, check Status
    • Target: Stopped (deallocated)

If it’s only “Stopped”, click Stop from the VM blade (this deallocates it).

Step 0.2: Confirm generalization (sanity check)

If you already ran Sysprep, proceed. If not, the imaging step may fail or produce a non-reusable image.


Part 1: Create the Azure Compute Gallery

Step 1.1: Create the gallery

  1. Azure portal search: Azure Compute Gallery
  2. Select Create
  3. Fill in:
    • Subscription: your subscription
    • Resource group: use the same RG as VM1 or a dedicated “Images-RG”
    • Name: acg-pool1-images (example)
    • Region: same region as VM1 (recommended)
  4. Select Review + create > Create

✅ Output: A gallery exists to store definitions and versions.


Part 2: Create an Image Definition

Step 2.1: Create definition

  1. Open the gallery you created
  2. Left menu: Image definitions > Create
  3. Configure:
    • Region: same as gallery
    • Name: win10-ent-custom
    • Operating system: Windows
    • OS state: Generalized
    • Publisher: Contoso (any label)
    • Offer: Win10Custom
    • SKU: avd
    • VM generation: match VM1 (Gen1 or Gen2)
  4. Select Review + create > Create

✅ Output: Image definition created (think “image family”).


Part 3: Create an Image Version (from VM1)

Step 3.1: Start version creation

  1. Open the image definition (win10-ent-custom)
  2. Left menu: Versions > Create

Step 3.2: Basics

Fill:

  • Version number: 1.0.0
  • Source: choose Virtual machine
  • Source VM: select VM1
  • End of life date: optional (skip unless you use governance)

Step 3.3: Replication (keep it simple for the lab)

  • Replica count: 1
  • Target regions: same region only (for lab)
  • Leave advanced options default unless you have a reason.

Step 3.4: Create

Select Review + create > Create

⏳ Wait for deployment to finish.

✅ Output: A deployable image version exists in the gallery.


Part 4: Deploy a new VM from the Image Version

Step 4.1: Create VM from image version

  1. Open the new image version (1.0.0)
  2. Select Create VM

Step 4.2: Basics

  • Resource group: same as host pool RG or lab RG
  • VM name: VM1-Clone-01
  • Region: same region as the image
  • Availability options: default for lab
  • Image: should already show your gallery image version
  • Size: pick a test size (example: Standard_D2s_v5)
  • Administrator account: set username/password (or use Azure AD login later if configured)

Step 4.3: Disks

  • Keep defaults for lab
  • OS disk type: Standard SSD is fine

Step 4.4: Networking

  • Choose your existing VNet/Subnet
  • Public IP: optional (for lab it’s convenient)
  • NIC NSG: basic inbound (RDP only if needed)

Step 4.5: Management

  • Boot diagnostics: On (recommended)
  • Monitoring: optional

Step 4.6: Review + create

Select Create

✅ Output: A new VM deployed from your custom image.


Part 5: Validation (prove it’s your custom image)

Step 5.1: Connect and validate customizations

  1. Open VM1-Clone-01
  2. Connect using RDP (if enabled) or your preferred method
  3. Validate:
    • Installed apps you added on VM1 exist
    • Custom settings/branding changes exist
    • Windows version/build matches expectation

Step 5.2: Quick Azure-side validation

  • Gallery > Image definition > Versions:
    • Confirm 1.0.0 exists and is Succeeded
  • VM > Extensions + applications:
    • Confirm only expected extensions exist (if any)

Part 6: Cleanup (optional)

To avoid costs:

  • Delete VM1-Clone-01 (and associated resources)
  • Keep the gallery/definition/version if you want to reuse it later

Troubleshooting quick hits

Image version creation fails

Common causes:

  • VM not generalized (Sysprep not done)
  • VM not stopped/deallocated
  • VM generation mismatch in image definition

Can’t find VM1 as a source

  • VM1 must be in the same subscription you’re working in
  • Ensure you have permissions on the VM resource group
  • VM must be in a valid state (stopped)

Deployed VM doesn’t look like VM1

  • You may have created the image before finishing customization
  • Confirm you deployed from the gallery image version, not a marketplace image

Lab extension (recommended next)

If your goal is Azure Virtual Desktop scale:

  • Use the gallery image version to build new session hosts via:
    • AVD host pool “Add session hosts” workflow
    • ARM/Bicep deployment for host scaling
    • Image versioning strategy (1.0.1, 1.1.0) for patch cadence and rollback

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *