Skip to content

Azure Virtual Desktop for Occasional Use

Bicep Lint License: MIT Bicep

Cost-effective Azure Virtual Desktop infrastructure for occasional work sessions. Deploy in minutes, deallocate to save 98% on costs, resume whenever needed.

⚡ Why This Project?

  • Personal desktop – Purpose-built for individual occasional use.
  • Cost optimised – £2–3/month idle, £94–126/month active (98% savings when deallocated).
  • Infrastructure as Code – Reproducible, version-controlled Bicep templates.
  • Easy lifecycle – Deploy once, deallocate/start as needed.
  • Cloud-native – Entra ID-joined VMs, no on-premises AD required.

🚀 Quick Start (5 minutes)

# 1. Clone and authenticate
git clone https://github.com/markheydon/avd-occasional.git
cd avd-occasional
az login

# 2. Deploy infrastructure (15–20 minutes)
.\scripts\Deploy-AvdOccasional.ps1

# 3. Assign role permissions (both required)
# See Quick Start Guide for detailed role assignment commands

# 4. Connect
# Use Windows App (Microsoft Store) to connect to your desktop

# Later: Save costs
.\scripts\Stop-AvdOccasional.ps1

# Resume when needed
.\scripts\Start-AvdOccasional.ps1

Full instructions: Quick Start Guide

📚 Documentation

DocumentPurpose
Quick StartGet up and running in ~25 minutes (includes 5–10 min role propagation).
PrerequisitesTools, Azure setup, role assignments, and security requirements.
Architecture OverviewHow components work together, cost drivers, security model.
Detailed DeploymentStep-by-step walkthrough, customisation, and advanced options.
TroubleshootingCommon issues and solutions.
Scripts ReferencePowerShell commands: Deploy, Start, Stop, Remove.

💰 Cost Profile

Costs are estimates, in GBP, based on pricing information available publicly in July 2026 and are subject to change by Microsoft at any time. Use the official Azure Pricing Calculator to determine your potential costs before deployment.
StateMonthly CostNotes
Deallocated£2–3VMs stopped, disks retained (instant resume)
Running£94–126Full D2s_v5 compute (1 VM, moderate workload)
Deleted£0Complete removal (15–20 min redeploy)
Savings~98%Cost reduction when deallocated vs running

Component breakdown:

  • Session Host VM: £90–120/month (active) → £0 (deallocated).
  • Public IP: £2–3/month (active) → £0 (deallocated & deleted).
  • OS Disk: £2–3/month (always charged).

See Detailed Deployment: Cost Analysis for scaling costs and optimisation strategies.

🏗️ Architecture at a Glance

See the Architecture Overview for the full diagram and component descriptions.

Key features:

  • Entra ID-joined VMs (cloud-native, no VPN required).
  • No inbound public ports (reverse connection only).
  • Public IPs deleted when VMs stopped (cost optimisation).
  • Service Endpoints for optimised Azure service routing.
  • Fully idempotent deployment.

🎯 Use Cases

Suitable for

  • Remote work from alternate location – Coffee shop, co-working, travel.
  • Temporary compute needs – Project work, testing, demos.
  • Cost-sensitive scenarios – Deallocate between sessions.
  • Personal productivity – Persistent desktop, cloud-native identity.

Not suitable for

  • Pooled multi-user scenarios.
  • Always-on production workloads.

🔧 Key Features

  • Bicep Infrastructure as Code – Reproducible, auditable, version-controlled.
  • Parameterised configuration – Switch workload size (light/moderate) in one parameter.
  • Personal desktop – Single user, persistent configuration.
  • Entra ID authentication – Cloud-native identity, supports passwordless auth.
  • Deallocate pattern – Stop VMs to save costs, resume in 2–3 minutes.
  • Automated lifecycle scripts – Deploy, start, deallocate, cleanup.
  • Minimal security – Reverse connections, NSG included, no RDP ports.
  • UK-friendly defaults – Region: ukwest, pricing in GBP (Regionalising of VMs not yet available see #2).

📋 Prerequisites at a Glance

RequirementStatusDetails
Azure CLIRequiredv2.40+ (Install)
Bicep CLIRequiredIncluded with Azure CLI 2.20+
PowerShellRequired5.1+ (Install)
GitRequiredClone repository (Download)
Azure subscriptionRequiredContributor or Owner role
Entra ID tenantRequiredUsually available with Microsoft 365

For full prerequisite details, see Prerequisites Guide.

📘 Documentation & Resources

Getting Started

  1. New to this project? Start with Quick Start.
  2. Need environment setup? See Prerequisites.
  3. Want to understand how it works? Read Architecture Overview.
  4. Detailed walkthrough? Follow Detailed Deployment Guide.
  5. Troubleshooting? Check Troubleshooting Guide.
  6. Using PowerShell scripts? See Scripts Reference.

External Resources

Project Documentation

GitHub


Last Updated: July 2026