Steps to create gold image/Master Image in Azure and store in Azure Compute Gallery:
Process to Create Gold Image in Azure

Steps to create gold image/Master Image in Azure and store in Azure Compute Gallery:

Step 1: 

Create a Base Virtual Machine:

• Go to Azure Portal → Virtual Machines → Click Create VM. • Select a Windows (e.g., Windows 11, Windows 10 Multi-Session, or Windows Server from Azure Market place).

• Choose VM size (e.g., D-series for AVD workloads).

• Configure networking

• Click Review + Create and wait for deployment.

Important Note: You can use either Generation 1 or Generation 2 VMs; Gen 2 VMs support features that aren't supported for Gen 1 machines.Learn more about Generation 1 and Generation 2 VMs at Azure support for Generation 2 VMs - Azure Virtual Machines | Microsoft Learn

Step 2: Take your first snapshot:

After you’ve deployed the image, take a snapshot of the disk of your image VM. Snapshots are saving states that will let you roll back any changes if you run into problems while building the image.

Does Taking a Snapshot or Capturing an Image Delete the VM in Azure?

Action VM Deleted? Description Taking a Snapshot

Taking a Snapshot - No -A snapshot is just a backup of the disk. The VM remains untouched.

Capturing an Image-Yes-When you capture an image of a VM, it is deleted if generalized.

 Step 3: Customize your VM Sign in to the VM and start customizing it with apps, updates, and other things you’ll need for your image. If the VM needs to be domain-joined during customization, remove it from the domain before running sysprep.

Make sure you’ve done the following things before taking the final snapshot:

• Install the latest Windows updates.

• Complete any necessary cleanup, such as cleaning up temporary files, defragmenting disks, and removing unnecessary user profiles.

Location for Sysprep: C:Windows\System32\Sysprep\Sysprep.exe

Sysprep: This will remove all your personal account and security information, and then prepares the machine to be used as an image.

Important Note: If your machine includes an antivirus app, it may cause issues when you start sysprep. To avoid this, disable all antivirus programs before running sysprep. After you have run Sysprep on a VM, that VM is considered generalized and cannot be restarted. The process of generalizing a VM is not reversible. If you need to keep the original VM functioning, you should create a snapshot of the OS disk, create a VM from the snapshot, and then generalize that copy of the VM. Sysprep requires the drives to be fully decrypted. If you have enabled encryption on your VM, disable encryption before you run Sysprep.

SysPrep

Step 4: Capture the VM

After you've completed sysprep and shut down your machine in the Azure portal, open the VM tab and select the Capture button to save the image for later use. When you capture a VM, you can either add the image to a shared image gallery or capture it as a managed image.

Using Azure Portal:

1. Go to Virtual Machines → Select your VM.

2. Click Capture (under "Operations").

3. Choose "No, generalize" since we already ran Sysprep.

4. Select a Compute Gallery or create a new image.

5. Click Review + Create.

Capture Image

Create an Image

Note: If you need to store the image in "Azure Compute Gallery" then you need to create Target VM definition before capture the image of Gold VM.

Using Azure Portal

1.Go to Azure Portal → https://portal.azure.com

2.Search for "Azure Compute Gallery" and click Create

Create Gallery

Enter the following details:

Subscription: Choose your subscription

Resource Group: Select or create a new one

Gallery Name: Example: MyImageGallery

Region: Choose where the gallery will be stored

Sharing Method:

Private (Default) – For your subscription

Community – Share publicly

Direct Subscription – Share with specific subscriptions.

Compute Gallery

Click Review + Create → Create

Steps to Create New Image Definition:

An image definition acts as a template for all image versions inside an Azure Compute Gallery. It defines the OS type, offer, and SKU for your images.

1️⃣ Go to Azure Portal → https://portal.azure.com

2️⃣ Search for "Azure Compute Gallery" → Select your Gallery

3️⃣ Click + Create Image Definition

4️⃣ Enter the following details:

Subscription: Select your subscription

Resource Group: Choose an existing one or create a new one

Gallery Name: Select your existing Azure Compute Gallery

Image Definition Name: Example: Win10MultiSession

Operating System: Choose Windows or Linux

VM Generation:

Gen 1 – Legacy VMs

Gen 2 – Supports larger VM sizes, Secure Boot, TPM

Publisher

Offer: Example: Windows10Enterprise

SKU: Example: Win10-MultiSession

OS State:

Generalized – For reusable images

Specialized – For pre-configured, user-specific images.

Image Definition

Definition Details

Create a VM Image Definition

Submit and Create Image definition

Ramesh Thangella

Citrix Administrator | Citrix Cloud | Citrix MCS &PVS | Citrix NetScalar | Citrix & VMWare Hypervisor | Nutanix| Windows | Vulnerability Management|

4mo

Very helpful

Katta Mahesh

Citrix Administrator at TCS Citrix | Xenapp | XenDesktop | MCS | PVS |Citrix Cloud | Azure

5mo

Very informative

Lavanya Parchuri

Citrix and AVD Engineer with 3 + years experience.

5mo

Very helpful

Lakshmikar R.

Immediate Joiner (LWD 29/08/2025) | Citrix and Azure Administrator

5mo

Very informative

To view or add a comment, sign in

Others also viewed

Explore topics